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

Re: proper remote ref namespaces

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 12, 2015, 19:35 UTC
Message-ID
<xmqq1tf8l2p8.fsf@gitster.dls.corp.google.com>
In-Reply-To
<55CB63C5.8090708@xiplink.com>
Marc Branchaud <marcnarc@xiplink.com> writes:
> Not a lot.  Existing DWIMery already handles ambiguous branches, by
> preferring a local branch name over any remote ones.  The only teaching
> that's really needed is ...

You need to remember that there are five useful things you can do to mutable things.

 - Creation can be covered by teaching "clone" to put a new-style
   refspec but the same change needs to also go to "remote add".
 - Reading is done by the DWIMery in ref_rev_parse_rules[] (your
   point above).
 - Updating is automatic, as "fetch" does not have any funny
   built-in intuit and blindly follows configured fetch refspec.
 - Deletion by "branch -d -r" and "remote remove" needs to be
   careful about designing how the case where both old and new
   hierarchies exist should be handled (my gut feeling is "delete
   both", but there may be funny corner cases).
 - Enumeration by "branch -l -r" probably shares the same issue as
   deletion.
Previous: Marc BranchaudNext: Junio C Hamano
Message 3 of 4 in “proper remote ref namespaces”
  1. Jacob KellerAug 12, 2015
  2. Marc BranchaudAug 12, 2015
  3. Junio C HamanoAug 12, 2015
  4. Junio C HamanoAug 12, 2015

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.