aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-02-03 10:23:33 -0800
committerJunio C Hamano <gitster@pobox.com>2025-02-03 10:23:33 -0800
commit803b5acaa7cb979b5d623270af18d6d8354fce9b (patch)
tree63217cc10fcc21306c913e44f9fd7a69e3d1885e /builtin
parentc43136d67b7c6a9ecfa988004eb4a87bfbe957a0 (diff)
parent8ccc75c2452b5814d2445d60d54266293ca48674 (diff)
downloadgit-803b5acaa7cb979b5d623270af18d6d8354fce9b.tar.xz
Merge branch 'ps/3.0-remote-deprecation'
Following the procedure we established to introduce breaking changes for Git 3.0, allow an early opt-in for removing support of $GIT_DIR/branches/ and $GIT_DIR/remotes/ directories to configure remotes. * ps/3.0-remote-deprecation: remote: announce removal of "branches/" and "remotes/" builtin/pack-redundant: remove subcommand with breaking changes ci: repurpose "linux-gcc" job for deprecations ci: merge linux-gcc-default into linux-gcc Makefile: wire up build option for deprecated features
Diffstat (limited to 'builtin')
-rw-r--r--builtin/remote.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index 315cbb88e6..71d84fb3cf 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -642,10 +642,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);
return 0;