1 | <?php |
||
32 | class RevListCommand extends BaseCommand |
||
33 | { |
||
34 | public const GIT_REVLIST = 'rev-list'; |
||
35 | |||
36 | /** |
||
37 | * constructor |
||
38 | * |
||
39 | * @param \GitElephant\Repository $repo The repository object this command |
||
40 | * will interact with |
||
41 | */ |
||
42 | 30 | public function __construct(Repository $repo = null) |
|
46 | |||
47 | /** |
||
48 | * get tag commit command via rev-list |
||
49 | * |
||
50 | * @param \GitElephant\Objects\Tag $tag a tag instance |
||
51 | * |
||
52 | * @throws \RuntimeException |
||
53 | * @return string |
||
54 | */ |
||
55 | 27 | public function getTagCommit(Tag $tag): string |
|
65 | |||
66 | /** |
||
67 | * get the commits path to the passed commit. Useful to count commits in a repo |
||
68 | * |
||
69 | * @param \GitElephant\Objects\Commit $commit commit instance |
||
70 | * @param int $max max count |
||
71 | * |
||
72 | * @throws \RuntimeException |
||
73 | * @return string |
||
74 | */ |
||
75 | 3 | public function commitPath(Commit $commit, $max = 1000): string |
|
84 | } |
||
85 |