The `ci.HeadGitRepo` was opened and closed in the function `ParseCompareInfo` but reused in the function `PrepareCompareDiff`.
The `ci.HeadGitRepo` was opened and closed in the function `ParseCompareInfo` but reused in the function `PrepareCompareDiff`.