Commit a9c1a7e
upload-pack: convert to use
The `write_v0_ref()` callback is invoked from two callsites:
- Once via `send_ref()` which is a callback passed to
`for_each_namespaced_ref_1()` and `refs_head_ref_namespaced()`.
- Once manually to announce capabilities.
When sending references to the client we also send the peeled value of
tags. As we don't have a `struct reference` available in the second
case, we cannot easily peel by calling `reference_get_peeled_oid()`, but
we instead have to depend on on global state via `peel_iterated_oid()`.
We do have a reference available though in the first case, it's only the
second case that keeps us from using `reference_get_peeled_oid()`. But
that second case only announces capabilities anyway, so we're not really
handling a reference at all here.
Adapt that case to construct a reference manually and pass that to
`write_v0_ref()`. Start to use `reference_get_peeled_oid()` now that we
always have a `struct reference` available.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>reference_get_peeled_oid()
1 parent 989e80e commit a9c1a7e
1 file changed
+13
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1249 | 1249 | | |
1250 | 1250 | | |
1251 | 1251 | | |
1252 | | - | |
1253 | | - | |
| 1252 | + | |
| 1253 | + | |
1254 | 1254 | | |
1255 | 1255 | | |
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
1260 | | - | |
| 1260 | + | |
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
| |||
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
1270 | | - | |
| 1270 | + | |
1271 | 1271 | | |
1272 | 1272 | | |
1273 | 1273 | | |
| |||
1283 | 1283 | | |
1284 | 1284 | | |
1285 | 1285 | | |
1286 | | - | |
| 1286 | + | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
| 1289 | + | |
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
1295 | 1295 | | |
1296 | | - | |
| 1296 | + | |
1297 | 1297 | | |
1298 | 1298 | | |
1299 | 1299 | | |
| |||
1442 | 1442 | | |
1443 | 1443 | | |
1444 | 1444 | | |
1445 | | - | |
1446 | | - | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
1447 | 1451 | | |
1448 | 1452 | | |
1449 | 1453 | | |
| |||
0 commit comments