[Top][All Lists]
[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 10:57:08 -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 09:56, Jim Meyering wrote:
> Did you determine which git command failed and why?
There was only one git command that did not have stderr redirected:
numcommits=`git rev-list "$vtag"..HEAD | wc -l`
But in truth, *no* git command should have its error output
displayed without proper git-version-gen context. Or "cat"
either, for that matter.
> The only git commands that git-version-gen should be running
> these days are git describe (it runs git rev-list only to accommodate
> very old versions of git), git update-index, and git diff-index.
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=
How is that different from:
> dirty=`git diff-index --name-only HEAD 2>/dev/null` || dirty=
exported variables get passed through either way.....
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).
>> I'll supply that patch, if you like.
Your "commit_list" patch should fix the issue.
>> Is it okay to use the post-1977 concept of a shell function?
>> Even the Solaris /bin/sh supports it .....
>
> Yes, it inherits portability constraints from configure,
> which now uses shell functions.
Maybe Open Solaris will move /bin/sh to something not over 20 years
old and things can move along? :-D
Cheers - Bruce
- [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Bruce Korb, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Bruce Korb, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Bruce Korb, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic,
Bruce Korb <=
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Ben Pfaff, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Ralf Wildenhues, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Ben Pfaff, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Bruce Korb, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Eric Blake, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Bruce Korb, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/04
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Eric Blake, 2011/01/04