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

Re: [PATCH v2] name_rev: add support for --cherry-picks

From
Jeff King <peff@peff.net>
Date
Jul 27, 2018, 08:40 UTC
Message-ID
<20180727084039.GB11932@sigill.intra.peff.net>
In-Reply-To
<xmqqr2jpq0s1.fsf@gitster-ct.c.googlers.com>
On Thu, Jul 26, 2018 at 12:01:34PM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> Tejun Heo <tj@kernel.org> writes:
> 
> > I should have explained the use case better.
> 
> No, you did not need to.  I was not saying the feature is not useful.
> I was only saying that "explain where in the history X sits" command
> (i.e. "name-rev X" and "describe X") did not look like a good place
> to have that feature.
Just brainstorming a few reasons you might not want it tied to name-rev:
 - the set of names might be distinct from the set of commits you'd want
   to traverse.  For instance, you might want to use "name-rev --tags",
   but find cherry-picks even on untagged branches (e.g., "--all").
 - instead of naming commits, you might want to see the information as
   you are viewing git-log output ("by the way, this was cherry-picked
   elsewhere, too")

So I kind of wonder if it would be more useful to have a command which incrementally updates a git-notes tree to hold the mapping, and then learn to consult it in various places. "git log --notes=reverse-cherry" would show it, though it might be worth teaching the notes-display code that certain types of notes contain object ids (so it would be interesting to recursively show their notes, or format them nicely, etc).

I dunno. That is perhaps over-engineering. But it feels like "reverse-map the cherry-picks" is orthogonal to the idea of name-rev.

-Peff
Previous: Junio C HamanoNext: Tejun Heo
Message 6 of 8 in “name_rev: add support for --cherry-picks”
  1. name_rev: add support for --cherry-picksTejun Heo, Jul 26, 2018
  2. name_rev: add support for --cherry-picksTejun Heo, Jul 26, 2018
  3. Junio C HamanoJul 26, 2018
  4. Tejun HeoJul 26, 2018
  5. Junio C HamanoJul 26, 2018
  6. Jeff KingJul 27, 2018
  7. Tejun HeoJul 27, 2018
  8. Junio C HamanoJul 27, 2018

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.