git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Stefan Haller <lists@haller-berlin.de>,
	phillip.wood@dunelm.org.uk, Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: Interactive rebase: using "pick" for merge commits
Date: Mon, 26 Feb 2024 10:56:51 +0000	[thread overview]
Message-ID: <b4781808-f722-4be5-906f-4c3409c3295c@gmail.com> (raw)
In-Reply-To: <2739325d-93b1-445c-aac9-3e0ec54a27e4@haller-berlin.de>

Hi Stefan

On 23/02/2024 20:59, Stefan Haller wrote:
> On 12.02.24 15:38, Phillip Wood wrote:
>> Hi Patrick and Stefan
 >>
>> It would certainly be possible to extend the sequencer to do that but
>> I'm not familiar with why people use "git cherry-pick -m" [1] so I'm
>> wondering what this would be used for. It would involve a bit of extra
>> complexity so I think we'd want a compelling reason as to why
>> cherry-picking merges without maintaining the topology is useful
>> especially as one can currently do that via "exec git cherry-pick -m ..."
> 
> Ok, I suppose the answer will probably not count as a compelling reason.
> My reason for wanting this is that lazygit currently implements
> cherry-picking in terms of an interactive rebase, rather then calling
> git-cherry-pick. And the reason why it does this is that when you
> cherry-pick multiple commits, and one of them conflicts, then you get
> lazygit's nice visualization of the rebase todo list to show you where
> in the sequence you are, what the conflicting commit is, how many are
> left etc. It just happens to support this well for
> .git/rebase-merge/git-rebase-todo, but not for .git/sequencer/todo.

Thanks for the context. I can see how that is convenient for lazygit 
(and makes we think that perhaps we should teach "git status" to show 
pending cherry-picks) but I'm afraid I don't think that is a good reason 
for adding the ability to pick merges to git rebase.

> It probably makes more sense to teach lazygit to visualize the
> .git/sequencer/todo file, and then use git cherry-pick.

If lazygit is generating the todo list for the cherry-pick could it 
check if the commit is a merge and insert "exec cherry-pick -m ..." for 
those commits? The UI could detect that and display something more user 
friendly for those lines in the todo list. It is still more work for 
lazygit but perhaps less than supporting cherry-picks directly.

Best Wishes

Phillip


  reply	other threads:[~2024-02-26 10:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 15:52 Interactive rebase: using "pick" for merge commits Stefan Haller
2024-02-09 16:24 ` Phillip Wood
2024-02-10  9:23   ` Stefan Haller
2024-02-12  7:15     ` Patrick Steinhardt
2024-02-12 14:38       ` Phillip Wood
2024-02-23 20:59         ` Stefan Haller
2024-02-26 10:56           ` Phillip Wood [this message]
2024-02-26 19:07             ` Stefan Haller
2024-02-27 10:41               ` phillip.wood123
2024-02-12 16:39       ` Junio C Hamano

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=b4781808-f722-4be5-906f-4c3409c3295c@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lists@haller-berlin.de \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    /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).