Jeff King <peff@xxxxxxxx> writes: > But I think a more compelling case is that there may be an ongoing > operation in the original repo (e.g., say you are in the middle of > writing a commit message) when we do a blind copy of the filesystem > contents. You might racily pick up a lockfile. > > Should we find and delete all *.lock files in the copied directory? That > would get ref locks, etc. Half-formed object files are OK. Technically > if you want to get an uncorrupted repository you'd also want to copy > refs before objects (in case somebody makes a new object and updates a > ref while you're copying). Or "git branch -m A B" is in progress. I think it all depends on what your "threat" model is ;-). Do we assume that many users are "time-sharing" a box and a repository? If not, i.e. if you are the sole user of a box and a repository on it, such a concurrent access to make the result of git-unaware copy problematic will not be in index.lock (after all you are now doing the perf thing, not editing a commit log message in the repository used for testing Git), but will be in ref locks (somebody else pushing into the repository you are *not* currently using from sideways).