Commit 2ca67c6
clone: add tags refspec earlier to fetch refspec
In clone.c we call refspec_ref_prefixes() to copy the fetch refspecs
from the `remote->fetch` refspec into `ref_prefixes` of
`transport_ls_refs_options`. Afterwards we add the tags prefix
`refs/tags/` prefix as well. At a later point, in wanted_peer_refs() we
process refs using both `remote->fetch` and `TAG_REFSPEC`.
Simplify the code by appending `TAG_REFSPEC` to `remote->fetch` before
calling refspec_ref_prefixes().
To be able to do this, we set `option_tags` to 0 when --mirror is given.
This is because --mirror mirrors (hence the name) all the refs,
including tags and they do not need to be treated separately.
Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 879780f commit 2ca67c6
1 file changed
Lines changed: 11 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | 438 | | |
440 | 439 | | |
441 | | - | |
442 | | - | |
443 | 440 | | |
444 | 441 | | |
445 | 442 | | |
| |||
454 | 451 | | |
455 | 452 | | |
456 | 453 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | 454 | | |
466 | | - | |
467 | 455 | | |
468 | 456 | | |
469 | 457 | | |
| |||
1011 | 999 | | |
1012 | 1000 | | |
1013 | 1001 | | |
1014 | | - | |
| 1002 | + | |
1015 | 1003 | | |
| 1004 | + | |
| 1005 | + | |
1016 | 1006 | | |
1017 | 1007 | | |
1018 | 1008 | | |
| |||
1375 | 1365 | | |
1376 | 1366 | | |
1377 | 1367 | | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1378 | 1376 | | |
1379 | 1377 | | |
1380 | 1378 | | |
1381 | 1379 | | |
1382 | 1380 | | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
1386 | 1381 | | |
1387 | 1382 | | |
1388 | 1383 | | |
| |||
0 commit comments