summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d565b34)
raw | patch | inline | side by side (parent: d565b34)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 21 Jun 2005 21:04:13 +0000 (14:04 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 21 Jun 2005 21:04:13 +0000 (14:04 -0700) |
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.
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.
git-fetch-script | patch | blob | history | |
git-pull-script | patch | blob | history | |
git-resolve-script | patch | blob | history |
diff --git a/git-fetch-script b/git-fetch-script
index 7cd88b93b21c47018be7de84e7b1252d32c6098f..2e62f001b189249243ad27b88bf8357526095f14 100755 (executable)
--- a/git-fetch-script
+++ b/git-fetch-script
}
echo "Getting remote $merge_name"
-download_one "$merge_repo/$merge_name" "$GIT_DIR"/MERGE_HEAD || exit 1
+download_one "$merge_repo/$merge_name" "$GIT_DIR"/FETCH_HEAD || exit 1
echo "Getting object database"
-download_objects "$merge_repo" "$(cat "$GIT_DIR"/MERGE_HEAD)" || exit 1
+download_objects "$merge_repo" "$(cat "$GIT_DIR"/FETCH_HEAD)" || exit 1
diff --git a/git-pull-script b/git-pull-script
index dbef56c70b7e40c69517c3ede33544d0e9efcc8a..90ee0f322d8c569a5b02b3be1548eb990b4263c9 100755 (executable)
--- a/git-pull-script
+++ b/git-pull-script
git-resolve-script \
"$(cat "$GIT_DIR"/HEAD)" \
- "$(cat "$GIT_DIR"/MERGE_HEAD)" \
+ "$(cat "$GIT_DIR"/FETCH_HEAD)" \
"$merge_name"
diff --git a/git-resolve-script b/git-resolve-script
index 91b001b9a9afbcadcbacf886dd11821c2aeee1b2..bf2fb2d431da4702cd2b5fe3f414ce22c7ab284d 100755 (executable)
--- a/git-resolve-script
+++ b/git-resolve-script
: ${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
}
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