Skip to content

Commit cf43ee4

Browse files
brechtvlbartvdbraak
authored andcommitted
BLENDER: Workaround internal server error comparing branches on some repos
https://projects.blender.org/infrastructure/blender-projects-platform/issues/61 And add trace log for investigation.
1 parent cce02a8 commit cf43ee4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/git/repo_compare.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ func (repo *Repository) GetMergeBase(tmpRemote, base, head string) (string, stri
3939
if tmpRemote != "origin" {
4040
tmpBaseName := RemotePrefix + tmpRemote + "/tmp_" + base
4141
// Fetch commit into a temporary branch in order to be able to handle commits and tags
42-
_, _, err := NewCommand("fetch", "--no-tags").AddDynamicArguments(tmpRemote).AddDashesAndList(base+":"+tmpBaseName).RunStdString(repo.Ctx, &RunOpts{Dir: repo.Path})
42+
// --no-write-commit-graph works around issue with commit-graph-chain.lock files that should not be there.
43+
_, _, err := NewCommand("fetch", "--no-write-commit-graph", "--no-tags").AddDynamicArguments(tmpRemote).AddDashesAndList(base+":"+tmpBaseName).RunStdString(repo.Ctx, &RunOpts{Dir: repo.Path})
4344
if err == nil {
4445
base = tmpBaseName
46+
} else {
47+
logger.Trace("GetMergeBase failed to git fetch. Error: %v", err)
4548
}
4649
}
4750

0 commit comments

Comments
 (0)