summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-08-29 07:46:30 -0700
committerStan Hu <stanhu@gmail.com>2016-09-01 00:08:23 -0700
commitd326d3428da89b943bb5f1d4d396f21b3e999ff7 (patch)
tree218de7018f84bd040671f6fd87b4b760d363f63f /app/finders
parent1c4e866348e0c782d2e5374209508785ac812c7a (diff)
downloadgitlab-ce-d326d3428da89b943bb5f1d4d396f21b3e999ff7.tar.gz
Optimize branch lookups and force a repository reload for Repository#find_branchsh-reload-find-branch
If `git gc` runs and `Repository` has an instance to `Rugged::Repository`, a bug in libgit2 may cause the instance to return a stale value or a missing branch. This change not only optimizes the branch lookup so we don't have to iterate through every branch, but it also works around the `git gc` issue by forcing a repository reload every time `Repository#find_branch` is called. See: https://github.com/libgit2/libgit2/issues/1534 Closes #15392, #21470
Diffstat (limited to 'app/finders')
0 files changed, 0 insertions, 0 deletions