Subject: Re: [PATCH v2 0/5] remote: announce removal of "branches/" and "remotes/"

From: Junio C Hamano <[email-masked]>
Date: Tue, 07 Jan 2025 08:36:59 -0800

Patrick Steinhardt <[email-masked]> writes:

>> Specifically the ".git/branches/name" mechanism was never removed as
>> it had one distinct advantage over all other mechanisms for users
>> who have to juggle tons of remotes that change either their URLs or
>> branch names or both not so infrequently.  Instead of having to edit
>> files in .git/remotes/*, being able to say
>> 
>> 	$ ls .git/branches/*partialname*
>> 	$ echo "$URL#$branch" >.git/branches/foo
>> 	$ rm .git/brnaches/foo
>> 
>> was powerful.  Offhand I do not know if "git remote" command
>> improved the usability aspect of newer mechanisms good enough
>> to allow us to start using the verb "replace" here.
>
> I would claim the fact that nobody nowadays knows about either of the
> old mechanisms is a good indicator that git-remote(1) has indeed
> completely replaced them. I'm happy to slightly reword it though, even
> if it doesn't ultimately end up in any of the commits anyway :)

We can claim whatever, but scripts written in ancient days may still
know about them and they do not care what we claim.  And that is the
primary thing that makes me worried.

As suggested elsewhere, I think it is prudent to add some checks
when remote.c notices that we used the values that were read via
these old mechanims and complain loudly.

Thanks.