Commit 04ed1b6
Fix for pushing to empty repo on Mononoke Git server
Summary:
In Protocol V1, the capability of the server is advertised along with the ref advertisement. This is done by null-separating the capabilities from the first ref while the rest of the refs are sent normally.
However, since the capabilities are tied to ref advertisement in the write path, having no refs mean that we won't send any capabilities to the client. This is what was wrong with the current implementation. Now the logic has been corrected to make it consistent with [the spec](https://git-scm.com/docs/pack-protocol#_reference_discovery)
Reviewed By: andreacampi
Differential Revision: D67978800
fbshipit-source-id: bb9ea76dca8f27ac3ed1f4b6b06fc55f795e48041 parent 4a71278 commit 04ed1b6
File tree
2 files changed
+26
-9
lines changed- eden/mononoke
- git_server/src/read
- tests/integration/mononoke_git_server
2 files changed
+26
-9
lines changedLines changed: 24 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| 89 | + | |
87 | 90 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
95 | 112 | | |
96 | 113 | | |
97 | 114 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
0 commit comments