Re: [PATCH] doc-diff: don't `cd_to_toplevel` before calling `usage`
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 3, 2019, 09:11 UTC
- Message-ID
- <CAPig+cQYuwMmyw8_p863BeSU5RP-xdB=HFMa7EM4G3YALQj3_g@mail.gmail.com>
- In-Reply-To
- <CAPig+cRN_Jw_vj5=RWZJWp-Wn6-=Vd9oZKQieMWJ02TjAHWwWg@mail.gmail.com>
On Sun, Feb 3, 2019 at 4:08 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 6 quoted lines
> 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.