Uh oh!
There was an error while loading. Please reload this page.
worktrees: make non-packed refs also work correctly. - #654
Conversation
vathpela
commented
Aug 4, 2017
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 to
31ae954CompareCodecov 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 out aec58a9 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, 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 of 346424d, 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
commented
Aug 23, 2017
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
commented
Sep 28, 2017
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 out aec58a9 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, in getitem
raise IndexError("No item found with id %r" % (self._prefix + index))
IndexError: No item found with id 'aaaaaaaa'
Woops.
Signed-off-by: Peter Jones pjones@redhat.com