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

Re: [PATCH] git checkout: create unparented branch by --orphan

From
Erick Mattos <erick.mattos@gmail.com>
Date
Mar 20, 2010, 20:36 UTC
Message-ID
<55bacdd31003201336u685f4b91u5206ca719609d153@mail.gmail.com>
In-Reply-To
<7v4okad9by.fsf@alter.siamese.dyndns.org>
2010/3/20 Junio C Hamano <gitster@pobox.com>:
Show 40 quoted lines
> Erick Mattos <erick.mattos@gmail.com> writes:
>
>>> With local changes in the index/working tree without "start commit" (which
>>> should never fail) and with "start commit" (which should fail if HEAD and
>>> start commit has differences to the same paths as you have local changes
>>> to).
>>
>> It is behaving like that already and that is intrinsically a
>> switch_branches() logic, not a special --orphan need.  It is not part
>> of this implementation and It is probably tested elsewhere (you
>> probably do know where).
>>
>>> Also you would want to check with -t, --no-t, branch.autosetupmrebe set to
>>> always in the configuration with -t and without -t from the command line,
>>
>> The actual implementation is just ignoring track and -t is not even
>> allowed.  So it is pointless.
>
> I think you misunderstood the point of having tests.  It is not about
> demonstrating that you did a good job implementing the new feature, or
> your implementation works as advertised in the submitted form.  That is
> the job of the review process before patch acceptance.
>
> Tests are to pretect what you perfected during the patch acceptance review
> from getting broken by other people in the future, while you are not
> closely monitoring the mailing list traffic.  Many people, me included,
> tend to concentrate on their own new addition, without being careful
> enough not to break the existing features.  If "-t --orphan" should result
> in an error, it should result in an error even after somebody restructures
> the code, so it is not sufficient that it is obvious in the _current_ code
> structure that breakage of that feature is unlikely.
>
> If you can promise that you will be around on this list forever, and that
> every time somebody posts patches to the related areas, you will make sure
> that the changes do not inadvertently break this feature and respond to
> the patches that do break it before they hit my tree, then theoretically
> we do not need to have any test to make sure this feature keeps working as
> advertised.  But we cannot ask that kind of time/attention commitment from
> anybody.
>

All right then. I am going to check it too. But in this particular case, the track is being ignored completely. So to break this behavior people will need to add code to --orphan.

That's not a break, it's a linkage!  :-)
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “git checkout: create unparented branch by --orphan”
  1. git checkout: create unparented branch by --orphanErick Mattos, Mar 18, 2010
  2. Junio C HamanoMar 20, 2010
  3. Erick MattosMar 20, 2010
  4. Junio C HamanoMar 20, 2010
  5. Erick MattosMar 20, 2010
  6. Junio C HamanoMar 20, 2010
  7. Erick MattosMar 20, 2010

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.