From df0e6302875fba02bdd4fd24a9a0520cdcd7fb1f Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Sun, 14 Sep 2008 23:57:17 +0200 Subject: commit.d: use git add -A Till now we were doing this by hand, using git add . and git ls-files|git rm, but git add -A does the same and it's faster. Signed-off-by: Miklos Vajna --- commit.d/30git-add | 4 ++-- commit.d/40git-rm | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100755 commit.d/40git-rm diff --git a/commit.d/30git-add b/commit.d/30git-add index 66d96a9..b08b583 100755 --- a/commit.d/30git-add +++ b/commit.d/30git-add @@ -2,7 +2,7 @@ set -e if [ "$VCS" = git ] && [ -d .git ]; then - if ! git add .; then - echo "etckeeper warning: git add failed" >&2 + if ! git add --all; then + echo "etckeeper warning: git add --all" >&2 fi fi diff --git a/commit.d/40git-rm b/commit.d/40git-rm deleted file mode 100755 index d2c51c2..0000000 --- a/commit.d/40git-rm +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -set -e - -IFS=' -' - -if [ "$VCS" = git ] && [ -d .git ]; then - for file in $(git ls-files --deleted); do - if [ ! -d "$file" ]; then - git rm --quiet "$file" - fi - done -fi -- cgit v1.2.3