flipt icon indicating copy to clipboard operation
flipt copied to clipboard

fix(git): complete ref update after fetch for both bare and normal repositories

Open erka opened this issue 3 weeks ago • 2 comments

The Fetch method was not persisting fetched references to refs/heads after pulling from the remote. When using depth=1 (shallow fetches), the shallow boundary wasn't maintained and refs/heads/ were never created. For normal repos with full history, updatedRefs were collected but never written to storage.

  • For shallow repositories: Create refs/heads/ and maintain shallow boundary
  • For normal repositories: Create refs/heads/ from updatedRefs
  • Ensure both code paths properly persist fetched references to local storage

erka avatar Dec 07 '25 22:12 erka

Related Documentation

1 document(s) may need updating based on files changed in this PR:

flipt

How did I do? Any feedback?  Join Discord

dosubot[bot] avatar Dec 07 '25 22:12 dosubot[bot]

Codecov Report

:x: Patch coverage is 70.00000% with 12 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 60.59%. Comparing base (2b0f8ce) to head (2c741f1).

Files with missing lines Patch % Lines
internal/storage/git/repository.go 70.00% 7 Missing and 5 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##               v2    #5144      +/-   ##
==========================================
+ Coverage   60.53%   60.59%   +0.06%     
==========================================
  Files         138      138              
  Lines       13504    13542      +38     
==========================================
+ Hits         8174     8206      +32     
- Misses       4641     4643       +2     
- Partials      689      693       +4     
Flag Coverage Δ
integrationtests 34.77% <50.00%> (+0.09%) :arrow_up:
unittests 51.96% <70.00%> (+0.14%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 07 '25 22:12 codecov[bot]