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

Re: [PATCH 2/2] Add a 'source' decorator for commits

From
Jeff King <peff@peff.net>
Date
Oct 28, 2008, 19:29 UTC
Message-ID
<20081028192942.GA752@sigill.intra.peff.net>
In-Reply-To
<alpine.LFD.2.00.0810280755570.3386@nehalem.linux-foundation.org>
On Tue, Oct 28, 2008 at 08:17:02AM -0700, Linus Torvalds wrote:
Show 8 quoted lines
> >   - Does it make sense to have this _in addition_ to --decorate (since
> >     for any commit with a --decorate field, it would likely be the same
> >     as --source)? Should it be a different type of decorate instead,
> >     like --decorate=source or --decorate=branch?
> 
> I think they are different. People who want --source generally have other 
> issues than people who want --decorate, and the two do actually work 
> together.

Sleeping on this and thinking about it some more, I think you are right here, and all of the other complaints I had just go away.

I was thinking of it as "decorate commits with the likely branches they were made on." But that's not what this is at all (though it happens to come up with similar answers!). It's really about "show which ref, of the refs which were requested to be shown, we started at to reach this commit." Which is perhaps more limited, but obvoiusly is much faster to compute.

And then the output of "git log --source HEAD" makes perfect sense, and it makes sense not to worry about finding the "closest" ref. It is really about annotating the traversal that you asked for.

So now my only complaint is the lack of documentation and tests. ;)
-Peff
Previous: Linus TorvaldsNext: Linus Torvalds
Message 13 of 14 in “Random patches from my tree”
  1. 0/2 Random patches from my treeLinus Torvalds, Oct 27, 2008
  2. 1/2 Add file delete/create info when we overflow rename_limitLinus Torvalds, Oct 27, 2008
  3. 2/2 Add a 'source' decorator for commitsLinus Torvalds, Oct 27, 2008
  4. Jeff KingOct 28, 2008
  5. Pierre HabouzitOct 28, 2008
  6. Pierre HabouzitOct 28, 2008
  7. Jeff KingOct 28, 2008
  8. Jeff KingOct 28, 2008
  9. Pierre HabouzitOct 28, 2008
  10. Jeff KingOct 28, 2008
  11. Linus TorvaldsOct 28, 2008
  12. Linus TorvaldsOct 28, 2008
  13. Jeff KingOct 28, 2008
  14. Linus TorvaldsOct 27, 2008

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.