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

(unknown)

From
David Greene <greened@obbligato.org>
Date
Dec 16, 2015, 03:02 UTC
Message-ID
<1450234966-28796-1-git-send-email-greened@obbligato.org>

This patch isn't ready for prime-time yet but I wanted to get it out for some discussion.

While cleaning up and enhancing git-subtree, I've come across the need to have rebase behave nicely in the case of empty and redundant commits. There's a case in pick_one_preserving_merges where git-cherry pick is used to process the rebase and if cherry-pick fails, the rebase aborts. This change does two things:

- If --keep-empty is specified, invoke cherry-pick with --allow-empty.
- If new option --keep-redundant is specified, invoke cherry-pick with
  --keep-redundant-commits.

This allows the rebase to go forward without intrruption in the included tests.

I will also need a third option that has cherry-pick ignore redundant commits and remove them from the history. Unfortunately, I can't make out exactly how to do that in commit.c, which is where I gather the cherry-pick stuff happens. I'll need some help with that if there's general agreement that this is a useful enhancement.

During the course of developing this, I've encountered some strange rebase behavior. I'll send another message about that.

I'd appreciate feedback on this direction and any help with the cherry-pick stuff. Thanks!

                         -David
Next: David Greene
Message 1 of 5 in “(unknown)”
  1. David GreeneDec 16, 2015
  2. Support rebase --keep-empty and --keep-redundantDavid Greene, Dec 16, 2015
  3. Junio C HamanoDec 16, 2015
  4. Patrick SteinhardtDec 16, 2015
  5. David GreeneDec 18, 2015

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.