mirror of
https://github.com/go-gitea/gitea.git
synced 2026-01-25 04:11:05 +01:00
Fix bug
This commit is contained in:
parent
10d4361a5c
commit
5e85f8c07c
@ -57,6 +57,12 @@ func GetCompareInfo(ctx context.Context, baseRepo, headRepo *repo_model.Reposito
|
||||
compareInfo.MergeBase = compareInfo.BaseCommitID
|
||||
}
|
||||
|
||||
if baseRepo.ID != headRepo.ID {
|
||||
if err := gitrepo.FetchRemoteCommit(ctx, headRepo, baseRepo, compareInfo.BaseCommitID); err != nil {
|
||||
return nil, fmt.Errorf("FetchRemoteCommit: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Count number of changed files.
|
||||
// This probably should be removed as we need to use shortstat elsewhere
|
||||
// Now there is git diff --shortstat but this appears to be slower than simply iterating with --nameonly
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user