forked from jelmer/dulwich
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add get_peeled to BaseRepo so HTTP and git servers use one call to pe…
…el tags. This method needs to go in BaseRepo rather than ObjectStore so it can take advantage of the cached peeled values in the packed-refs file, which belongs to the RefsContainer. To this end, added a similar get_peeled method to RefsContainer that accesses the peeled ref cache. Unlike BaseRepo.get_peeled, RefsContainer.get_peeled returns None if peeled ref information is not cached (since it does not have access to an ObjectStore to do the peeling itself). Modified the TCP git server and dumb HTTP server to advertise peeled refs consistently and correctly. Added tests for all new functionality. Change-Id: I214ffee1a3459a746a7e34a1d04c0f527c5c8347
- Loading branch information
Showing
15 changed files
with
211 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
dulwich/tests/data/repos/a.git/objects/28/237f4dc30d0d462658d6b937b08a0f0b6ef55a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
x5�A | ||
�0�a�9�\@��i��""�L�1T"uP��MA7�o�~����2(0��H�\uB\]�M�N�c+�H���!0�&5Zi-�)�~ ��ߓ~�Ï��s��P~G�l�֮��`�јk������N0� |
3 changes: 3 additions & 0 deletions
3
dulwich/tests/data/repos/a.git/objects/b0/931cadc54336e78a1d980420e3268903b57a50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
x-�[ | ||
�0��*�*I����7��5T[o��RWo���� | ||
�w�*�`e��/��i��7s��j�p����ی�h���jkL[c7�������L����>��<�2�ݏ �1Jr�t�q�ص�h̰���ɾ֥2v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# pack-refs with: peeled | ||
b0931cadc54336e78a1d980420e3268903b57a50 refs/tags/mytag-packed | ||
^2a72d929692c41d8554c07f6301757ba18a65d91 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
28237f4dc30d0d462658d6b937b08a0f0b6ef55a |
3 changes: 3 additions & 0 deletions
3
dulwich/tests/data/repos/refs.git/objects/3e/c9c43c84ff242e3ef4a9fc5bc111fd780a76a8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
x-�Q | ||
�0D��)�-�m�V�^�i6��6�.���~���{#Cm�]rwy���u�=�u�5^[�o��<��H<*y?ƴ,�()��a���߈��2<�)��$8x����R��.�4Yk�t�Pa��Ե� | ||
q?���W)'����ǧ6 |
5 changes: 5 additions & 0 deletions
5
dulwich/tests/data/repos/refs.git/objects/cd/a609072918d7b70057b6bef9f4c2537843fcfe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# pack-refs with: peeled | ||
df6800012397fb85c56e7418dd4eb9405dee075c refs/tags/refs-0.1 | ||
^42d06bd4b77fed026b154d16493e5deab78f02ec | ||
42d06bd4b77fed026b154d16493e5deab78f02ec refs/heads/packed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3ec9c43c84ff242e3ef4a9fc5bc111fd780a76a8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.