summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-11-22 12:30:10 +0000
committerJunio C Hamano <gitster@pobox.com>2007-11-22 15:35:06 -0800
commit6047a234c5a6aef58c72a35feba326484f07660d (patch)
treed9bc20c08e285715ec074b96fdd5d90beb201fa6 /git-rebase--interactive.sh
parenta00a42ae33708caa742d9e9fbf10692cfa42f032 (diff)
downloadgit-6047a234c5a6aef58c72a35feba326484f07660d.tar.gz
rebase -i: move help to end of todo file
[PATCH] rebase -i: move help to end of todo file Many editors start in the first line, so the 9-line help text was an annoyance. So move it to the end. Requested by Junio. While at it, add a hint how to abort the rebase. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 66c80d4e16..bf44b6af58 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -485,8 +485,13 @@ do
SHORTUPSTREAM=$(git rev-parse --short $UPSTREAM)
SHORTHEAD=$(git rev-parse --short $HEAD)
SHORTONTO=$(git rev-parse --short $ONTO)
- cat > "$TODO" << EOF
-# Rebasing $SHORTUPSTREAM..$SHORTHEAD onto $SHORTONTO
+ git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
+ --abbrev=7 --reverse --left-right --cherry-pick \
+ $UPSTREAM...$HEAD | \
+ sed -n "s/^>/pick /p" > "$TODO"
+ cat >> "$TODO" << EOF
+
+# Rebase $SHORTUPSTREAM..$SHORTHEAD onto $SHORTONTO
#
# Commands:
# pick = use commit
@@ -494,12 +499,9 @@ do
# squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
+# However, if you remove everything, the rebase will be aborted.
#
EOF
- git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
- --abbrev=7 --reverse --left-right --cherry-pick \
- $UPSTREAM...$HEAD | \
- sed -n "s/^>/pick /p" >> "$TODO"
has_action "$TODO" ||
die_abort "Nothing to do"