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

[PATCH] Teach cherry-pick and rebase to ignore redundant commits

From
David Greene <greened@obbligato.org>
Date
Jan 11, 2016, 05:00 UTC
Message-ID
<1452488421-26823-1-git-send-email-greened@obbligato.org>

This patch set adds a --skip-redundant-commits option to both cherry-pick and rebase. Currently, if cherry-pick applies a commit that happens to become empty after conflict resolution, it will abort and ask the user what to do. This behavior propagates to rebase when rebase is forced to fall back to cherry-pick in certain situations.

This abort failure mode makes it difficult to script certain types of operations that users might expect to work: for example cherry-picking a commit on top of itself or rebasing a set of commits back onto its own history.

With --skip-redundant commits users and/or scripts can choose to have cherry-pick/rebase simply ignore the redundant commit and move on. There is already a --keep-redundant-commits flag so this is really just supplying the natural counter-behavior users might way.

                     -Davod
Next: David Greene
Message 1 of 9 in “Teach cherry-pick and rebase to ignore redundant commits”
  1. Teach cherry-pick and rebase to ignore redundant commitsDavid Greene, Jan 11, 2016
  2. 1/5 Teach cherry-pick to skip redundant commits if askedDavid Greene, Jan 11, 2016
  3. Junio C HamanoJan 11, 2016
  4. David A. GreeneJan 12, 2016
  5. 2/5 Add test for cherry-pick --skip-redundant-commitsDavid Greene, Jan 11, 2016
  6. 3/5 Add --skip-redundant-commits option to rebaseDavid Greene, Jan 11, 2016
  7. 4/5 Add test for redundant rebaseDavid Greene, Jan 11, 2016
  8. 5/5 Add test for rebase with merges amd redundant commitsDavid Greene, Jan 11, 2016
  9. Eric SunshineJan 11, 2016

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.