diff --git a/.all-contributorsrc b/.all-contributorsrc
index 3e45a142b..efa5c7108 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -678,6 +678,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "amrc-benmorrow",
+ "name": "Ben Morrow",
+ "avatar_url": "https://avatars.githubusercontent.com/u/120477944?v=4",
+ "profile": "https://github.com/amrc-benmorrow",
+ "contributions": [
+ "code"
+ ]
}
],
"commitConvention": "angular"
diff --git a/README.md b/README.md
index d625474fe..ecc499a64 100644
--- a/README.md
+++ b/README.md
@@ -369,6 +369,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
![](https://avatars.githubusercontent.com/u/522422?v=4?s=60) Sebastien 💻 |
![](https://avatars.githubusercontent.com/u/39889?v=4?s=60) Yaroslav Halchenko 📖 |
![](https://avatars.githubusercontent.com/u/716334?v=4?s=60) Alex Villarreal 💻 |
+ ![](https://avatars.githubusercontent.com/u/120477944?v=4?s=60) Ben Morrow 💻 |
diff --git a/__tests__/test-wire.js b/__tests__/test-wire.js
index be3262f42..41b9115f0 100644
--- a/__tests__/test-wire.js
+++ b/__tests__/test-wire.js
@@ -171,6 +171,35 @@ describe('git wire protocol', () => {
['refs/heads/master5', 'e5c144897b64a44bd1164a0db60738452c9eaf87'],
])
})
+ it('parseRefsAdResponse empty repo with capabilities', async () => {
+ const res = [
+ Buffer.from(`001e# service=git-upload-pack
+000000fa0000000000000000000000000000000000000000 capabilities^{}\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed no-done object-format=sha1 agent=git/2.43.0
+0000`),
+ ]
+ const result = await parseRefsAdResponse(res, {
+ service: 'git-upload-pack',
+ })
+ expect([...result.capabilities]).toEqual([
+ 'multi_ack',
+ 'thin-pack',
+ 'side-band',
+ 'side-band-64k',
+ 'ofs-delta',
+ 'shallow',
+ 'deepen-since',
+ 'deepen-not',
+ 'deepen-relative',
+ 'no-progress',
+ 'include-tag',
+ 'multi_ack_detailed',
+ 'no-done',
+ 'object-format=sha1',
+ 'agent=git/2.43.0',
+ ])
+ expect([...result.symrefs]).toEqual([])
+ expect([...result.refs]).toEqual([])
+ })
it('parseRefsAdResponse bad service', async () => {
const res = [
Buffer.from(`001e# noservice=git-upload-pack