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

Re: Tracking branch history

From
Daniel Barkalow <barkalow@iabervon.org>
Date
May 13, 2006, 04:27 UTC
Message-ID
<Pine.LNX.4.64.0605122358490.6713@iabervon.org>
In-Reply-To
<Pine.LNX.4.64.0605121656350.3866@g5.osdl.org>
On Fri, 12 May 2006, Linus Torvalds wrote:
Show 13 quoted lines
> Btw, the real problem with this is how to use it.
> 
> The only really valid use I see is to use it for date-based things, ie if 
> given a date, look up the most recent commit ID that is older than the 
> date in question. No other op seems to really make sense, but that one 
> does.
> 
> Now, the one other operation that is semantically sensible is to use the 
> list of commits to figure out a "path" through the commit space. However, 
> that path won't actually even be well-defined (a fast-forward pull/merge 
> can and often /will/ update the history in a way where it's impossible to 
> select one particular path to the previous commit listed in the commit 
> log).

I think that jumping around with reset is necessary to make this actually complicated; a fast-forward only happens if the new value descends from the old value, and a merge obviously descends from the old value. Sure, the non-linear history added by a merge will still be non-linear, but from the local user's point of view, it was all added in bulk by the merge.

I think the program creating the history should note the tricky cases, where the new value doesn't descend from the old value, which should be easy to identify. I'm not sure what should actually be done to report a reset in a changelog, either. The section of the log just before the reset is clearly a false start of some sort, and you probably want to do something special to list the commits which don't actually lead to the current state, but you probably want to report them, in case the reason you'd looking through this is that there was some benefit to a version that you ended up discarding, and you want to revisit that attempt.

I think in the always-forward case, there's a useful optimization to be had by having the rev-list-equivalent actually binning commits by the earliest points that descend from them, so you don't trace the local branch back to where other branches forked off over and over. But it seems to me otherwise pretty simple.

	-Daniel
*This .sig left intentionally blank*
Previous: Linus TorvaldsNext: Shawn Pearce
Message 4 of 21 in “Tracking branch history”
  1. Daniel BarkalowMay 12, 2006
  2. Linus TorvaldsMay 12, 2006
  3. Linus TorvaldsMay 13, 2006
  4. Daniel BarkalowMay 13, 2006
  5. Shawn PearceMay 13, 2006
  6. Linus TorvaldsMay 13, 2006
  7. Junio C HamanoMay 13, 2006
  8. Shawn PearceMay 13, 2006
  9. Shawn PearceMay 13, 2006
  10. Linus TorvaldsMay 13, 2006
  11. Junio C HamanoMay 13, 2006
  12. Shawn PearceMay 13, 2006
  13. Junio C HamanoMay 14, 2006
  14. Shawn PearceMay 15, 2006
  15. Shawn PearceMay 15, 2006
  16. Junio C HamanoMay 15, 2006
  17. Shawn PearceMay 15, 2006
  18. Shawn PearceMay 15, 2006
  19. Linus TorvaldsMay 13, 2006
  20. ElrondMay 13, 2006
  21. Junio C HamanoMay 14, 2006

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.