On Mon, Aug 30, 2010 at 10:54, Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> wrote: > Ęvar Arnfjörš Bjarmason <avarab@xxxxxxxxx> writes: > >> On Mon, Aug 30, 2010 at 09:50, Matthieu Moy <Matthieu.Moy@xxxxxxx> wrote: >>> The same pattern is used in many tests, and makes it easy for new ones to >>> rely on $HOME being a trashable, clean, directory. >> >> Looks good, but why not: >> >>> +HOME=$(pwd) >>> +export HOME >> >> This instead: >> >> HOME=$TRASH_DIRECTORY >> export HOME >> >> Looks like it might be more correct given this (always an absolute >> path), but I haven't tested: > > That should work too, but with your version, I have to think harder to > make sure $TRASH_DIRECTORY is absolute (that should be OK), and won't > make any issue with symlinks (I have no idea whether it is OK or not), > while it's trivially correct with mine (pwd is absolute, and the -P > option of the cd command right above prevents issue with symlinks). I don't know what's best here (and I didn't look hard at this). but I recently brought down the number of $(pwd) invocations in test-lib.sh down to exactly 1, so everything that comes later is now defined in terms of that pwd invocation. Defining everything that comes afterwards in terms of that pwd might be clearer. But it's a trivial issue. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html