Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Haberman <stephen@exigencecorp.com>2008-10-15 11:44:35 +0400
committerJunio C Hamano <gitster@pobox.com>2008-10-16 20:23:53 +0400
commit72583e6c685a85b9354ee2310cec3d9240df3c0f (patch)
treee348ea65dcaeda63c3c2b5514da0df9861a5dfce /git-rebase--interactive.sh
parent42f939e4735bc144e1767395e84cffb1bd805a1c (diff)
rebase-i-p: use HEAD for updating the ref instead of mapping OLDHEAD
If OLDHEAD was reordered in the todo, and its mapped NEWHEAD was used to set the ref, commits reordered after OLDHEAD in the todo would should up as un-committed changes. Signed-off-by: Stephen Haberman <stephen@exigencecorp.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh15
1 files changed, 1 insertions, 14 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 30e45237a2..c9681178f7 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -376,20 +376,7 @@ do_next () {
HEADNAME=$(cat "$DOTEST"/head-name) &&
OLDHEAD=$(cat "$DOTEST"/head) &&
SHORTONTO=$(git rev-parse --short $(cat "$DOTEST"/onto)) &&
- if test -d "$REWRITTEN"
- then
- test -f "$DOTEST"/current-commit &&
- current_commit=$(cat "$DOTEST"/current-commit) &&
- git rev-parse HEAD > "$REWRITTEN"/$current_commit
- if test -f "$REWRITTEN"/$OLDHEAD
- then
- NEWHEAD=$(cat "$REWRITTEN"/$OLDHEAD)
- else
- NEWHEAD=$OLDHEAD
- fi
- else
- NEWHEAD=$(git rev-parse HEAD)
- fi &&
+ NEWHEAD=$(git rev-parse HEAD) &&
case $HEADNAME in
refs/*)
message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO)" &&