Re: [BUG] git-rebase fails when a commit message contains a diff
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 9, 2007, 02:28 UTC
- Message-ID
- <Pine.LNX.4.64.0711090225110.4362@racer.site>
- In-Reply-To
- <7v640cxitc.fsf@gitster.siamese.dyndns.org>
Hi,
On Thu, 8 Nov 2007, Junio C Hamano wrote:
Show 8 quoted lines
> 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.
Hmm. I don't know, really. I had the impression that the "git format-patch | git am" pipeline would be faster.
But if we were to do this, we'd get a progress meter for free. And bugs exposed, no doubt.
> Makefile | 2 +- > git-rebase--interactive.sh => git-rebase.sh | 14 ++++++++++---- > 2 files changed, 11 insertions(+), 5 deletions(-)
What about the existing git-rebase.sh?
Show 14 quoted lines
> 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
> @@ -346,6 +347,9 @@ do_rest () {
> while test $# != 0
> do
> case "$1" in
> + --interactive|-i)
> + INTERACTIVE=t
> + ;;There is already a case for that, further down.
Show 12 quoted lines
> @@ -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
Would that not be easier to read as
test t = "$INTERACTIVE" && git_editor "$TODO" || die "Could not execute editor"
Hmm?
Ciao, Dscho