Message ID | 20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im (mailing list archive) |
---|---|
Headers | show |
Series | remote: announce removal of "branches/" and "remotes/" | expand |
Patrick Steinhardt <ps@pks.im> writes: > back when Git was in its infancy, remotes were configured via separate > files in "branches/" (back in 2005). This mechanism was replaced later > that year with the "remotes/" directory. These mechanism have evenutally > been replaced by config-based remotes,... Just a historical note, as I am not sure how much of it still matters. In all of the above "replaced" is an incorrect verb to use. "A more-powerful-but-different mechanism to do the same and more was introduced later" is a fair statement, though. 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.
On Mon, Jan 06, 2025 at 07:42:25AM -0800, Junio C Hamano wrote: > Patrick Steinhardt <ps@pks.im> writes: > > > back when Git was in its infancy, remotes were configured via separate > > files in "branches/" (back in 2005). This mechanism was replaced later > > that year with the "remotes/" directory. These mechanism have evenutally > > been replaced by config-based remotes,... > > Just a historical note, as I am not sure how much of it still > matters. In all of the above "replaced" is an incorrect verb to > use. "A more-powerful-but-different mechanism to do the same and > more was introduced later" is a fair statement, though. > > 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 :) Patrick
Patrick Steinhardt <ps@pks.im> 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.