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