-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changeset: Look in packed-refs if ref file not found. #2425
Conversation
9a67013
to
2e90e37
Compare
Codecov Report
@@ Coverage Diff @@
## main #2425 +/- ##
==========================================
- Coverage 63.52% 63.48% -0.04%
==========================================
Files 228 228
Lines 9990 9996 +6
==========================================
Hits 6346 6346
- Misses 3344 3347 +3
- Partials 300 303 +3
Continue to review full report at Codecov.
|
If you have a lot of refs in a repo, git will eventually start condensing them into a single file instead of letting them sprawl out in separate directories on the filesystem. This change lets the changeset package use the packed-refs file as a fall back in the event that the ref file is not found. See https://git-scm.com/docs/git-pack-refs for more details on packed refs.
2e90e37
to
62b1122
Compare
I actually want to replace this package to use https://pkg.go.dev/runtime/debug there's a ReadBuildInfo function does that give you what you want? |
Did some testing - runtime/debug probably won't be super useful until 1.18, particularly for local changes. The main module info for something built not at a semver tag looks like:
What we really want are the vcs tags included in 1.18 which look like:
|
/lgtm thanks for the due diligence |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, wlynch The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
Changes
🎁 changeset: Look in packed-refs file if ref file not found.
If you have a lot of refs in a repo, git will eventually start
condensing them into a single file instead of letting them sprawl out in
separate directories on the filesystem. This change lets the changeset
package use the packed-refs file as a fall back in the event that the
ref file is not found.
See https://git-scm.com/docs/git-pack-refs for more details on packed
refs.
/kind feature
Bumped into this while working on some Tekton PRs - the refs got stuffed into
packed-refs
and calls relying onchangeset.Get()
started failing / causing log noise because therefs/heads/main
file no longer existed. Seems small enough that it didn't warrant its own issue, but happy to open one if desired!Release Note
Docs
n/a