Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

worktrees: make non-packed refs also work correctly.#654

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 1 commit intogitpython-developers:masterfromvathpela:worktrees
Sep 28, 2017

Conversation

vathpela
Copy link
Contributor

Turns outaec58a9 did the right thing for /packed/ refs, but didn't work
correctly on /unpacked/ refs. So this patch gives unpacked refs the
same treatment.

Without the fix here, the test added will cause this traceback:

======================================================================
ERROR: Check that we find .git as a worktree file and find the worktree

Traceback (most recent call last):
File "/home/pjones/devel/github.com/GitPython/git/test/lib/helper.py", line 92, in wrapper
return func(self, path)
File "/home/pjones/devel/github.com/GitPython/git/test/test_repo.py", line 938, in test_git_work_tree_dotgit
self.assertIsInstance(repo.heads['aaaaaaaa'], Head)
File "/home/pjones/devel/github.com/GitPython/git/util.py", line 893, ingetitem
raise IndexError("No item found with id %r" % (self._prefix + index))
IndexError: No item found with id 'aaaaaaaa'

Woops.

Signed-off-by: Peter Jonespjones@redhat.com

@vathpela
Copy link
ContributorAuthor

Don't apply this one just yet; I've discovered some more things I don't like, and it's better to fix them with a more systemic approach.

@vathpelavathpelaforce-pushed theworktrees branch 2 times, most recently froma1597f4 to31ae954CompareAugust 22, 2017 21:12
@codecov-io
Copy link

codecov-io commentedAug 22, 2017
edited
Loading

Codecov Report

Merging#654 intomaster willincrease coverage by0.17%.
The diff coverage is100%.

Impacted file tree graph

@@            Coverage Diff             @@##           master     #654      +/-   ##==========================================+ Coverage   92.57%   92.74%   +0.17%==========================================  Files          61       61                Lines        9968     9971       +3     ==========================================+ Hits         9228     9248      +20+ Misses        740      723      -17
Impacted FilesCoverage Δ
git/refs/symbolic.py96.11% <100%> (-0.08%)⬇️
git/refs/remote.py90% <100%> (-1.12%)⬇️
git/test/test_repo.py96.46% <100%> (+1.69%)⬆️
git/repo/base.py95.67% <100%> (+0.54%)⬆️
git/test/lib/helper.py85.46% <0%> (-2.33%)⬇️
git/test/test_remote.py97.27% <0%> (-0.55%)⬇️
git/objects/submodule/util.py76.75% <0%> (-0.44%)⬇️
... and2 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updatecf8dc25...d1c40f4. Read thecomment docs.

Turns outaec58a9 did the right thing for /packed/ refs, but didn't workcorrectly on /unpacked/ refs.  So this patch gives unpacked refs thesame treatment.Without the fix here, the test added will cause this traceback:======================================================================ERROR: Check that we find .git as a worktree file and find the worktree----------------------------------------------------------------------Traceback (most recent call last):  File "/home/pjones/devel/github.com/GitPython/git/test/lib/helper.py", line 92, in wrapper    return func(self, path)  File "/home/pjones/devel/github.com/GitPython/git/test/test_repo.py", line 938, in test_git_work_tree_dotgit    self.assertIsInstance(repo.heads['aaaaaaaa'], Head)  File "/home/pjones/devel/github.com/GitPython/git/util.py", line 893, in __getitem__    raise IndexError("No item found with id %r" % (self._prefix + index))IndexError: No item found with id 'aaaaaaaa'Woops.Things I've learned:- test_remote doesn't work currently if you start on a branch.  I think  it never did?- Because of346424d, all *sorts* of stuff in the test suite doesn't  work if you name your development branch "packed-refs"  (This seems like a bug...)Signed-off-by: Peter Jones <pjones@redhat.com>
@vathpela
Copy link
ContributorAuthor

Literally no idea why this is failing on AppVeyor. I'll try to have a look in the next couple of days, but it's pretty busy over here right now.

@Byron
Copy link
Member

Thanks a ton for your contribution, and my apologies for getting to this PR that late! Windows is constantly failing by now, so I choose to ignore it :/.

@ByronByron merged commita5f0343 intogitpython-developers:masterSep 28, 2017
@vathpelavathpela deleted the worktrees branchSeptember 28, 2017 17:26
riley-martine pushed a commit to riley-martine/GitPython that referenced this pull requestDec 7, 2023
worktrees: make non-packed refs also work correctly.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vathpela@codecov-io@Byron

[8]ページ先頭

©2009-2025 Movatter.jp