Thread (1 message) 1 message, 1 author, 2016-06-15

Re: 'add -u' without path is relative to cwd

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:22

Clemens Buchacher [off-list ref] writes:
I can only guess that you mean the "sane way for script writers to defeat
the configuration without much pain" part. But I'm not sure how that's a
problem. If you want the script to continue to work as before you either
configure "workdir scope", or you add a '.' to the affected commands.
One who writes the script and lends it to you may be using different
`scope` from what the recipient uses, so that is not an escape hatch at
all.

One crudest form of workaround may be for your code to notice an
environment variable to override that `scope` configuration setting, so
that you can advise the script writers to set it in their script.  But
that is so ugly I'd rather not go there if we do not absolutely have to.

That is why in general we should be very careful and avoid any magic that
makes the same command behave completely differently depending on how a
repository is configured.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help