diff options
author | Linus Torvalds <torvalds@osdl.org> | 2005-08-13 10:50:56 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-08-13 18:28:50 -0700 |
commit | 02a4a32c2da9a89eb9ebc58325adcb47775c9ed5 (patch) | |
tree | 87bf551ac035553ae59efa15d018a7d41a9bbf0c /git-resolve-script | |
parent | Add SubmittingPatches (diff) | |
download | tgif-02a4a32c2da9a89eb9ebc58325adcb47775c9ed5.tar.xz |
[PATCH] Make sure git-resolve-script always works on commits
You can resolve a tag, and it does the right thing except that it might
end up writing the tag itself into the resulting HEAD, which will confuse
subsequent operations no end.
This makes sure that when we resolve two heads, we will have turned them
into proper commits before we start acting on them.
This also fixes the parsing of "treeish^0", which would incorrectly
resolve to "treeish" instead of causing an error.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-resolve-script')
-rwxr-xr-x | git-resolve-script | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-resolve-script b/git-resolve-script index 52dd83bae0..4641119e0f 100755 --- a/git-resolve-script +++ b/git-resolve-script @@ -6,8 +6,8 @@ # . git-sh-setup-script || die "Not a git archive" -head=$(git-rev-parse --verify "$1") -merge=$(git-rev-parse --verify "$2") +head=$(git-rev-parse --verify "$1"^0) || exit +merge=$(git-rev-parse --verify "$2"^0) || exit merge_msg="$3" dropheads() { |