Re: [PATCH 2/2] t7063: mtime-mangling instead of delays in untracked cache testing
On Mon, Feb 28, 2022 at 11:19 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
>
> "Tao Klerks via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > +chmmtime_worktree_root () {
>
> Not "chmtime_worktree_root"? Is doubled-m intended?
>Show 23 quoted lines
> > + # chmtime doesnt handle relative paths on windows, so need
> > + # to "hardcode" a reference to the worktree folder name.
> > + cd .. &&
> > + test-tool chmtime $1 worktree &&
> > + cd worktree
>
> An unsuspecting caller will be left in a directory it didn't expect
> to when "test-tool chmtime" fails, which is not nice.
>
> (
> cd .. &&
> test-tool chmtime "$1" worktree
> )
>
> at least until the tool learns to do
>
> test-tool chmtime "$1" ../worktree
>
> or
>
> test-tool -C.. chmtime "$1" worktree
>
> Oh, isn't the last one already available?