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

Re: Looking for a way to turn off/modify ref disambiguation

From
Jeff King <peff@peff.net>
Date
Aug 23, 2011, 21:15 UTC
Message-ID
<20110823211536.GA7759@sigill.intra.peff.net>
In-Reply-To
<CAPRoxBXjL3Y3KRd8R2guX9Ar374sw-pBhz1bCzNZxn1vC6XNPw@mail.gmail.com>
On Tue, Aug 23, 2011 at 02:26:48PM -0500, Nathan W. Panike wrote:
Show 12 quoted lines
>        1.          If $GIT_DIR/<name> exists, that is what you mean
> (this is usually useful only for HEAD, FETCH_HEAD, ORIG_HEAD,
> MERGE_HEAD and CHERRY_PICK_HEAD);
>        2.          otherwise, refs/<name> if it exists;
>        3.          otherwise, refs/tags/<refname> if it exists;
>        4.          otherwise, refs/heads/<name> if it exists;
>        5.          otherwise, refs/remotes/<name> if it exists;
>        6.          otherwise, refs/remotes/<name>/HEAD if it exists.
> ...
> 
> Is there any way to change this behavior, e.g., so that rule 6 becomes
> an error? Say, by setting a config option?
You can remove the remote HEAD reference with:
  git remote set-head origin -d

That will only fix that particular repo, though. There is no config option to disable it for all newly cloned repos.

-Peff
Previous: Nathan W. PanikeNext: Junio C Hamano
Message 2 of 7 in “Looking for a way to turn off/modify ref disambiguation”
  1. Nathan W. PanikeAug 23, 2011
  2. Jeff KingAug 23, 2011
  3. Junio C HamanoAug 23, 2011
  4. Michael J GruberAug 24, 2011
  5. Jonathan NiederAug 24, 2011
  6. Junio C HamanoAug 24, 2011
  7. Clemens BuchacherAug 24, 2011

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.