aboutsummaryrefslogtreecommitdiff
path: root/git-resolve-script
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 14:04:13 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 14:04:13 -0700
commit6b38a402e97274037982a5346ca4168cc8ee026c (patch)
treedf65bb53e13bac7ef13375fa5f067d14f96e4532 /git-resolve-script
parentd565b3412a0242e2c729bd77d18c74ecd57184dc (diff)
downloadgit-6b38a402e97274037982a5346ca4168cc8ee026c.tar.gz
git-6b38a402e97274037982a5346ca4168cc8ee026c.tar.xz
Clean up different special *HEAD handling
We codify the following different heads (in addition to the main "HEAD", which points to the current branch, of course): - FETCH_HEAD Populated by "git fetch" - ORIG_HEAD The old HEAD before a "git pull/resolve" (successful or not) - LAST_MERGE The HEAD we're currently merging in "git pull/resolve" - MERGE_HEAD The previous head of a unresolved "git pull", which gets committed by a "git commit" after manually resolving the result We used to have "MERGE_HEAD" be populated directly by the fetch, and we removed ORIG_HEAD and LAST_MERGE too aggressively.
Diffstat (limited to 'git-resolve-script')
-rwxr-xr-xgit-resolve-script4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-resolve-script b/git-resolve-script
index 91b001b9a..bf2fb2d43 100755
--- a/git-resolve-script
+++ b/git-resolve-script
@@ -12,7 +12,7 @@ merge_repo="$3"
: ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
dropheads() {
- rm -f -- "$GIT_DIR/ORIG_HEAD" "$GIT_DIR/MERGE_HEAD" \
+ rm -f -- "$GIT_DIR/MERGE_HEAD" \
"$GIT_DIR/LAST_MERGE" || exit 1
}
@@ -44,7 +44,7 @@ if [ "$common" == "$head" ]; then
echo "Updating from $head to $merge."
git-read-tree -u -m $head $merge || exit 1
echo $merge > "$GIT_DIR"/HEAD
- git-diff-tree -p ORIG_HEAD HEAD | git-apply --stat
+ git-diff-tree -p $head $merge | git-apply --stat
dropheads
exit 0
fi