summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0fb1eaa)
raw | patch | inline | side by side (parent: 0fb1eaa)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 5 Dec 2006 03:44:40 +0000 (19:44 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 6 Dec 2006 18:47:14 +0000 (10:47 -0800) |
An earlier commit a9cb3c6e changed git-commit to use the
contents of MERGE_MSG even when we do not have MERGE_HEAD (the
rationale is in its log message).
However, the change tricks the following sequence to include a
merge message in a completely unrelated commit:
$ git pull somewhere
: oops, the conflicts are too much. forget it.
$ git reset --hard
: work work work
$ git commit
To fix this confusion, this patch makes "git reset" to remove
the leftover MERGE_MSG that was prepared when the user abandoned
the merge.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Luben Tuikov <ltuikov@yahoo.com
contents of MERGE_MSG even when we do not have MERGE_HEAD (the
rationale is in its log message).
However, the change tricks the following sequence to include a
merge message in a completely unrelated commit:
$ git pull somewhere
: oops, the conflicts are too much. forget it.
$ git reset --hard
: work work work
$ git commit
To fix this confusion, this patch makes "git reset" to remove
the leftover MERGE_MSG that was prepared when the user abandoned
the merge.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Luben Tuikov <ltuikov@yahoo.com
git-reset.sh | patch | blob | history |
diff --git a/git-reset.sh b/git-reset.sh
index 3133b5bd25ca7ad3c2a5451ee9c2e0f4514cd980..c0feb4435d15da9cc9928800cbe270018f044152 100755 (executable)
--- a/git-reset.sh
+++ b/git-reset.sh
;;
esac
-rm -f "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/rr-cache/MERGE_RR" "$GIT_DIR/SQUASH_MSG"
+rm -f "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/rr-cache/MERGE_RR" \
+ "$GIT_DIR/SQUASH_MSG" "$GIT_DIR/MERGE_MSG"
exit $update_ref_status