From 8525a166ae10fbedd5590d7f6f26e20e2273b414 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 4 Aug 2011 13:17:42 +0200 Subject: Add the -i option to commit.sh which triggers committing index Instead of adding the files with git add. --- git/commit.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/git/commit.sh b/git/commit.sh index deecada..16a8076 100755 --- a/git/commit.sh +++ b/git/commit.sh @@ -7,6 +7,12 @@ self=`realpath $0` wd=`pwd` +if [ "$1" = "-i" ]; then + add=n +else + add=y +fi + if [ "$EDITOR" = "" ]; then echo "no editor specified with the EDITOR variable" 1>&2 exit 1 @@ -30,7 +36,9 @@ fi for i in $modules; do echo "commit $i" 1>&2 cd $i - git add . + if [ "$add" = "y" ]; then + git add . + fi git commit -F $msg_file cd $wd done -- cgit v1.1