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

Re: [RFC/PATCH] replace: add --graft option

From
Junio C Hamano <gitster@pobox.com>
Date
May 19, 2014, 17:25 UTC
Message-ID
<xmqqvbt11y15.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140519111940.GB17492@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> It might make sense to just teach parse_commit_header to be a little
> more thorough; it has to read past those lines anyway to find the author
> and committer lines, so it would not be much more expensive to note
> them.  And then of course the code needs to be pulled out of the
> pretty-printer and made generally accessible.
I notice that you said "might" above.
> That's more or less what Christian's function is doing, though it
> assumes things like that the parents come immediately after the tree,
> and that they are all in a group. Those are all true for objects created
> by git, but I think we can be a little flexible.

The headers up to committer are cast in stone in their ordering, and I do not immediately see how loosening it would be beneficial.

Unless you are trying to give users a new way to record exactly the same commit in twenty-four (or more) ways with their own object names, that is ;-)

Previous: Jeff KingNext: Jeff King
Message 4 of 8 in “replace: add --graft option”
  1. replace: add --graft optionChristian Couder, May 18, 2014
  2. Michael HaggertyMay 19, 2014
  3. Jeff KingMay 19, 2014
  4. Junio C HamanoMay 19, 2014
  5. Jeff KingMay 19, 2014
  6. Junio C HamanoMay 19, 2014
  7. Christian CouderMay 23, 2014
  8. Jeff KingMay 19, 2014

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.