threads / patch / 17646

patchMake tig call the correct git config command

Subject: [PATCH] Make tig call the correct git config command

## tl;dr

5 messages between Feb 8, 2009 and Feb 18, 2009. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Mikael Magnusson· Feb 8, 2009, 07:46 UTC · lore
2009/2/7 Mikael Magnusson <mikachu@gmail.com>:
Show 23 quoted lines
> 2009/2/5 Jonas Fonseca <fonseca@diku.dk>:
>> Hello,
>>
>> Here is a much needed update fixing multiple regressions from the
>> introduction of the IO API in 0.13. Among improvements is the much
>> requested ability to restore the position in the stage view when staging
>> diff hunks. Also noteworthy is the many optimizations of the screen
>> updating to make it work better across slow links. Finally, beware that
>> a handful of incompatibilities can cause problems.
>
> I'm having a problem with tig taking 2 seconds to start up, which
> seems to be related to the 'typo checking' feature of git. After
> figuring out how to stop strace from helpfully saying
> write(2, "WARNING: You called a Git program"..., 137) = 137
> I got this (with -s 100):
> [pid 29708] write(2, "WARNING: You called a Git program named 'git
> config', which does not exist.\nContinuing under the assu"..., 137) =
> 137
> [pid 29708] write(2, "in 2.0 seconds automatically...\n"..., 32) = 32
>
> The output however also contains lots of git config strings, which is
> confusing. Is tig running git config twice and failing one of the
> times? (Running git config from the cmdline works fine).
Turns out it was as simple as this:
Show changes to configure.ac +1 −1
diff --git a/configure.ac b/configure.ac
index b179389..bdea8de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ AC_MSG_CHECKING([which config
 GIT_CONFIG="repo-config"
 git config --list >/dev/null && GIT_CONFIG="config"
 AC_MSG_RESULT([$GIT_CONFIG])
-AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config subcommand])
+AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[config subcommand])

 AC_CHECK_PROGS(ASCIIDOC, [asciidoc false])
 AC_CHECK_PROGS(XMLTO, [xmlto false])
-- 
Mikael Magnusson
Mikael Magnusson· Feb 8, 2009, 07:49 UTC · re: Mikael Magnusson · lore

Re: [PATCH] Make tig call the correct git config command

As it turns out I'm an idiot, that's just the configure help message. Rerunning autoconf + configure in fact generates a completely correct commandline. Sorry about the noise.

2009/2/8 Mikael Magnusson <mikachu@gmail.com>:
Show 44 quoted lines
> 2009/2/7 Mikael Magnusson <mikachu@gmail.com>:
>> 2009/2/5 Jonas Fonseca <fonseca@diku.dk>:
>>> Hello,
>>>
>>> Here is a much needed update fixing multiple regressions from the
>>> introduction of the IO API in 0.13. Among improvements is the much
>>> requested ability to restore the position in the stage view when staging
>>> diff hunks. Also noteworthy is the many optimizations of the screen
>>> updating to make it work better across slow links. Finally, beware that
>>> a handful of incompatibilities can cause problems.
>>
>> I'm having a problem with tig taking 2 seconds to start up, which
>> seems to be related to the 'typo checking' feature of git. After
>> figuring out how to stop strace from helpfully saying
>> write(2, "WARNING: You called a Git program"..., 137) = 137
>> I got this (with -s 100):
>> [pid 29708] write(2, "WARNING: You called a Git program named 'git
>> config', which does not exist.\nContinuing under the assu"..., 137) =
>> 137
>> [pid 29708] write(2, "in 2.0 seconds automatically...\n"..., 32) = 32
>>
>> The output however also contains lots of git config strings, which is
>> confusing. Is tig running git config twice and failing one of the
>> times? (Running git config from the cmdline works fine).
>
> Turns out it was as simple as this:
>
> diff --git a/configure.ac b/configure.ac
> index b179389..bdea8de 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -28,7 +28,7 @@ AC_MSG_CHECKING([which config
>  GIT_CONFIG="repo-config"
>  git config --list >/dev/null && GIT_CONFIG="config"
>  AC_MSG_RESULT([$GIT_CONFIG])
> -AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config subcommand])
> +AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[config subcommand])
>
>  AC_CHECK_PROGS(ASCIIDOC, [asciidoc false])
>  AC_CHECK_PROGS(XMLTO, [xmlto false])
>
> --
> Mikael Magnusson
>
-- 
Mikael Magnusson
Jonas Fonseca· Feb 8, 2009, 09:56 UTC · re: Mikael Magnusson · lore

Re: [PATCH] Make tig call the correct git config command

On Sun, Feb 8, 2009 at 08:49, Mikael Magnusson <mikachu@gmail.com> wrote:
> As it turns out I'm an idiot, that's just the configure help message.
> Rerunning autoconf + configure in fact generates a completely correct
> commandline. Sorry about the noise.

Thanks for checking anyway. The Makefile doesn't detect out-of-date configure scripts, which (after the move to use argv arrays and execv in tig-0.13) caused tig to run: "'git' 'git config'" on startup.

I wonder if this check in configure should not be removed anyway, since it is starting to be a long time since git-repo-config was renamed.

-- 
Jonas Fonseca
Kris Shannon· Feb 18, 2009, 11:12 UTC · re: Jonas Fonseca · lore

Re: [PATCH] Make tig call the correct git config command

2009/2/8 Jonas Fonseca <fonseca@diku.dk>
> I wonder if this check in configure should not be removed anyway,
> since it is starting to be a long time since git-repo-config was
> renamed.

Speaking from a packaging standpoint, as this is the only reason git-core is a build dependency I would vote to get rid of it.

(I currently already patch the configure so I can build without git-core installed)

Jonas Fonseca· Feb 18, 2009, 11:29 UTC · re: Kris Shannon · lore

Re: [PATCH] Make tig call the correct git config command

Kris Shannon <kris@shannon.id.au> wrote Wed, Feb 18, 2009:
Show 10 quoted lines
> 2009/2/8 Jonas Fonseca <fonseca@diku.dk>
> > I wonder if this check in configure should not be removed anyway,
> > since it is starting to be a long time since git-repo-config was
> > renamed.
> 
> Speaking from a packaging standpoint,  as this is the only reason
> git-core is a build dependency I would vote to get rid of it.
> 
> (I currently already patch the configure so I can build without git-core
> installed)
Where can I get your patch?
-- 
Jonas Fonseca

← back to recent threads