Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

revlist: ignore all objects reachable from ignored objects #516

Merged
merged 1 commit into from
Jul 28, 2017
Merged

revlist: ignore all objects reachable from ignored objects #516

merged 1 commit into from
Jul 28, 2017

Conversation

smola
Copy link
Collaborator

@smola smola commented Jul 27, 2017

Usually we call revlist.Objects ignoring a set of commits.
This is not enough to ignore everything reachable from such
set, so we first get all objects reachable from the ignored
set and then walk the tree again ignoring that new set.

Fixes #505

func Objects(
s storer.EncodedObjectStorer,
objs []plumbing.Hash,
ignore []plumbing.Hash) ([]plumbing.Hash, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you duplicating the types?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not duplicated. The public signature is still the same. However, I moved most of the logic of Objects to a private implementation objects which can be called with further arguments. That one is used from Objects and it's called twice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it ;)

Usually we call revlist.Objects ignoring a set of commits.
This is not enough to ignore everything reachable from such
set, so we first get all objects reachable from the ignored
set and then walk the tree again ignoring that new set.
@codecov
Copy link

codecov bot commented Jul 27, 2017

Codecov Report

Merging #516 into master will decrease coverage by 0.49%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #516     +/-   ##
=========================================
- Coverage   78.29%   77.79%   -0.5%     
=========================================
  Files         128      128             
  Lines        9540     9528     -12     
=========================================
- Hits         7469     7412     -57     
- Misses       1264     1322     +58     
+ Partials      807      794     -13
Impacted Files Coverage Δ
plumbing/revlist/revlist.go 78.2% <60%> (-0.06%) ⬇️
plumbing/transport/ssh/common.go 2.81% <0%> (-47.89%) ⬇️
plumbing/transport/ssh/auth_method.go 33.33% <0%> (-24.77%) ⬇️
storage/filesystem/object.go 68.58% <0%> (-0.49%) ⬇️
plumbing/cache/object_lru.go
plumbing/cache/object.go 100% <0%> (ø)
plumbing/format/packfile/decoder.go 81.25% <0%> (+0.4%) ⬆️
plumbing/cache/queue.go 59.09% <0%> (+59.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b08a30...a9c3fdc. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants