From: Junio C Hamano <gitster@pobox.com>
To: Jonas Fonseca <fonseca@diku.dk>
Cc: git@vger.kernel.org, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [BUG] git-rebase fails when a commit message contains a diff
Date: Thu, 08 Nov 2007 18:18:39 -0800 [thread overview]
Message-ID: <7v640cxitc.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vhcjwxk1s.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Thu, 08 Nov 2007 17:51:59 -0800")
I wonder if this is a sensible thing to do, regardless of the
issue of commit log message that contains anything.
The patch replaces git-rebase with git-rebase--interactive. The
only difference from the existing "git-rebase -i" is if the
command is called without "-i" the initial "here is the to-do
list. please rearrange the lines, modify 'pick' to 'edit' or
whatever as appropriate" step is done without letting the user
edit the list.
---
Makefile | 2 +-
git-rebase--interactive.sh => git-rebase.sh | 14 ++++++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 0d5590f..f0e5e38 100644
--- a/Makefile
+++ b/Makefile
@@ -214,7 +214,7 @@ SCRIPT_SH = \
git-clean.sh git-clone.sh git-commit.sh \
git-ls-remote.sh \
git-merge-one-file.sh git-mergetool.sh git-parse-remote.sh \
- git-pull.sh git-rebase.sh git-rebase--interactive.sh \
+ git-pull.sh git-rebase.sh \
git-repack.sh git-request-pull.sh \
git-sh-setup.sh \
git-am.sh \
diff --git a/git-rebase--interactive.sh b/git-rebase.sh
similarity index 98%
rename from git-rebase--interactive.sh
rename to git-rebase.sh
index 76dc679..1dd6f6d 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase.sh
@@ -11,7 +11,7 @@
# http://article.gmane.org/gmane.comp.version-control.git/22407
USAGE='(--continue | --abort | --skip | [--preserve-merges] [--verbose]
- [--onto <branch>] <upstream> [<branch>])'
+ [--interactive] [--onto <branch>] <upstream> [<branch>])'
. git-sh-setup
require_work_tree
@@ -25,6 +25,7 @@ REWRITTEN="$DOTEST"/rewritten
PRESERVE_MERGES=
STRATEGY=
VERBOSE=
+INTERACTIVE=
test -d "$REWRITTEN" && PRESERVE_MERGES=t
test -f "$DOTEST"/strategy && STRATEGY="$(cat "$DOTEST"/strategy)"
test -f "$DOTEST"/verbose && VERBOSE=t
@@ -346,6 +347,9 @@ do_rest () {
while test $# != 0
do
case "$1" in
+ --interactive|-i)
+ INTERACTIVE=t
+ ;;
--continue)
comment_for_reflog continue
@@ -504,9 +508,11 @@ EOF
die_abort "Nothing to do"
cp "$TODO" "$TODO".backup
- git_editor "$TODO" ||
- die "Could not execute editor"
-
+ case "$INTERACTIVE" in
+ t)
+ git_editor "$TODO" || die "Could not execute editor"
+ ;;
+ esac
has_action "$TODO" ||
die_abort "Nothing to do"
next prev parent reply other threads:[~2007-11-09 2:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 1:12 [BUG] git-rebase fails when a commit message contains a diff Jonas Fonseca
2007-11-09 1:39 ` Junio C Hamano
2007-11-09 1:51 ` Junio C Hamano
2007-11-09 2:18 ` Junio C Hamano [this message]
2007-11-09 2:28 ` Johannes Schindelin
2007-11-09 2:37 ` Junio C Hamano
2007-11-09 14:19 ` Johannes Schindelin
2007-11-11 22:31 ` Björn Steinbrink
2007-11-09 7:57 ` Benoit Sigoure
2007-11-09 8:57 ` Johannes Sixt
2007-11-09 9:05 ` Ralf Wildenhues
2007-11-09 9:07 ` Benoit Sigoure
2007-11-09 13:20 ` Johannes Schindelin
2007-11-09 10:29 ` Andreas Ericsson
2007-11-09 7:03 ` Steffen Prohaska
2007-11-09 14:18 ` Johannes Schindelin
2007-11-09 14:29 ` Steffen Prohaska
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=7v640cxitc.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=fonseca@diku.dk \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.