Skip to main content

v2.79.1

Binaries and the merged-pull-request list are on the GitHub releases page.

Git in a staged job answers for the staged tree​

Since v2.78.0 a staged job's tree carries no .git. Its environment pointed GIT_DIR at the source repository and GIT_WORK_TREE at the source tree. The staged tree lives inside the source tree, under the ignored .orun/runs/, so every git command scoped to the working directory answered for an ignored subdirectory:

  • git ls-files run from the staged tree listed nothing;
  • git status . saw nothing;
  • git rev-parse --show-toplevel named the source tree, so a tool that read files from it read the source, not the job's copy.

A test that lists the repository's tracked files failed on every staged job (#757). That includes a single orun run --job at the default --concurrency, which stages because the default is above 1.

GIT_WORK_TREE is now the staged tree, and GIT_INDEX_FILE names a private copy of the source's index beside it. git reads the source's objects and refs, answers for the job's own tree, and a job's git status never writes the index that other jobs of the run read. A repository with no index yet (no commit) keeps the old behaviour. The private index is removed with the job's directory.

A source tree that is a linked worktree or a submodule, whose .git is a file naming its git directory, used to get no git environment at all in a staged job. It now gets that git directory.