This repository was archived by the owner on Sep 11, 2020. It is now read-only.
Commit 01631f0
committed
git: Don't return tag object with Tag, adjust docs for Tag and Tags
I've mainly noticed that in using the current Tag function, that there
were lots of times that I was ignoring the ref or the object, depending
on what I needed. This was evident in the tests as well. As such, I
think it just makes more sense for a singular tag fetcher to return just
a ref, through which the caller may grab the annotation if they need it,
and if it exists.
Also, contrary to the docs on Tags, all tags have a ref, even if they
are annotated. The difference between a lightweight tag and an annotated
tag is the presence of the tag object, which the ref will point to if
the tag is annotated. As such I've adjusted the docs with an example as
to how one can get the annotation for a tag ref through the iterator.
Source: https://git-scm.com/book/en/v2/Git-Internals-Git-References,
tags section.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>1 parent 119459a commit 01631f0
2 files changed
+71
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
585 | | - | |
586 | | - | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
587 | 605 | | |
588 | 606 | | |
589 | 607 | | |
590 | 608 | | |
591 | | - | |
| 609 | + | |
592 | 610 | | |
593 | 611 | | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
| 612 | + | |
600 | 613 | | |
601 | 614 | | |
602 | | - | |
| 615 | + | |
603 | 616 | | |
604 | 617 | | |
605 | 618 | | |
606 | 619 | | |
607 | | - | |
| 620 | + | |
608 | 621 | | |
609 | 622 | | |
610 | 623 | | |
611 | 624 | | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
612 | 630 | | |
613 | 631 | | |
614 | 632 | | |
| |||
982 | 1000 | | |
983 | 1001 | | |
984 | 1002 | | |
985 | | - | |
986 | | - | |
987 | | - | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
988 | 1028 | | |
989 | 1029 | | |
990 | 1030 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1294 | 1294 | | |
1295 | 1295 | | |
1296 | 1296 | | |
1297 | | - | |
| 1297 | + | |
1298 | 1298 | | |
1299 | | - | |
1300 | 1299 | | |
1301 | 1300 | | |
1302 | 1301 | | |
| |||
1338 | 1337 | | |
1339 | 1338 | | |
1340 | 1339 | | |
1341 | | - | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
1342 | 1344 | | |
1343 | | - | |
1344 | 1345 | | |
1345 | 1346 | | |
1346 | 1347 | | |
| |||
1412 | 1413 | | |
1413 | 1414 | | |
1414 | 1415 | | |
1415 | | - | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1416 | 1420 | | |
1417 | | - | |
1418 | 1421 | | |
1419 | 1422 | | |
1420 | 1423 | | |
| |||
1472 | 1475 | | |
1473 | 1476 | | |
1474 | 1477 | | |
1475 | | - | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
1476 | 1482 | | |
1477 | | - | |
1478 | 1483 | | |
1479 | 1484 | | |
1480 | 1485 | | |
| |||
1505 | 1510 | | |
1506 | 1511 | | |
1507 | 1512 | | |
1508 | | - | |
| 1513 | + | |
1509 | 1514 | | |
1510 | | - | |
1511 | 1515 | | |
1512 | 1516 | | |
1513 | 1517 | | |
| |||
1522 | 1526 | | |
1523 | 1527 | | |
1524 | 1528 | | |
1525 | | - | |
| 1529 | + | |
1526 | 1530 | | |
1527 | | - | |
1528 | 1531 | | |
1529 | 1532 | | |
1530 | 1533 | | |
1531 | | - | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
1548 | | - | |
1549 | | - | |
1550 | | - | |
1551 | | - | |
1552 | | - | |
1553 | 1534 | | |
1554 | 1535 | | |
1555 | 1536 | | |
| |||
1562 | 1543 | | |
1563 | 1544 | | |
1564 | 1545 | | |
1565 | | - | |
| 1546 | + | |
1566 | 1547 | | |
1567 | 1548 | | |
1568 | 1549 | | |
| |||
0 commit comments