* Propagate nonzero exit status from git ls-files when a specified
file does not exist, or a specified directory does not contain
any files checked into git.
+ * Avoid git-annex test being very slow when run from within the
+ standalone linux tarball or OSX app.
-- Joey Hess <id@joeyh.name> Wed, 23 Feb 2022 14:14:09 -0400
setTestMode testmode = do
currdir <- getCurrentDirectory
p <- Utility.Env.getEnvDefault "PATH" ""
+ pp <- Annex.Path.programPath
mapM_ (\(var, val) -> Utility.Env.Set.setEnv var val True)
- -- Ensure that the just-built git annex is used.
- [ ("PATH", currdir ++ [searchPathSeparator] ++ p)
+ -- Ensure that the same git-annex binary that is running
+ -- git-annex test is at the front of the PATH.
+ [ ("PATH", takeDirectory pp ++ [searchPathSeparator] ++ p)
, ("TOPDIR", currdir)
-- Avoid git complaining if it cannot determine the user's
-- email address, or exploding if it doesn't know the user's
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2022-03-01T19:58:37Z"
+ content="""
+I have fixed the problem I identified, which was due to git-annex test adding
+the cwd to PATH, which caused it to run git-annex.linux/git, so runshell
+was being run repeatedly and unncessarily.
+
+Now it will run git-annex.linux/bin/git and avoid the repeated runshell
+overhead, so will be about as fast as git-annex not run from the standalone
+tarball.
+"""]]