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

Re: [RFC/PATCH] log: add log.firstparent option

From
Jeff King <peff@peff.net>
Date
Jul 24, 2015, 18:13 UTC
Message-ID
<20150724181322.GB17730@peff.net>
In-Reply-To
<xmqqd1zhoave.fsf@gitster.dls.corp.google.com>
On Fri, Jul 24, 2015 at 08:04:21AM -0700, Junio C Hamano wrote:
Show 23 quoted lines
> > I think a really simple example is something like:
> >
> >   1. somebody implements as feature. It needs to handle cases a, b, and
> >      c, but it only handles case a. Therefore it is buggy.
> >
> >   2. During review, somebody notices case b, and a new commit is made to
> >      fix it. Nobody notices case c.
> >
> >   3. The topic is merged.
> >
> >   4. Much later, somebody notices the system is buggy and hunts in the
> >      history.
> [...]
> 
> I actually do not think the above is quite true.  In our kind of
> "clean history, we do not squash 1 & 2.  See Paul's "rewrite am in
> C" series, for example, that starts from a "buggy" (in the sense
> that it does almost nothing in the beginning and then gradually
> builds on).
> 
> Instead, even somebody did not have foresight to realize 'b' when
> she adds code to handle 'a', we would make sure the solution for 'a'
> is sufficiently clearly described in commit #1.

Sometimes. There's definitely human wisdom going into the decision to squash or make a new commit, which is a good thing. Here's a counter-example to the am series. When I wrote the object-freshening code, I accidentally inverted the test for checking whether packs were fresh. This was noticed in review, and I corrected it by inverting the is_fresh function. But in doing so, I introduced a new bug, where the test for loose objects was inverted.

The original fix was squashed in the re-roll, but much later we noticed and diagnosed that new bug. It was very valuable to me to read the mailing list archive to see what happened, because the fact that there _was_ a bug fix was lost in the clean history.

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 25 of 32 in “log: add log.firstparent option”
  1. log: add log.firstparent optionJeff King, Jul 23, 2015
  2. Config variables and scripting // was Re: [RFC/PATCH] log: add log.firstparent optionDavid Aguilar, Jul 23, 2015
  3. Jeff KingJul 23, 2015
  4. Jeff KingJul 23, 2015
  5. Jacob KellerJul 23, 2015
  6. Jeff KingJul 23, 2015
  7. Jacob KellerJul 23, 2015
  8. Michael J GruberJul 23, 2015
  9. Jeff KingJul 23, 2015
  10. Junio C HamanoJul 23, 2015
  11. Stefan BellerJul 23, 2015
  12. Jeff KingJul 24, 2015
  13. Jacob KellerJul 24, 2015
  14. Jeff KingJul 24, 2015
  15. Junio C HamanoJul 24, 2015
  16. Jeff KingJul 25, 2015
  17. Jeff KingJul 25, 2015
  18. Junio C HamanoJul 25, 2015
  19. Jeff KingJul 27, 2015
  20. Junio C HamanoJul 23, 2015
  21. Jacob KellerJul 24, 2015
  22. Jeff KingJul 24, 2015
  23. Jacob KellerJul 24, 2015
  24. Junio C HamanoJul 24, 2015
  25. Jeff KingJul 24, 2015
  26. Jeff KingJul 24, 2015
  27. Jeff KingJul 24, 2015
  28. Junio C HamanoJul 24, 2015
  29. Jeff KingJul 25, 2015
  30. Junio C HamanoJul 25, 2015
  31. Jacob KellerJul 25, 2015
  32. Jeff KingJul 27, 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.