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

plumbing/revlist: input as a slice of hashes instead of commits #292

Merged
merged 1 commit into from
Feb 28, 2017
Merged

plumbing/revlist: input as a slice of hashes instead of commits #292

merged 1 commit into from
Feb 28, 2017

Conversation

ajnavarro
Copy link
Contributor

  • Now the input of the method Objects inside revlist package is a slice of hashes instead of commits. Hashes can be from Blobs, Trees and Commits objects.
  • ObjectStorer now is used to obtain the object content using hashes slice.
  • This PR fix Revlist implementation returns more objects than expected. #222. Now a test into upload_pack_test.go file is not skipped anymore.
  • Remove code from remote.go and server.go that is not necessary.

@ajnavarro ajnavarro changed the title plumbing/revlist: inpout as a slice of hashes instead of commits plumbing/revlist: input as a slice of hashes instead of commits Feb 27, 2017
@codecov-io
Copy link

codecov-io commented Feb 27, 2017

Codecov Report

Merging #292 into master will increase coverage by 0.01%.
The diff coverage is 81.25%.

@@            Coverage Diff             @@
##           master     #292      +/-   ##
==========================================
+ Coverage   77.03%   77.04%   +0.01%     
==========================================
  Files         116      116              
  Lines        7902     7904       +2     
==========================================
+ Hits         6087     6090       +3     
- Misses       1161     1162       +1     
+ Partials      654      652       -2
Impacted Files Coverage Δ
remote.go 69.61% <100%> (+0.38%)
plumbing/transport/server/server.go 58.21% <100%> (-2.42%)
plumbing/revlist/revlist.go 80.3% <77.5%> (+6.71%)

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 0e9dea1...9a469de. Read the comment docs.

@@ -11,30 +12,56 @@ import (
)

// Objects applies a complementary set. It gets all the hashes from all
// the reachable objects from the given commits. Ignore param are object hashes
// the reachable objects from the given objects. Ignore param are object hashes
// that we want to ignore on the result. It is a list because is
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is a list because is easier to interact with other porcelain elements, but internally it is converted to a map.

This comment is about the internal implementation and users do not care too much about this. Could you just remove this part?

- Now the input of the method Objects inside revlist package is a slice of hashes instead of commits. Hashes can be from Blobs, Trees and Commits objects.
- ObjectStorer now is used to obtain the object content using hashes slice.
- This PR fix #222. Now a test into upload_pack_test.go file is not skipped anymore.
- Remove code from remote.go and server.go that is not necessary.
Copy link
Contributor

@alcortesm alcortesm left a comment

Choose a reason for hiding this comment

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

Awesome patch and explanation!

@mcuadros mcuadros merged commit ab6f224 into src-d:master Feb 28, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revlist implementation returns more objects than expected.
5 participants