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

Re: Deleting remote branch pointed by remote HEAD

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2009, 20:42 UTC
Message-ID
<7veiywe6h8.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LNX.1.00.0901211237530.19665@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 8 quoted lines
> That is, refs/remotes/origin/HEAD is only there to let the user abbreviate 
> the most useful branch of the remote; there's no reason it should reflect 
> the remote's HEAD, except that the remote's HEAD is a good guess if the 
> user hasn't said anything.
>
> I think it might be more appropriate to just care less about a broken 
> symref, explain what's wrong if the user actually tries to use it, and 
> otherwise mostly ignore it.
I agree with you in many of the points in your message.

The user used to be able to say "origin" as a shorthand for "origin/frotz" by having "remotes/origin/HEAD" locally, and somebody (not necessarily the user himself) broke this arrangement. Silently discarding HEAD will lose the information on which remote branch was the interesting one for the user. It may also change the disambiguation rules for "origin" without telling the user. Neither is desirable.

The tool needs a better explanation of the situation. We also want an easier way to help the user repoint the HEAD to something else, or remove the dangling HEAD than telling him to use symbolic-ref.

Previous: Jeff KingNext: Felipe Contreras
Message 17 of 24 in “Deleting remote branch pointed by remote HEAD”
  1. Marc-André LureauJan 21, 2009
  2. Michael J GruberJan 21, 2009
  3. Marc-André LureauJan 21, 2009
  4. Michael J GruberJan 21, 2009
  5. Marc-André LureauJan 21, 2009
  6. Jeff KingJan 21, 2009
  7. Daniel BarkalowJan 21, 2009
  8. Boyd Stephen Smith Jr.Jan 21, 2009
  9. Jeff KingJan 21, 2009
  10. Jeff KingJan 21, 2009
  11. Daniel BarkalowJan 21, 2009
  12. Jeff KingJan 21, 2009
  13. Felipe ContrerasMar 12, 2009
  14. Jeff KingMar 12, 2009
  15. Felipe ContrerasMar 12, 2009
  16. Jeff KingMar 12, 2009
  17. Junio C HamanoJan 21, 2009
  18. Felipe ContrerasJan 21, 2009
  19. Jeff KingJan 21, 2009
  20. Felipe ContrerasJan 21, 2009
  21. Adeodato SimóJan 21, 2009
  22. Sitaram ChamartyJan 21, 2009
  23. GUI and detatched HEAD (was Re: Deleting remote branch pointed by remote HEAD)Daniel Barkalow, Jan 21, 2009
  24. Sitaram ChamartyJan 22, 2009

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.