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

Conversation

@JoshuaSjoding
Copy link
Contributor

  • New Object interface is distinct from core.Object
  • New Object interface is used in places where returned object could be of any type
  • Object is implemented by Commit, Tree, Blob, File and Tag
  • Added Repository.Object function for retrieving objects of any type
  • Tag.Object now returns Object instead of core.Object
  • Tag target hash is now publicly accessible
  • Renamed Tag.Type field to Tag.TargetType, making it distinct from Tag.Type function
  • Fixed infinite recursive loop in TagIter.Close
  • TreeWalker.Next now returns Object instead of core.Object
  • Removed some duplicate test setup code

@codecov-io
Copy link

Current coverage is 62.68%

Merging #39 into master will increase coverage by +0.38% as of 2fe521e

@@            master     #39   diff @@
======================================
  Files           31      31       
  Stmts         1703    1731    +28
  Branches       261     261       
  Methods          0       0       
======================================
+ Hit           1061    1085    +24
+ Partial        133     132     -1
- Missed         509     514     +5

Review entire Coverage Diff as of 2fe521e

Powered by Codecov. Updated on successful CI builds.

// This interface is intentionally different from core.Object, which is a lower
// level interface used by storage implementations to read and write objects.
type Object interface {
ID() core.Hash
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really wanted to call this function Hash() so that the name matched core.Object's equivalent, but that would have conflicted with the existing Hash field on Commit, Tree, Blob and Tag.

* New Object interface is distinct from core.Object
* New Object interface is used in places where returned object could be of any type
* Object is implemented by Commit, Tree, Blob, File and Tag
* Added Repository.Object function for retrieving objects of any type
* Tag.Object now returns Object instead of core.Object
* Tag target hash is now publicly accessible
* Renamed Tag.Type field to Tag.TargetType, making it distinct from Tag.Type function
* Fixed infinite recursive loop in TagIter.Close
* TreeWalker.Next now returns Object instead of core.Object
* Removed some duplicate test setup code
@JoshuaSjoding JoshuaSjoding force-pushed the git-object-interface branch from 3ff0a7e to 619e512 Compare March 8, 2016 21:12
mcuadros added a commit that referenced this pull request Mar 8, 2016
Added Object interface for Commit, Tree, Blob and Tag
@mcuadros mcuadros merged commit 19e3d1e into src-d:master Mar 8, 2016
@JoshuaSjoding JoshuaSjoding deleted the git-object-interface branch June 24, 2016 09:02
mcuadros added a commit that referenced this pull request Jan 31, 2017
Added Object interface for Commit, Tree, Blob and Tag
gsalingu-ovhus pushed a commit to gsalingu-ovhus/go-git that referenced this pull request Mar 28, 2019
Protect file removing with upload token
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