On Sun, Feb 3, 2019 at 5:37 AM Martin Ågren <martin.ag...@gmail.com> wrote:
> On Sun, 3 Feb 2019 at 10:12, Eric Sunshine <sunsh...@sunshineco.com> wrote:
> > On Sun, Feb 3, 2019 at 4:08 AM Eric Sunshine <sunsh...@sunshineco.com> 
> > wrote:
> > > I wonder if a more fruitful, longer-term fix which would save us from
> > > having to worry about this in the future, would be to make
> > > git-sh-setup.sh remember the original $0 before cd_to_toplevel() and
> > > then employ the original value when usage() re-execs with the -h
> > > option. That would also avoid the slightly ugly repeated
> > > cd_to_top_level() and 'tmp' assignment in this patch.
> >
> > By "original $0", I meant a path which would be suitable for
> > re-exec'ing (which wouldn't be the literal original $0). Sorry for the
> > confusion.
>
> Ok, so I am not too eager to try and tackle this with fallback
> strategies and what-not. What would you say if I punted on this? I could
> add something like this to the commit message:
>
>   A more general fix would be to teach git-sh-setup to save away the
>   absolute path for $0 and then use that, instead. I'm not aware of any
>   portable way of doing that, see, e.g., d2addc3b96 ("t7800: readlink
>   may not be available", 2016-05-31), so let's just fix this user
>   instead.
>
> What do you think? Thanks for your comments.

Punting and extending the commit message like that sounds reasonable.

Reply via email to