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

Re: Bug using `fetch` with blank `-c` arguments to git

From
Adam Dinwoodie <adam@dinwoodie.org>
Date
Jan 4, 2022, 21:00 UTC
Message-ID
<CA+kUOam-Dd-XUk0XaOfw4_rUTg=Ws7w5H=vZ=ZZeEo4XJfsVOg@mail.gmail.com>
In-Reply-To
<CAGyf7-HSia4pRs4FZ107v0jmP4k4Zfw5zJ-3Oz8UvF9oobczEw@mail.gmail.com>
On Tue, 4 Jan 2022 at 20:04, Bryan Turner <bturner@atlassian.com> wrote:
Show 24 quoted lines
>
> On Tue, Jan 4, 2022 at 4:37 AM Adam Dinwoodie <adam@dinwoodie.org> wrote:
> >
> > While investigating some issues with a different project, I discovered
> > the command `git -c config.helper= fetch` was working with the Debian
> > stable version of Git (v2.30.2) but not with my local build
> > (v2.34.1.428.gdcc0cd074f).
>
> Since you're working with a locally-built Git, have you, by chance,
> actually _installed_ that build, or is it simply in the Git repository
> itself after running make?
>
> If you haven't _installed_ your build, my guess is you might be
> getting a mismatch wherein your _built_ Git, when it forks out
> subprocesses, is triggering your _installed_ Git (which I assume you
> have, and which I assume is not 2.34.1). Git compiles paths into
> itself to know where to find certain binaries, and if you run a
> compiled-but-not-installed Git then those paths are "wrong". (I see
> administrators do this fairly often when building Git from source to
> set up Bitbucket Server.)
>
> What does `./git --exec-path` print, when you run your 2.34.1 binary?
> And is that where, for example, the compiled 2.34.1 versions of things
> like `git-remote-https` are?

Good thoughts, but I initially hit this problem after having installed it; I reproduced it running Git from the working copy for ease of bisecting, but the problem definitely occurs using the compiled version after installation. The below was collected after running `make install` (plus all the previously noted build commands, including running the configure script to specify the installation path) with the commit I identified as introducing the problem:

``` $ type git git is hashed (/home/adam/.local/bin/git)

$ which git /home/adam/.local/bin/git

$ git --version git version 2.29.2.372.g1ff21c05ba

$ git --exec-path /home/adam/.local/libexec/git-core

$ ls $(git --exec-path)/git $(git --exec-path)/git-remote-https /home/adam/.local/libexec/git-core/git /home/adam/.local/libexec/git-core/git-remote-https

$ $(git --exec-path)/git --version git version 2.29.2.372.g1ff21c05ba

$ rm -rf tmp && git -c core.autocrlf=true clone git://github.com/git/git tmp Cloning into 'tmp'... error: bogus format in GIT_CONFIG_PARAMETERS fatal: unable to parse command-line config ```

For the sake of double-checking, though, I just uninstalled the version of Git in /usr/bin (after spending some time working out how to do that with apt, without also uninstalling dependencies I wanted to leave alone) and repeated the above commands, and got exactly the same output.

Previous: Bryan TurnerNext: Adam Dinwoodie
Message 6 of 9 in “Bug using `fetch` with blank `-c` arguments to git”
  1. Adam DinwoodieJan 4, 2022
  2. Erik Cervin EdinJan 4, 2022
  3. Adam DinwoodieJan 4, 2022
  4. Erik Cervin EdinJan 4, 2022
  5. Bryan TurnerJan 4, 2022
  6. Adam DinwoodieJan 4, 2022
  7. Adam DinwoodieJan 6, 2022
  8. Patrick SteinhardtJan 7, 2022
  9. Adam DinwoodieJan 7, 2022

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.