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

Re: Operations on unborn branch

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 28, 2012, 07:12 UTC
Message-ID
<7vd2yyi4l1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CANiSa6g2UQyvOWS+nuc6y=wzfFTVJ6G8OK14KOs5DJ3f-n5vOw@mail.gmail.com>
Martin von Zweigbergk <martinvonz@gmail.com> writes:
Show 9 quoted lines
> On Tue, Nov 27, 2012 at 12:25 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Martin von Zweigbergk <martinvonz@gmail.com> writes:
>>
>>> simplify a lot of things (maybe I'm biased because of the things I
>>> have happened to work on?)
>>
>> Yes.  Do not waste time on it.
>
> Yes, no way I would waste time on that; I was mostly just curious.

You have to special case the edges whichever way you go. You can always add such a fixed parent commit whenever you create a new root commit, but then the codepath that currently relies on the real root commit not having any parent start needing to notice if the parent is the fixed fake commit and exclude it from thee history. Or you can create a new root commit as parent-less like we currently do, and any history examination do not have to special case "ah, I thought there is a parent commit, but that turns out to be the fake one, so I need to ignore it." Creation of a root commit is a one-time operation in any sane history; if we have to have special cases somewhere anyway, it is better to have them in these one-time operation codepaths.

Previous: Martin von ZweigbergkNext: Martin von Zweigbergk
Message 4 of 18 in “Operations on unborn branch”
  1. Martin von ZweigbergkNov 27, 2012
  2. Junio C HamanoNov 27, 2012
  3. Martin von ZweigbergkNov 27, 2012
  4. Junio C HamanoNov 28, 2012
  5. Martin von ZweigbergkNov 30, 2012
  6. 0/2 Fix "git reset" on unborn branchMartin von Zweigbergk, Nov 29, 2012
  7. 1/2 reset: learn to reset to treeMartin von Zweigbergk, Nov 29, 2012
  8. Junio C HamanoNov 29, 2012
  9. Martin von ZweigbergkNov 29, 2012
  10. Junio C HamanoNov 29, 2012
  11. Junio C HamanoNov 29, 2012
  12. Martin von ZweigbergkNov 29, 2012
  13. Martin von ZweigbergkNov 30, 2012
  14. Junio C HamanoDec 1, 2012
  15. Martin von ZweigbergkDec 5, 2012
  16. Junio C HamanoDec 5, 2012
  17. Martin von ZweigbergkDec 5, 2012
  18. 2/2 reset: learn to reset on unborn branchMartin von Zweigbergk, Nov 29, 2012

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.