diff options
author | Abhinav Gupta <mail@abhinavg.net> | 2021-11-27 14:32:18 -0800 |
---|---|---|
committer | Abhinav Gupta <mail@abhinavg.net> | 2021-11-27 16:39:09 -0800 |
commit | 977668a25d210e8985a55ede0f2382a48b8ad2e2 (patch) | |
tree | 7e19f84523d2b5f751b1340e94f92655c415c620 /storage | |
parent | cde3a0d0318303df384d8441c2cc08ca645f8e6a (diff) | |
download | go-git-977668a25d210e8985a55ede0f2382a48b8ad2e2.tar.gz |
transactional/ReferenceStorage: Drop packRefs field
The packRefs field is unused.
It is assigned to true from the `PackRefs()` method,
but because the method is not on the pointer type,
the assignment has no effect.
var st ReferenceStorage
fmt.Println(st.packRefs) // false
st.PackRefs()
fmt.Println(st.packRefs) // false
Delete the unused field.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/transactional/reference.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/storage/transactional/reference.go b/storage/transactional/reference.go index 3b009e2..1c09307 100644 --- a/storage/transactional/reference.go +++ b/storage/transactional/reference.go @@ -15,9 +15,6 @@ type ReferenceStorage struct { // commit is requested, the entries are added when RemoveReference is called // and deleted if SetReference is called. deleted map[plumbing.ReferenceName]struct{} - // packRefs if true PackRefs is going to be called in the based storer when - // commit is called. - packRefs bool } // NewReferenceStorage returns a new ReferenceStorer based on a base storer and @@ -108,7 +105,6 @@ func (r ReferenceStorage) CountLooseRefs() (int, error) { // PackRefs honors the storer.ReferenceStorer interface. func (r ReferenceStorage) PackRefs() error { - r.packRefs = true return nil } |