git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Show skipped commit message after rebase conflict?

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Jul 25, 2025, 14:02 UTC
Message-ID
<184ec60f-9431-43c1-bce3-405bb6b7f959@gmail.com>
In-Reply-To
<xmqqwm7xxn4a.fsf@gitster.g>
On 24/07/2025 23:03, Junio C Hamano wrote:
Show 16 quoted lines
> Cameron Steffen <cam.steffen94@gmail.com> writes:
> 
>> Sometimes I run into a conflict in a rebase and I end up resolving the
>> conflict by removing all the changes. Then when I run `git rebase
>> --continue`, the current commit is skipped and the rebase continues
>> normally. Would it be possible to emit a message showing that the
>> commit was skipped in this case? It isn't very obvious to me in my
>> workflow that that is what occurred.
> 
> I do not know what level of verbosity is needed to grab attention by
> the end user, but something like this might be a good starting
> point?
> 
> Totally untested, and there may be implications (like, control
> passes this point in different situations where the messages is not
> warranted).

I haven't tested it but I suspect this prints the warning when continuing after a "break" command or a failed "exec" command. That is probably a good place to issue such a message but we'd want to check whether rebase_path_message() exists before printing the message. I think we could also read REBASE_HEAD to find out which commit we're skipping if we wanted to make the message a bit more informative.

It would mean that "rebase --skip" also prints this warning but I think that is sensible if we're doing it for "rebase --continue" after removing all the uncommitted changes from the worktree.

Thanks
Phillip
Show 26 quoted lines
> I'll pick a few people from
> 
>      git shortlog --since=2.years --no-merges sequencer.c
> 
> based on their contribution to the file (not counting the internal
> implementation changes) and Cc them to see if they have ideas.
> 
> Thanks.
> 
>   sequencer.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git c/sequencer.c w/sequencer.c
> index 67e4310edc..677d6105dd 100644
> --- c/sequencer.c
> +++ w/sequencer.c
> @@ -5369,6 +5369,8 @@ static int commit_staged_changes(struct repository *r,
>   			goto out;
>   		}
>   
> +		warning(_("omitting a step that has become empty"));
> +
>   		if (!final_fixup) {
>   			ret = 0;
>   			goto out;
> 
Previous: Junio C HamanoNext: Cameron Steffen
Message 3 of 11 in “Show skipped commit message after rebase conflict?”
  1. Cameron SteffenJul 24, 2025
  2. Junio C HamanoJul 24, 2025
  3. Phillip WoodJul 25, 2025
  4. Cameron SteffenJul 25, 2025
  5. Junio C HamanoJul 25, 2025
  6. Cameron SteffenJul 25, 2025
  7. Junio C HamanoJul 26, 2025
  8. Cameron SteffenJul 26, 2025
  9. Johannes SixtJul 26, 2025
  10. Cameron SteffenJul 26, 2025
  11. Junio C HamanoJul 25, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.