bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] git-version-gen: include command name in one more diagnostic


From: Bruce Korb
Subject: Re: [PATCH] git-version-gen: include command name in one more diagnostic
Date: Mon, 03 Jan 2011 15:58:51 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11

On 01/03/11 11:29, Jim Meyering wrote:
>> Does that "git diff-index" really need to be run in a separate
>> shell invocation?
>>> dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
> 
> Yes.  As I recall, that was required in order to ensure that even when
> the shell fails to find a "git" program, the stderr output
> is redirected.

I do find that confusing since:
   dirty=`git diff-index --name-only HEAD` 2>/dev/null
really ought to be sufficient with any sane shell, but
I'm no expert on weirdo stuff...

>> But also note that this script will be run from a tarball
>> in an environment where there may well be some waaaay out of
>> date git (assuming git is there at all).
> 
> The recommended way to run git-version-gen
> ensures that when run from a just-unpacked tarball,
> it has a file name argument (.tarball-version),

Gary, we need a "make dist" hook to create that file,
because you won't find it in the libposix tarball.

> gnulib-tool and configure scripts do the same thing, but don't
> try as hard as init.sh does to find the shell features I now require.

I'll need to go poking around some day when I've got extra time.....

Cheers - Bruce



reply via email to

[Prev in Thread] Current Thread [Next in Thread]