Re: [RFC PATCH v2 3/6] doc: Add namespace collision guidelines file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 29, 2020, 01:20 UTC
- Message-ID
- <xmqq7dwv1qqn.fsf@gitster.c.googlers.com>
- In-Reply-To
- <xmqqo8q73lkf.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
>> The names of the subcommands "git" can spawn is a shared resource. >> ... > > Also names of worktrees that are attached to a single repository. > ... > > I (or others) may come up with other things that must be named and > name collisions must be avoided. Even though I already said that I > didn't think the "suggestions to avoid name collisions" given by the > RFC PATCH are well done, I do think it is worth being aware of the > problem space, and enumerating what kind of names are shared and > limited resource is the first step to become so.
Here are a few more.
- The nickname of a remote, like 'origin'.
- A custom pretty format alias 'pretty.<name>'.
- Ref hierarchy name (next to refs/{heads,tags,remotes}).All of these are defined in the configuration, and unlike attributes, they are never defined by in-tree tracked files, so we do not have to worry about "I use this name, and I want to make sure others do not use the same for different purpose."
But third-party tools may want to carve out a subnamespace for their own use, and there needs coordination among them so that they do not stomp on each other's toes, or collide with names the end-users would want to use.