All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: git@vger.kernel.org, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] Completion: Hint whether amend is the right thing to do.
Date: Wed, 28 May 2008 08:53:40 -0700	[thread overview]
Message-ID: <7v63sywhkr.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <200805281608.02000.robin.rosenberg.lists@dewire.com> (Robin Rosenberg's message of "Wed, 28 May 2008 16:08:01 +0200")

Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:

> When you get a conflict during interactive rebase the next
> thing to do is not to amend, but to continue the rebase.
> With this change you get a reminder in the prompt.
>
> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
> ---
>  contrib/completion/git-completion.bash |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
>
> I got a couple of broken rebases. Hence this fix.
>
> -- robin
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 1698463..a606328 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -82,7 +82,12 @@ __git_ps1 ()
>  			b="$(git symbolic-ref HEAD 2>/dev/null)"
>  		elif [ -f "$g/.dotest-merge/interactive" ]
>  		then
> -			r="|REBASE-i"
> +			if [ -f "$g/.dotest-merge/amend" ]
> +			then
> +				r="|REBASE-i-amend"
> +			else
> +				r="|REBASE-i-continue"
> +			fi
>  			b="$(cat "$g/.dotest-merge/head-name")"
>  		elif [ -d "$g/.dotest-merge" ]
>  		then
> -- 
> 1.5.5.1.178.g1f811

Hmm.  The "|REBASE-blah" prefix is already too long for my liking and this
makes it even longer X-<

Does this mean that it would help reduce mistakes if "git commit --amend"
noticed the presense of .dotest-merge but absense of .dotest-merge/amend
and refused to operate, I have to wonder?

  reply	other threads:[~2008-05-28 15:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 14:08 [PATCH] Completion: Hint whether amend is the right thing to do Robin Rosenberg
2008-05-28 15:53 ` Junio C Hamano [this message]
2008-05-28 23:16   ` Shawn O. Pearce
2008-05-28 23:33   ` Robin Rosenberg
2008-05-28 23:39     ` Junio C Hamano
2008-05-28 23:45       ` Shawn O. Pearce

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=7v63sywhkr.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg.lists@dewire.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 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.