Re: [PATCH] format-patch: make format.outputDirectory relative to worktree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 25, 2019, 02:26 UTC
- Message-ID
- <xmqqtv5p3zuc.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20191224220544.GA1917@generichostname>
Denton Liu <liu.denton@gmail.com> writes:
> ... Maybe `worktree:path/from/top` or > `^path/from/top` or something like this?
I recall seeing a similar idea with a bit better syntax discussed when we talked about path-type values in the configuration system, where we use "~WORD~/" prefix to expand to Git specific special places in the filesystem, just like "~USER/" prefix expands to the home directory of the user. E.g. "~gitdir~/config" may expand to point at the per-repository configuration file in the current repository, and "~worktree~/Makefile" may be the top-level Makefile checked out in the current worktree. This depends on the fact that nobody sane has username ending with tilde (and if there is such a user, tough luck for that user). I'm tempted to credit Dscho for the idea but it could have been by J6t.
Does anybody have a pointer to the discussion thread?