aboutsummaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-08-05 17:34:38 +0200
committerJunio C Hamano <junkio@cox.net>2005-08-05 23:06:58 -0700
commiteca35ecdcaa1448de8cc9ec64590f47a9012264a (patch)
treeaf11615a155e302b9cf8426b1f146c8a44814045 /git-commit-script
parent64f8a631e1112efdd4d4236442d59fe871da4bac (diff)
downloadgit-eca35ecdcaa1448de8cc9ec64590f47a9012264a.tar.gz
git-eca35ecdcaa1448de8cc9ec64590f47a9012264a.tar.xz
[PATCH] git-commit-script fix for degenerated merge
If merging results in an unchanged tree, git-commit-script should not complain that there's nothing to commit. Also, add "[--all]" to usage(). [jc: usually there is no reason to record an unchanging merge, but this code path is triggered only when there is a nontrivial merge that needed to be resolved by hand, and we should be able to record the fact that these two tree heads are dealt with as a regular two-parent commit in order to help later merges.] Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-commit-script')
-rwxr-xr-xgit-commit-script4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-commit-script b/git-commit-script
index dae487f3f..1d59f46b9 100755
--- a/git-commit-script
+++ b/git-commit-script
@@ -6,7 +6,7 @@
. git-sh-setup-script || die "Not a git archive"
usage () {
- die 'git commit [-m existing-commit] [<path>...]'
+ die 'git commit [--all] [-m existing-commit] [<path>...]'
}
files=()
@@ -86,7 +86,7 @@ else
fi >.editmsg
git-status-script >>.editmsg
fi
-if [ "$?" != "0" ]
+if [ "$?" != "0" -a ! -f $GIT_DIR/MERGE_HEAD ]
then
cat .editmsg
rm .editmsg