[PATCH 04/11] remote: warn loud and clear when .git/remotes/ is *still* used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since at least 75c384efb52 (Do not create $GIT_DIR/remotes/ directory
anymore., 2006-12-19), we strongly prefer remotes and upstream branches
to be specified in the config rather than .git/remotes/ and
.git/branches/.

For some time, we still retained backwards-compatibility. At some stage,
it becomes pointless, though, as it just adds maintenance burden for no
good reason: no repositories created within the past decade have
populated these directories, and pre-existing repositories were most
likely migrated by now.

In preparation for removing support for this ancient compatibility that
should no longer be necessary, let's warn everybody who is still using
that feature (if there is anybody left, that is).

Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
---
 remote.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/remote.c b/remote.c
index 04ab2230337..b2ae168035e 100644
--- a/remote.c
+++ b/remote.c
@@ -255,6 +255,10 @@ static void read_remotes_file(struct remote *remote)
 
 	if (!f)
 		return;
+
+	warning(_("the remote '%s' uses the long-deprecated '%s' file"),
+		remote->name, git_path("branches/%s", remote->name));
+
 	remote->configured_in_repo = 1;
 	remote->origin = REMOTE_REMOTES;
 	while (strbuf_getline(&buf, f) != EOF) {
-- 
2.12.2.windows.2.800.gede8f145e06





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]