git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 5/5] remote: announce removal of "branches/" and "remotes/"

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2025, 17:58 UTC
Message-ID
<xmqqo6zywx1c.fsf@gitster.g>
In-Reply-To
<Z5DRESPpegE41xaT@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 25 quoted lines
> On Tue, Jan 21, 2025 at 01:25:56PM -0800, Junio C Hamano wrote:
>> Patrick Steinhardt <ps@pks.im> writes:
>> > diff --git a/builtin/remote.c b/builtin/remote.c
>> > index 1ad3e70a6b..e565b2b3fe 100644
>> > --- a/builtin/remote.c
>> > +++ b/builtin/remote.c
>> > @@ -640,10 +640,12 @@ static int migrate_file(struct remote *remote)
>> >  	strbuf_addf(&buf, "remote.%s.fetch", remote->name);
>> >  	for (i = 0; i < remote->fetch.nr; i++)
>> >  		git_config_set_multivar(buf.buf, remote->fetch.items[i].raw, "^$", 0);
>> > +#ifndef WITH_BREAKING_CHANGES
>> >  	if (remote->origin == REMOTE_REMOTES)
>> >  		unlink_or_warn(git_path("remotes/%s", remote->name));
>> >  	else if (remote->origin == REMOTE_BRANCHES)
>> >  		unlink_or_warn(git_path("branches/%s", remote->name));
>> > +#endif /* WITH_BREAKING_CHANGES */
>> >  	strbuf_release(&buf);
>> 
>> Interesting.  I wonder if our new warning should talk about whatever
>> end-user facing interface that triggers this code path.  It would
>> help them wean themselves away from the old interface, no?
>
> Not quite sure that I understand what you're saying. Is it that we
> should tell whether we were reading from "branches/" or "remotes/"? If
> so we already do that.

No, what I meant was to say "You are using outdated remotes/ hierarchy to describe this remote. You can run 'remote mv %s %s' to migrate its definition to the more modern config-based system".

The message already says the first sentence, but not the latter.
Previous: Patrick Steinhardt
Message 10 of 10 in “remote: announce removal of "branches/" and "remotes/"”
  1. 0/5 remote: announce removal of "branches/" and "remotes/"Patrick Steinhardt, Jan 20, 2025
  2. 1/5 Makefile: wire up build option for deprecated featuresPatrick Steinhardt, Jan 20, 2025
  3. 2/5 ci: merge linux-gcc-default into linux-gccPatrick Steinhardt, Jan 20, 2025
  4. 3/5 ci: repurpose "linux-gcc" job for deprecationsPatrick Steinhardt, Jan 20, 2025
  5. 4/5 builtin/pack-redundant: remove subcommand with breaking changesPatrick Steinhardt, Jan 20, 2025
  6. Junio C HamanoJan 21, 2025
  7. 5/5 remote: announce removal of "branches/" and "remotes/"Patrick Steinhardt, Jan 20, 2025
  8. Junio C HamanoJan 21, 2025
  9. Patrick SteinhardtJan 22, 2025
  10. Junio C HamanoJan 22, 2025

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.