Git · Senior · Question 65 of 76
Why might CI on a shallow clone compute the wrong set of changed files?
- ✓Correct answer: The merge base with
mainmay be missing from the history - 2CI servers block
git diffon shallow repositories - 3Shallow clones contain no files at all
Explanation
Diffing a PR against main needs their common ancestor. Fetch enough depth (or the base branch) before computing affected packages.