public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Orgad Shaneh <orgads@gmail.com>, git <git@vger.kernel.org>
Cc: "brian m . carlson" <sandals@crustytoothpaste.net>
Subject: Re: Supporting --no-edit for git rebase --continue
Date: Fri, 9 Feb 2024 16:16:22 +0000	[thread overview]
Message-ID: <fbf859ca-43f4-433e-b111-377aa60f1947@gmail.com> (raw)
In-Reply-To: <CAGHpTB+mCxvzJ4LDpQrMgHmzigUzcAnRcwMewV0oYKM2HwbNXw@mail.gmail.com>

Hi Orgad

On 07/02/2024 20:46, Orgad Shaneh wrote:
> Hi,
> 
> Is it possible to add --no-edit for git rebase --continue, similar to
> the functionality of this flag for git cherry-pick --continue and
> similar commands?
> 
> This should continue the rebase without activating the commit message
> editor, and just keep the existing message.

I think being able to say "git rebase --continue --no-edit" to stop
rebase prompting for a commit message when resolving a conflict would
be useful but it would need to be careful that it did not suppress the
editor for "reword", "squash", or "fixup" commands. You can use an
alias that only runs the editor if HEAD has changed since the rebase
was continued to do this

     git config alias.rbc-no-edit '!
         no_edit_head=$(git show-ref -s --verify HEAD) &&
         real_editor="$(git var GIT_EDITOR)" &&
         GIT_EDITOR="test \"\$(git show-ref -s --verify HEAD)\" = \"$no_edit_head\" || \
             $real_editor" git rebase --continue'

Best Wishes

Phillip

      parent reply	other threads:[~2024-02-09 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 20:46 Supporting --no-edit for git rebase --continue Orgad Shaneh
2024-02-09  1:38 ` brian m. carlson
2024-02-09 13:35   ` Orgad Shaneh
2024-02-09 16:16 ` Phillip Wood [this message]

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=fbf859ca-43f4-433e-b111-377aa60f1947@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=orgads@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sandals@crustytoothpaste.net \
    /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