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

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

From
Jacob Keller <jacob.keller@gmail.com>
Date
Jul 24, 2015, 06:07 UTC
Message-ID
<CA+P7+xoOkTfair3M7HH_TPs9qxBAUR5GodHGDuw8Ux_HaUvvyQ@mail.gmail.com>
In-Reply-To
<xmqqpp3io5km.fsf@gitster.dls.corp.google.com>
On Thu, Jul 23, 2015 at 3:46 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 36 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> But other projects prefer to keep the messy history intact.
>> For one thing, it makes collaboration on a topic easier, as
>> developers can simply pull from each other during the messy
>> development. And two, that history may later be useful when
>> tracking down a bug, because it gives more insight into the
>> actual thought process of the developer.
>>
>> But in this latter case you want _two_ views of history. You
>> may want to see the "simple" version in which a series of
>> fully-formed topics hit the branch (and you would like to
>> see the diff of their final form). Or you may want to see
>> the messy details, because you are digging into a bug
>> related to the topic.
>
> While I can see the reasoning behind the above [*1*], I am not sure
> if the output with "--first-parent" would always be a good match for
> the "simple" version.  Wouldn't the people who keep these messy
> histories also those who merge project trunk into a random topic and
> push the result back as the updated project trunk?  Admittedly, that
> merely is saying that "--first-parent" is not a solution to such a
> project, and does not say much about the usefulness of the new
> configuration, so I'd queue it as-is.
>
> [Footnote]
>
> *1* I do not necessarily agree, though.  The history being messy is
>     a sign that "the actual thought process of the developer" was
>     not clearly expressed in the work, and it is not likely that you
>     have more insight by looking at it---you will see more mess, for
>     certain, though.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Based on the work I've done with people who don't mind "messy" history, I find that they tend to break the first-parent rule fairly often, and I don't personally find much value in the "mess" of their history. However, I think the ability for git-am to see a patch series cover-letter and include a merge message would be valuable, as there is often information lost in the cover letter when you apply a series. I'm not sure how much work this would take in practice though.

I think some projects definitely benefit from the first-parent setup, and it could be valuable, but I do tend to agree with Junio here that the mess is always helpful. If may be helpful if people's commit messages on that mess are good, but generally those that don't take the time to rebase local work and re-express the commit messages are not going to leave insightful messages the first time. However, have the ability to view history this way is still possibly valuable.

Regards, Jake

Previous: Junio C HamanoNext: Jeff King
Message 21 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.