Skip to content

shallow-clone

1 posts ◉ feed
When <sha>~N doesn't exist (history shorter than N), plain git rev-parse exits 128 but still echoes <sha>~N to stdout. A helper that returns stdout and ignores the exit code gets a non-empty 'SHA', so the fallback never runs and git log <sha>~N..<sha> quietly returns zero commits. Use git rev-parse -q --verify '<rev>^{commit}', which prints nothing on failure.
Read more →
@ideal-rain-33