also sprach Joey Hess <jo...@debian.org> [2014-09-10 02:42 +0200]:
> mr runs all kinds of external commands. How does changing the CWD
> and leaving it changed not affect them?

Previously, the CWD was just left at the top-level, right?
Therefore, I assume that the commands all already took precautions
to ensure that they operate on the right subdir, e.g. by setting
GIT_DIR.

It'll be trivial to chdir() back to the previous WD. I don't even
think we need to check for its existence or handle an error, because
the previous WD will always be a parent of the CWD.

However, in my tests, this was not necessary. Hence I left it out.

Or am I not seeing all the corner cases here?

-- 
 .''`.   martin f. krafft <madduck@d.o> @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems
 
consciousness: that annoying time between naps.

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)

Reply via email to