Re: [PATCH 8/8] dir: avoid removing the current working directory
- From
Elijah Newren <newren@gmail.com>
- Date
- Nov 25, 2021, 02:54 UTC
- Message-ID
- <CABPp-BH_NfkzX5XkhPPpX1_bsR9kWGsBBdcUwikDWsA8jc6KJA@mail.gmail.com>
- In-Reply-To
- <211124.86sfvld4cl.gmgdl@evledraar.gmail.com>
On Wed, Nov 24, 2021 at 6:18 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 5 quoted lines
> > I fleshened this out a bit in this WIP change: > https://github.com/avar/git/tree/avar/setup-handle-gone-directory + > commit: > https://github.com/avar/git/commit/97968518909eef88edba44973b7885d154b7a273
Sweet!
Show 9 quoted lines
> As noted there there's some caveats, but so far nothing I spotted that > can't be overcome. It's particularly painful to test it because of an > implementation detail of our test suite, the bin-wrappers are > shellscripts, and the very first thing they do is reset $PWD (none of > which happens if you run the real "git" binary). > > That's b.t.w. the "shell-init" error you noted in > https://lore.kernel.org/git/CABPp-BEp3OL7F2J_LzqtC-x-8pBUPO8ZR1fTx_6XbqZeOH1kRw@mail.gmail.com/, > it's from the bin-wrapper.
To be a bit more precise, the error/warning is from bash rather than the bin-wrappers specifically; for example, you can also trigger the same shell-init message with a simple `bash -c 'echo hello'` when your cwd has been deleted.
> I really wish we didn't have the bin-wrappers...
I'm curious: is this issue the only reason, or am I reading between the lines correctly that you have additional reasons for that?