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

Re: Detecting redundant commits

From
David Greene <greened@obbligato.org>
Date
Jan 5, 2016, 16:31 UTC
Message-ID
<49661552-EBD9-4F45-9F31-54B217AE3350@obbligato.org>
In-Reply-To
<20160105040026.GB22620@sigill.intra.peff.net>
On January 4, 2016 10:00:26 PM CST, Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
>Or do you mean commits that, when applied, we find turn out to have
>empty changes (e.g., because we have a set of commits that have
>different patch-ids, but do roughly the same thing)? I don't think you
>can find that with a straight end-to-end diff. You have try to apply
>and
>then look at the result. I think we already catch that case (see
>--allow-empty), though I think the only options are "preserve" or
>"abort", not "silently skip" (and it sounds like the latter is what you
>would want).
This.  I see where --allow-empty is handled in prepare_to_commit but it is not so easy to skip the commit at that point due to state changes.  I was trying to avoid going into commit at all by determining ahead of time whether the commit would become empty.  Any ideas?
David
Previous: Jeff KingNext: David A. Greene
Message 3 of 4 in “Detecting redundant commits”
  1. greened@obbligato.orgJan 4, 2016
  2. Jeff KingJan 5, 2016
  3. David GreeneJan 5, 2016
  4. David A. GreeneJan 8, 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.