Commit d1c40f4
committed
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.
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>1 parent cf8dc25 commit d1c40f4
File tree
5 files changed
+45
-29
lines changed- git
- refs
- repo
- test
5 files changed
+45
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
74 | | - | |
| 82 | + | |
75 | 83 | | |
76 | 84 | | |
77 | 85 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
130 | | - | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 176 | + | |
182 | 177 | | |
183 | 178 | | |
184 | 179 | | |
| |||
433 | 428 | | |
434 | 429 | | |
435 | 430 | | |
436 | | - | |
| 431 | + | |
437 | 432 | | |
438 | 433 | | |
439 | 434 | | |
| |||
484 | 479 | | |
485 | 480 | | |
486 | 481 | | |
| 482 | + | |
487 | 483 | | |
488 | | - | |
| 484 | + | |
489 | 485 | | |
490 | 486 | | |
491 | 487 | | |
| |||
559 | 555 | | |
560 | 556 | | |
561 | 557 | | |
562 | | - | |
563 | | - | |
| 558 | + | |
| 559 | + | |
564 | 560 | | |
565 | 561 | | |
566 | 562 | | |
| |||
594 | 590 | | |
595 | 591 | | |
596 | 592 | | |
597 | | - | |
| 593 | + | |
598 | 594 | | |
599 | 595 | | |
600 | 596 | | |
| |||
605 | 601 | | |
606 | 602 | | |
607 | 603 | | |
608 | | - | |
| 604 | + | |
609 | 605 | | |
610 | 606 | | |
611 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
655 | | - | |
| 655 | + | |
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
178 | | - | |
| 185 | + | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
182 | | - | |
| 189 | + | |
183 | 190 | | |
184 | 191 | | |
185 | 192 | | |
| |||
236 | 243 | | |
237 | 244 | | |
238 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
239 | 253 | | |
240 | 254 | | |
241 | 255 | | |
| |||
574 | 588 | | |
575 | 589 | | |
576 | 590 | | |
577 | | - | |
| 591 | + | |
578 | 592 | | |
579 | 593 | | |
580 | 594 | | |
| |||
932 | 946 | | |
933 | 947 | | |
934 | 948 | | |
935 | | - | |
| 949 | + | |
936 | 950 | | |
937 | 951 | | |
938 | 952 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
| 938 | + | |
| 939 | + | |
938 | 940 | | |
939 | 941 | | |
940 | 942 | | |
| |||
0 commit comments