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

Re: "checkout --track -b" broken? (with suggested fix)

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 17, 2008, 23:57 UTC
Message-ID
<7vskqug4fy.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LNX.1.00.0810171113340.19665@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 11 quoted lines
> On Thu, 16 Oct 2008, Junio C Hamano wrote:
>
>> The patch to branch.c is a quick fix for this issue.  The resulting code
>> passes all the tests, but I am not very proud of hardcoding the "HEAD" in
>> the code.  There must be a better way to do this.
>
> I agree with the change to the test. I think it would be better to 
> hard-code "refs/heads/" instead of "HEAD", and I feel like we must have a 
> "is this ref name a branch?" function, if only because someone could stick 
> "refs/tags/foo" in HEAD, and we should still say it's not something you 
> could track, despite it being something different from "HEAD".
But you can track things under refs/remotes/, so...
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 3 of 4 in “"checkout --track -b" broken? (with suggested fix)”
  1. Junio C HamanoOct 17, 2008
  2. Daniel BarkalowOct 17, 2008
  3. Junio C HamanoOct 17, 2008
  4. Daniel BarkalowOct 18, 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.