git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug in git-remote
@ 2018-12-15  7:14 Gennady Uraltsev
  2018-12-15 13:02 ` SZEDER Gábor
  0 siblings, 1 reply; 4+ messages in thread
From: Gennady Uraltsev @ 2018-12-15  7:14 UTC (permalink / raw)
  To: git


[-- Attachment #1.1: Type: text/plain, Size: 828 bytes --]

I am on git version 2.20.0

$ git remote

does not show remotes configured in named files in $GIT_DIR/remotes/

I do not think that this is the intended behavior.

In particular:

$ git init --bare test.git
Initialized empty Git repository in /home/guraltsev/admin/test/git/test.git/

$ cd test.git

$ mkdir -p remotes
mkdir: created directory 'remotes'

$ echo -e "URL: /testremote.git \n Push: *:* \n Pull:
refs/heads/*:refs/remotes/testremote/* " > remotes/testremote

$ git remote

$ git remote show testremote
fatal: '/testremote.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.



The second to last command should show testremote as a remote.


Best,

Gennady


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in git-remote
  2018-12-15  7:14 Bug in git-remote Gennady Uraltsev
@ 2018-12-15 13:02 ` SZEDER Gábor
  2018-12-17 12:50   ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: SZEDER Gábor @ 2018-12-15 13:02 UTC (permalink / raw)
  To: Gennady Uraltsev; +Cc: git

On Sat, Dec 15, 2018 at 02:14:56AM -0500, Gennady Uraltsev wrote:
> I am on git version 2.20.0
> 
> $ git remote
> 
> does not show remotes configured in named files in $GIT_DIR/remotes/
>
> I do not think that this is the intended behavior.

It's a known bug.  When 'git remote' was rewritten as a builtin
command in C in commit 211c89682e (Make git-remote a builtin,
2008-02-29) the parts dealing with remotes under 'GIT_DIR/remotes/'
were not rewritten.  I don't know whether that was intended or not,
but storing remote information as configuration was about two years
old back then.  Given that since then '$GIT_DIR/remotes/' got marked
as "This mechanism is legacy and not likely to be found in modern
repositories", I'm not sure it's worth fixing.  Perhaps it's time for
calling it deprecated.


> In particular:
> 
> $ git init --bare test.git
> Initialized empty Git repository in /home/guraltsev/admin/test/git/test.git/
> 
> $ cd test.git
> 
> $ mkdir -p remotes
> mkdir: created directory 'remotes'
> 
> $ echo -e "URL: /testremote.git \n Push: *:* \n Pull:
> refs/heads/*:refs/remotes/testremote/* " > remotes/testremote
> 
> $ git remote
> 
> $ git remote show testremote
> fatal: '/testremote.git' does not appear to be a git repository
> fatal: Could not read from remote repository.
> 
> Please make sure you have the correct access rights
> and the repository exists.
> 
> 
> 
> The second to last command should show testremote as a remote.
> 
> 
> Best,
> 
> Gennady
> 




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in git-remote
  2018-12-15 13:02 ` SZEDER Gábor
@ 2018-12-17 12:50   ` Johannes Schindelin
  2018-12-28 12:32     ` SZEDER Gábor
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2018-12-17 12:50 UTC (permalink / raw)
  To: SZEDER Gábor; +Cc: Gennady Uraltsev, git

[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]

Hi Gábor,

On Sat, 15 Dec 2018, SZEDER Gábor wrote:

> On Sat, Dec 15, 2018 at 02:14:56AM -0500, Gennady Uraltsev wrote:
> > I am on git version 2.20.0
> > 
> > $ git remote
> > 
> > does not show remotes configured in named files in $GIT_DIR/remotes/
> >
> > I do not think that this is the intended behavior.
> 
> It's a known bug.  When 'git remote' was rewritten as a builtin
> command in C in commit 211c89682e (Make git-remote a builtin,
> 2008-02-29) the parts dealing with remotes under 'GIT_DIR/remotes/'
> were not rewritten.  I don't know whether that was intended or not,
> but storing remote information as configuration was about two years
> old back then.  Given that since then '$GIT_DIR/remotes/' got marked
> as "This mechanism is legacy and not likely to be found in modern
> repositories", I'm not sure it's worth fixing.  Perhaps it's time for
> calling it deprecated.

I would be in favor of deprecating it, and then removing it.

However, when I tried a similar thing with the completely obsolete
`$GIT_DIR/branches/` feature, it was shot down IIRC on the mere suspicion
that there was a single remaining user among the Linux kernel lieutenants.

And I fear that the suspected workflow of that lieutenant involved having
those legacy remotes, too.

Hopefully this issue will be resolved somehow, as it is not exactly a
splendid idea to keep a legacy feature of a software used by millions,
just for a single user, I would think.

Ciao,
Dscho

> 
> 
> > In particular:
> > 
> > $ git init --bare test.git
> > Initialized empty Git repository in /home/guraltsev/admin/test/git/test.git/
> > 
> > $ cd test.git
> > 
> > $ mkdir -p remotes
> > mkdir: created directory 'remotes'
> > 
> > $ echo -e "URL: /testremote.git \n Push: *:* \n Pull:
> > refs/heads/*:refs/remotes/testremote/* " > remotes/testremote
> > 
> > $ git remote
> > 
> > $ git remote show testremote
> > fatal: '/testremote.git' does not appear to be a git repository
> > fatal: Could not read from remote repository.
> > 
> > Please make sure you have the correct access rights
> > and the repository exists.
> > 
> > 
> > 
> > The second to last command should show testremote as a remote.
> > 
> > 
> > Best,
> > 
> > Gennady
> > 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in git-remote
  2018-12-17 12:50   ` Johannes Schindelin
@ 2018-12-28 12:32     ` SZEDER Gábor
  0 siblings, 0 replies; 4+ messages in thread
From: SZEDER Gábor @ 2018-12-28 12:32 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Gennady Uraltsev, git

On Mon, Dec 17, 2018 at 01:50:56PM +0100, Johannes Schindelin wrote:
> Hi Gábor,
> 
> On Sat, 15 Dec 2018, SZEDER Gábor wrote:
> 
> > On Sat, Dec 15, 2018 at 02:14:56AM -0500, Gennady Uraltsev wrote:
> > > I am on git version 2.20.0
> > > 
> > > $ git remote
> > > 
> > > does not show remotes configured in named files in $GIT_DIR/remotes/
> > >
> > > I do not think that this is the intended behavior.
> > 
> > It's a known bug.  When 'git remote' was rewritten as a builtin
> > command in C in commit 211c89682e (Make git-remote a builtin,
> > 2008-02-29) the parts dealing with remotes under 'GIT_DIR/remotes/'
> > were not rewritten.  I don't know whether that was intended or not,
> > but storing remote information as configuration was about two years
> > old back then.  Given that since then '$GIT_DIR/remotes/' got marked
> > as "This mechanism is legacy and not likely to be found in modern
> > repositories", I'm not sure it's worth fixing.  Perhaps it's time for
> > calling it deprecated.
> 
> I would be in favor of deprecating it, and then removing it.
> 
> However, when I tried a similar thing with the completely obsolete
> `$GIT_DIR/branches/` feature, it was shot down IIRC on the mere suspicion
> that there was a single remaining user among the Linux kernel lieutenants.
> 
> And I fear that the suspected workflow of that lieutenant involved having
> those legacy remotes, too.
> 
> Hopefully this issue will be resolved somehow, as it is not exactly a
> splendid idea to keep a legacy feature of a software used by millions,
> just for a single user, I would think.

Well, even if we don't remove support for '$GIT_DIR/remotes/', we
could still mark it as deprecated in the documentation, so hopefully
it won't gain any new users, and users won't waste time digging and
writing bugreports like this.

When, if at all, and how we'll progress beyond that is a separate
question.


Gábor


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-28 12:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-15  7:14 Bug in git-remote Gennady Uraltsev
2018-12-15 13:02 ` SZEDER Gábor
2018-12-17 12:50   ` Johannes Schindelin
2018-12-28 12:32     ` SZEDER Gábor

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).