Skip to content

reference: iter_item method add a parameter to return the ref's destination #624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

wusisu
Copy link
Contributor

@wusisu wusisu commented May 4, 2017

This solve my problem #622 .

I have no idea and need advice about if this PR should be merged into GitPython.

@codecov-io
Copy link

codecov-io commented May 9, 2017

Codecov Report

Merging #624 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #624      +/-   ##
=========================================
+ Coverage   94.47%   94.5%   +0.03%     
=========================================
  Files          63      61       -2     
  Lines        9964    9957       -7     
=========================================
- Hits         9413    9410       -3     
+ Misses        551     547       -4
Impacted Files Coverage Δ
git/test/test_refs.py 99.18% <100%> (+0.01%) ⬆️
git/refs/reference.py 95.74% <100%> (ø) ⬆️
git/refs/symbolic.py 96.45% <100%> (+0.11%) ⬆️
git/refs/remote.py 93.27% <0%> (-6.73%) ⬇️
git/objects/submodule/util.py 91.9% <0%> (-0.95%) ⬇️
git/util.py
git/__init__.py
git/remote.py
git/objects/submodule/__init__.py 92% <0%> (ø)
git/test/test_repo.py 97.47% <0%> (+0.33%) ⬆️

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 32da7fe...e21d1b2. Read the comment docs.

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution! I like particularly that you have added a test as well.

With the doc-string modifications it definitely is ready to go.

@@ -94,10 +94,10 @@ def name(self):
return '/'.join(tokens[2:])

@classmethod
def iter_items(cls, repo, common_path=None):
def iter_items(cls, repo, common_path=None, with_destination=False):
"""Equivalent to SymbolicReference.iter_items, but will return non-detached
references as well."""
Copy link
Member

Choose a reason for hiding this comment

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

Could you please describe what with_destination does in the doc-string? Since it is not available in the SymbolicReference, it's probably correct to put it here and make a note about this specialty in SymbolicReference.iter_items().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants