Affects Version/s: None
Fix Version/s: 1.3
The blame information can be completely wrong when fetching it from a shallow clone, without errors or warnings. When the outcome is invalid data, it's extremely difficult to diagnose that it comes from a shallow clone.
If a line in a file was not changed in the commits that were downloaded as part of the shallow fetch, git will report the first known commit as the author.
This has a big impact on the auto-assignment of new issues.
We should try to detect if the current repo is a shallow clone. If it's the case:
- give a warning (one time)
- return no blame (no-op)
One way is to detect shallow clones is to read .git/shallow.