{"thread":{"id":"50042","subject":"Bug in git-remote","startedAt":"2018-12-15T07:14:59Z","lastAt":"2018-12-28T12:32:53Z","messageCount":4,"participants":["Gennady Uraltsev","SZEDER Gábor","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"365426","messageId":"650b15f4-5e13-7a83-9f2e-072efc4815e4@gmail.com","threadId":"50042","inReplyTo":null,"subject":"Bug in git-remote","fromName":"Gennady Uraltsev","fromEmail":"gennady.uraltsev@gmail.com","sentAt":"2018-12-15T07:14:56Z","receivedAt":"2018-12-15T07:14:59Z","isPatch":false,"sender":{"key":"gennady.uraltsev@gmail.com","avatar":"https://gravatar.com/avatar/5239a2b2e8a8fed34c6acf53d5636b8c328213b6796f37cae12bec8e12a182dd?d=mp&s=160"},"body":"I am on git version 2.20.0\n\n$ git remote\n\ndoes not show remotes configured in named files in $GIT_DIR/remotes/\n\nI do not think that this is the intended behavior.\n\nIn particular:\n\n$ git init --bare test.git\nInitialized empty Git repository in /home/guraltsev/admin/test/git/test.git/\n\n$ cd test.git\n\n$ mkdir -p remotes\nmkdir: created directory 'remotes'\n\n$ echo -e \"URL: /testremote.git \\n Push: *:* \\n Pull:\nrefs/heads/*:refs/remotes/testremote/* \" > remotes/testremote\n\n$ git remote\n\n$ git remote show testremote\nfatal: '/testremote.git' does not appear to be a git repository\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n\n\n\nThe second to last command should show testremote as a remote.\n\n\nBest,\n\nGennady\n\n"},{"id":"365432","messageId":"20181215130204.GZ30222@szeder.dev","threadId":"50042","inReplyTo":"650b15f4-5e13-7a83-9f2e-072efc4815e4@gmail.com","subject":"Re: Bug in git-remote","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-12-15T13:02:04Z","receivedAt":"2018-12-15T13:02:10Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sat, Dec 15, 2018 at 02:14:56AM -0500, Gennady Uraltsev wrote:\n> I am on git version 2.20.0\n> \n> $ git remote\n> \n> does not show remotes configured in named files in $GIT_DIR/remotes/\n>\n> I do not think that this is the intended behavior.\n\nIt's a known bug.  When 'git remote' was rewritten as a builtin\ncommand in C in commit 211c89682e (Make git-remote a builtin,\n2008-02-29) the parts dealing with remotes under 'GIT_DIR/remotes/'\nwere not rewritten.  I don't know whether that was intended or not,\nbut storing remote information as configuration was about two years\nold back then.  Given that since then '$GIT_DIR/remotes/' got marked\nas \"This mechanism is legacy and not likely to be found in modern\nrepositories\", I'm not sure it's worth fixing.  Perhaps it's time for\ncalling it deprecated.\n\n\n> In particular:\n> \n> $ git init --bare test.git\n> Initialized empty Git repository in /home/guraltsev/admin/test/git/test.git/\n> \n> $ cd test.git\n> \n> $ mkdir -p remotes\n> mkdir: created directory 'remotes'\n> \n> $ echo -e \"URL: /testremote.git \\n Push: *:* \\n Pull:\n> refs/heads/*:refs/remotes/testremote/* \" > remotes/testremote\n> \n> $ git remote\n> \n> $ git remote show testremote\n> fatal: '/testremote.git' does not appear to be a git repository\n> fatal: Could not read from remote repository.\n> \n> Please make sure you have the correct access rights\n> and the repository exists.\n> \n> \n> \n> The second to last command should show testremote as a remote.\n> \n> \n> Best,\n> \n> Gennady\n> \n\n\n\n"},{"id":"365476","messageId":"nycvar.QRO.7.76.6.1812171347530.43@tvgsbejvaqbjf.bet","threadId":"50042","inReplyTo":"20181215130204.GZ30222@szeder.dev","subject":"Re: Bug in git-remote","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-12-17T12:50:56Z","receivedAt":"2018-12-17T12:51:15Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Gábor,\n\nOn Sat, 15 Dec 2018, SZEDER Gábor wrote:\n\n> On Sat, Dec 15, 2018 at 02:14:56AM -0500, Gennady Uraltsev wrote:\n> > I am on git version 2.20.0\n> > \n> > $ git remote\n> > \n> > does not show remotes configured in named files in $GIT_DIR/remotes/\n> >\n> > I do not think that this is the intended behavior.\n> \n> It's a known bug.  When 'git remote' was rewritten as a builtin\n> command in C in commit 211c89682e (Make git-remote a builtin,\n> 2008-02-29) the parts dealing with remotes under 'GIT_DIR/remotes/'\n> were not rewritten.  I don't know whether that was intended or not,\n> but storing remote information as configuration was about two years\n> old back then.  Given that since then '$GIT_DIR/remotes/' got marked\n> as \"This mechanism is legacy and not likely to be found in modern\n> repositories\", I'm not sure it's worth fixing.  Perhaps it's time for\n> calling it deprecated.\n\nI would be in favor of deprecating it, and then removing it.\n\nHowever, when I tried a similar thing with the completely obsolete\n`$GIT_DIR/branches/` feature, it was shot down IIRC on the mere suspicion\nthat there was a single remaining user among the Linux kernel lieutenants.\n\nAnd I fear that the suspected workflow of that lieutenant involved having\nthose legacy remotes, too.\n\nHopefully this issue will be resolved somehow, as it is not exactly a\nsplendid idea to keep a legacy feature of a software used by millions,\njust for a single user, I would think.\n\nCiao,\nDscho\n\n> \n> \n> > In particular:\n> > \n> > $ git init --bare test.git\n> > Initialized empty Git repository in /home/guraltsev/admin/test/git/test.git/\n> > \n> > $ cd test.git\n> > \n> > $ mkdir -p remotes\n> > mkdir: created directory 'remotes'\n> > \n> > $ echo -e \"URL: /testremote.git \\n Push: *:* \\n Pull:\n> > refs/heads/*:refs/remotes/testremote/* \" > remotes/testremote\n> > \n> > $ git remote\n> > \n> > $ git remote show testremote\n> > fatal: '/testremote.git' does not appear to be a git repository\n> > fatal: Could not read from remote repository.\n> > \n> > Please make sure you have the correct access rights\n> > and the repository exists.\n> > \n> > \n> > \n> > The second to last command should show testremote as a remote.\n> > \n> > \n> > Best,\n> > \n> > Gennady\n> > \n> \n> \n> \n> "},{"id":"365901","messageId":"20181228123242.GA6120@szeder.dev","threadId":"50042","inReplyTo":"nycvar.QRO.7.76.6.1812171347530.43@tvgsbejvaqbjf.bet","subject":"Re: Bug in git-remote","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-12-28T12:32:42Z","receivedAt":"2018-12-28T12:32:53Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Mon, Dec 17, 2018 at 01:50:56PM +0100, Johannes Schindelin wrote:\n> Hi Gábor,\n> \n> On Sat, 15 Dec 2018, SZEDER Gábor wrote:\n> \n> > On Sat, Dec 15, 2018 at 02:14:56AM -0500, Gennady Uraltsev wrote:\n> > > I am on git version 2.20.0\n> > > \n> > > $ git remote\n> > > \n> > > does not show remotes configured in named files in $GIT_DIR/remotes/\n> > >\n> > > I do not think that this is the intended behavior.\n> > \n> > It's a known bug.  When 'git remote' was rewritten as a builtin\n> > command in C in commit 211c89682e (Make git-remote a builtin,\n> > 2008-02-29) the parts dealing with remotes under 'GIT_DIR/remotes/'\n> > were not rewritten.  I don't know whether that was intended or not,\n> > but storing remote information as configuration was about two years\n> > old back then.  Given that since then '$GIT_DIR/remotes/' got marked\n> > as \"This mechanism is legacy and not likely to be found in modern\n> > repositories\", I'm not sure it's worth fixing.  Perhaps it's time for\n> > calling it deprecated.\n> \n> I would be in favor of deprecating it, and then removing it.\n> \n> However, when I tried a similar thing with the completely obsolete\n> `$GIT_DIR/branches/` feature, it was shot down IIRC on the mere suspicion\n> that there was a single remaining user among the Linux kernel lieutenants.\n> \n> And I fear that the suspected workflow of that lieutenant involved having\n> those legacy remotes, too.\n> \n> Hopefully this issue will be resolved somehow, as it is not exactly a\n> splendid idea to keep a legacy feature of a software used by millions,\n> just for a single user, I would think.\n\nWell, even if we don't remove support for '$GIT_DIR/remotes/', we\ncould still mark it as deprecated in the documentation, so hopefully\nit won't gain any new users, and users won't waste time digging and\nwriting bugreports like this.\n\nWhen, if at all, and how we'll progress beyond that is a separate\nquestion.\n\n\nGábor\n\n"}]}