Hi Paul,

2016-05-08 20:21 GMT+02:00 Paul Eggert <[email protected]>:
> Mosè Giordano wrote:
>> the attached patch makes git-version-gen compatible with dash shell,
>> whose shift built-in aborts when there are no more arguments.
>
> Can you explain why that patch is needed? The 'shift' is inside a 'while test 
> $#
> -gt 0' loop, so I don't see how $# could be zero there. What's the use case 
> and
> behavior without the patch?

$# is 0 if you provide --prefix or --fallback option, for example,
because shift is run within the case, before being run another time at
the end of while-loop.  Without the patch I get a

    shift: can't shift that many

error.  See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627856

Bye,
Mosè

Reply via email to