summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2295e8d)
raw | patch | inline | side by side (parent: 2295e8d)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 22 Dec 2006 23:21:55 +0000 (15:21 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 22 Dec 2006 23:21:55 +0000 (15:21 -0800) |
An earlier commit made "reset --hard" chattier but leaking its
message from "git rebase" (which calls it when first rewinding
the current branch to prepare replaying our own changes) without
explanation was confusing, so add an extra message to mention
it. Inside restorestate in merge (which is rarely exercised
codepath, where more than one strategies are attempted),
resetting to the original state uses "reset --hard" -- this can
be squelched entirely.
Signed-off-by: Junio C Hamano <junkio@cox.net>
message from "git rebase" (which calls it when first rewinding
the current branch to prepare replaying our own changes) without
explanation was confusing, so add an extra message to mention
it. Inside restorestate in merge (which is rarely exercised
codepath, where more than one strategies are attempted),
resetting to the original state uses "reset --hard" -- this can
be squelched entirely.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-merge.sh | patch | blob | history | |
git-rebase.sh | patch | blob | history |
diff --git a/git-merge.sh b/git-merge.sh
index 4ebfcf65d99f7743048df901b38969c28cc11edb..aec215e725826fb18a4d3d75408aa44acdd3e5de 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
restorestate() {
if test -f "$GIT_DIR/MERGE_SAVE"
then
- git reset --hard $head
+ git reset --hard $head >/dev/null
cpio -iuv <"$GIT_DIR/MERGE_SAVE"
git-update-index --refresh >/dev/null
fi
diff --git a/git-rebase.sh b/git-rebase.sh
index 2b4f3477fa941afe4f6450f74f6f8cf43a7567c0..ece31425d08a7fc2758b769afac65c37956d20cb 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
fi
# Rewind the head to "$onto"; this saves our current head in ORIG_HEAD.
+echo "First, rewinding head to replay your work on top of it..."
git-reset --hard "$onto"
# If the $onto is a proper descendant of the tip of the branch, then