Re: [RFC PATCH v2 3/6] doc: Add namespace collision guidelines file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 28, 2020, 19:29 UTC
- Message-ID
- <xmqqo8q73lkf.fsf@gitster.c.googlers.com>
- In-Reply-To
- <xmqqy2pb3new.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> Kenneth Lorber <keni@his.com> writes: > >> +Git uses identifiers in a number of different namespaces: >> + >> +* environment variables >> +* files in $GIT_DIR >> +* files in the working trees >> +* config sections >> +* hooks >> +* attributes > > The names of the subcommands "git" can spawn is a shared resource. > You can install "git-imerge" program in one of the directories on > your $PATH and say "git imerge" to invoke the program. > > Two third-party developers may have to coordinate to avoid giving > the same name to their totally-unrelated tools, if they hope that > both of their tools to be useful in the larger Git ecosystem.
Also names of worktrees that are attached to a single repository. If a third-party tool wants to make it "easy" for its users by automatically taking a name to do its job (instead of forcing the users to come up with a name and giving it to the tool), the name must be chosen in such a way that it does not collide names in use and names the user (or other third-party tools) will pick in the future.
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.
Thanks.