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

Re: Bug in git-remote

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Dec 15, 2018, 13:02 UTC
Message-ID
<20181215130204.GZ30222@szeder.dev>
In-Reply-To
<650b15f4-5e13-7a83-9f2e-072efc4815e4@gmail.com>
On Sat, Dec 15, 2018 at 02:14:56AM -0500, Gennady Uraltsev wrote:
Show 7 quoted lines
> 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.

Show 31 quoted lines
> 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
> 
Previous: Gennady UraltsevNext: Johannes Schindelin
Message 2 of 4 in “Bug in git-remote”
  1. Gennady UraltsevDec 15, 2018
  2. SZEDER GáborDec 15, 2018
  3. Johannes SchindelinDec 17, 2018
  4. SZEDER GáborDec 28, 2018

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.