summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64f8a63)
raw | patch | inline | side by side (parent: 64f8a63)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Fri, 5 Aug 2005 15:34:38 +0000 (17:34 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 6 Aug 2005 06:06:58 +0000 (23:06 -0700) |
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>
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>
git-commit-script | patch | blob | history |
diff --git a/git-commit-script b/git-commit-script
index dae487f3fd8b65534cd90a25312b56dd5403020e..1d59f46b94fd817b87202ab7f053a0d60e03cf20 100755 (executable)
--- a/git-commit-script
+++ b/git-commit-script
. 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=()
fi >.editmsg
git-status-script >>.editmsg
fi
-if [ "$?" != "0" ]
+if [ "$?" != "0" -a ! -f $GIT_DIR/MERGE_HEAD ]
then
cat .editmsg
rm .editmsg