From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] rebase -i: move help to end of todo file
Date: Thu, 22 Nov 2007 12:30:10 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0711221225570.27959@racer.site> (raw)
In-Reply-To: <7vbq9m5wpa.fsf@gitster.siamese.dyndns.org>
Hi,
On Thu, 22 Nov 2007, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > How about this? I am hesitant to remove _everything_, since quite
> > a few people seem to be allergic to man pages, so they fire up
> > rebase -i without any clue.
>
> Oh, I wouldn't dream of suggesting complete removal of the help
> text,
I meant to "move" everything. Sorry.
> but leaving the single line at the beginning is not an improvement.
> What's on that single line is not particularly useful but that is a
> separate issue.
Okay, so you'd like this better?
-- snipsnap --
[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>
---
git-rebase--interactive.sh | 14 ++++++++------
t/t3404-rebase-interactive.sh | 3 ++-
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index a6dc72a..58fde89 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -479,8 +479,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
@@ -488,12 +493,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"
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index f1039d1..907c7f9 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -149,7 +149,8 @@ test_expect_success 'stop on conflicting pick' '
diff -u expect .git/.dotest-merge/patch &&
diff -u expect2 file1 &&
test 4 = $(grep -v "^#" < .git/.dotest-merge/done | wc -l) &&
- test 0 = $(grep -v "^#" < .git/.dotest-merge/git-rebase-todo | wc -l)
+ test 0 = $(grep -ve "^#" -e "^$" < .git/.dotest-merge/git-rebase-todo |
+ wc -l)
'
test_expect_success 'abort' '
--
1.5.3.6.1977.g54d30
next prev parent reply other threads:[~2007-11-22 12:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-22 9:21 Reordering lines in "git-rebase -i" task sheet Junio C Hamano
2007-11-22 11:15 ` [PATCH] rebase -i: move help to end of todo file Johannes Schindelin
2007-11-22 11:41 ` [PATCH] Adjust t3404 to ignore empty lines in the " Johannes Schindelin
2007-11-22 11:46 ` [PATCH] rebase -i: move help to end of " Junio C Hamano
2007-11-22 12:30 ` Johannes Schindelin [this message]
2007-11-22 12:31 ` Jeff King
2007-11-22 11:18 ` [PATCH] rebase -i: give rerere a chance Johannes Schindelin
2007-11-29 0:17 ` Junio C Hamano
2007-11-29 0:22 ` Johannes Schindelin
2007-11-29 9:59 ` David Kastrup
2007-11-22 19:25 ` Reordering lines in "git-rebase -i" task sheet David Brown
2007-11-22 22:11 ` Johannes Schindelin
2007-11-23 8:54 ` Andy Parkins
2007-11-26 13:14 ` Andy Parkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0711221225570.27959@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).