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

git: Repository methods changes #296

Merged
merged 2 commits into from
Mar 21, 2017
Merged

git: Repository methods changes #296

merged 2 commits into from
Mar 21, 2017

Conversation

ajnavarro
Copy link
Contributor

@ajnavarro ajnavarro commented Mar 1, 2017

To have a more consistent public API, we decided to rename some methods and add others:

  • Commit method renamed to CommitObject
  • Commits method renamed to CommitObjects
  • Tags method renamed to TagObjects
  • Tag method renamed to TagObject
  • Added method Tags that returns tag references
  • Added method Branches that returns branch references
  • Added method Notes that returns note references
  • Added BlobObject method
  • Added BlobObjects method
  • Remove Tree method
  • Remove Trees method

Also, we added more functionality related to references:

  • Added iterator to iterate References with a specific filter

Some notes:

@codecov
Copy link

codecov bot commented Mar 1, 2017

Codecov Report

Merging #296 into master will increase coverage by 0.2%.
The diff coverage is 87.3%.

@@            Coverage Diff            @@
##           master     #296     +/-   ##
=========================================
+ Coverage   77.19%   77.39%   +0.2%     
=========================================
  Files         117      117             
  Lines        7937     7986     +49     
=========================================
+ Hits         6127     6181     +54     
+ Misses       1159     1147     -12     
- Partials      651      658      +7
Impacted Files Coverage Δ
worktree.go 56.69% <100%> (ø)
repository.go 71.78% <83.33%> (+3.28%)
plumbing/storer/reference.go 71.18% <92.3%> (+15.3%)

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 f64e4b8...0c82b41. Read the comment docs.

@ajnavarro ajnavarro changed the title WIP: git: Repository methods changes git: Repository methods changes Mar 2, 2017
@mcuadros
Copy link
Contributor

mcuadros commented Mar 3, 2017

Why we are removing Tree?

@ajnavarro
Copy link
Contributor Author

@mcuadros because we talked about this. Get a specific Tree from Porcelain is a little weird, or a list with all the Trees.

I can keep these methods if it's necessary.

@@ -28,6 +28,67 @@ type ReferenceIter interface {
Close()
}

type ReferenceFilteredIter struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's make this type private.

@smola smola requested a review from mcuadros March 3, 2017 15:15
To have a more consistent public API, we decided to rename some methods, and add others:

- Commit method renamed to CommitObject
- Commits method renamed to CommitObjects
- Tree method renamed to TreeObject
- Trees method renamed to TreeObjects
- Tags method renamed to TagObjects
- Tag method renamed to TagObject
- Added method Tags that returns tag references
- Added method Branches that returns branch references
- Added method Notes that returns note references
- Added BlobObject method
- Added BlobObjects method

Also, we added more functionality related to references:
- Added iterator to iterate References with a specific filter

Some notes:
- #298
@thefallentree
Copy link

👍

@smola smola merged commit f51d4a8 into src-d:master Mar 21, 2017
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.

5 participants