From: Jonathan Nieder Date: Sun, 24 Oct 2010 15:40:05 GMT Subject: Re: [WIP PATCH 01/18] rev-parse: add --internal-cwd and --internal-git-dir for tests Message-ID: <20101024154005.GB31764@burratino> In-Reply-To: <1287922310-14678-2-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy wrote: > --internal-cwd is obvious, no way else to expose it for testing. > > --internal-git-dir is introduced because --git-dir prepares its output > suitable for scripting. For tests, it must be exactly what git stores. Hmm. Forget this is used in tests, would it make sense to do this with trace_printf, at the end of setup, as in your earlier patch? I think it might: just like the exec: lines provide context about what command is being traced, such trace: cwd: lines would make it clearer what paths that are being output might be referring to. Returning to the topic of tests, is it possible to get at these variables using an external command that is run by git? pre-commit hook, maybe. Testing of other symptoms is also possible, as in Frédéric's example.