bug-gnulib
[Top][All Lists]
Advanced

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

Re: fatal: ambiguous message


From: Bruce Korb
Subject: Re: fatal: ambiguous message
Date: Mon, 03 Jan 2011 10:38:07 -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 07:04, Eric Blake wrote:
> Bruce's patch mixes refactoring with bug fixing, making it a bit harder
> to read, and introduced a bug in its own right:

>> -# Avoid meddling by environment variable of the same name.
>> -v=
>> +get_ver()
>> +{
>> +    local PS4='>gv> '
> 
> Portable scripts CANNOT use local (since POSIX does not require it), and
> setting PS4 is not commonly done in portable scripting.

Hi Eric,

That's what I call a "dinkleberry".
Sorry.  Very helpful for debugging tho.....

> I'll probably end up writing yet a third approach, which collects git
> rev-list output into a temporary variable in order to correctly detect
> failures, without refactoring into a helper function.

Dump all stderr to a temp file, print it if needed then remove it?
Presuming that:
   exec 8>&2 2>$TMPDIR/.git-ver-gen-$$
.........
   cat $TMPDIR/.git-ver-gen-$$ >&8
   rm -f $TMPDIR/.git-ver-gen-$$
is portable.



reply via email to

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