Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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. |
a1597f4
to31ae954
Comparecodecov-io commentedAug 22, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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>
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. |
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 :/. |
worktrees: make non-packed refs also work correctly.
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