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
Clemens Buchacher <drizzd@aon.at>
Date
Aug 24, 2011, 06:54 UTC
Message-ID
<20110824065412.GA10800@ecki>
In-Reply-To
<CAPRoxBXjL3Y3KRd8R2guX9Ar374sw-pBhz1bCzNZxn1vC6XNPw@mail.gmail.com>
Hi Nathan,
On Tue, Aug 23, 2011 at 02:26:48PM -0500, Nathan W. Panike wrote:
> 
> Is there any way to change this behavior, e.g., so that rule 6 becomes
> an error? Say, by setting a config option?

I know you're trying to improve git. I do not want to discourage that. But with little UI annoyances like this, it's usually not worth it. Git has countless magic tricks like this. It's a bit like perl in that regard. Assuming that we agree on what we would like to get rid of (which is the hard part), it would still break backwards compatibility. Maintaining a switch, on the other hand, is overhead and in the end it would make git even more complicated, because now the behavior of core commands depends on user configuration.

But once you accept the fact that this is what git is, you can tackle the problem in a different way:

> A colleague at $dayjob recently caused corruption in our git
> repository by accidentally running the command
> 
> git rebase origin stable

Ok, mistakes happen. But that's exactly why you have git: To be able to deal with mistakes gracefully. So use git to review and test changes before they get declared as a stable release (stable enough to be used internally, at least). Then mistakes usually become a local problem and can be undone using the reflog.

Clemens
Previous: Junio C Hamano
Message 7 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.