1 | <?php |
||
34 | class LogCommand extends BaseCommand |
||
35 | { |
||
36 | public const GIT_LOG = 'log'; |
||
37 | |||
38 | /** |
||
39 | * constructor |
||
40 | * |
||
41 | * @param \GitElephant\Repository $repo The repository object this command |
||
42 | * will interact with |
||
43 | */ |
||
44 | 20 | public function __construct(Repository $repo = null) |
|
48 | |||
49 | /** |
||
50 | * Build an object log command |
||
51 | * |
||
52 | * @param \GitElephant\Objects\NodeObject $obj the Object to get the log for |
||
53 | * @param \GitElephant\Objects\Branch|string|null $branch the branch to consider |
||
54 | * @param int|null $limit limit to n entries |
||
55 | * @param int|null $offset skip n entries |
||
56 | * |
||
57 | * @throws \RuntimeException |
||
58 | * @return string |
||
59 | */ |
||
60 | 2 | public function showObjectLog(NodeObject $obj, $branch = null, int $limit = null, int $offset = null): string |
|
73 | |||
74 | /** |
||
75 | * Build a generic log command |
||
76 | * |
||
77 | * @param \GitElephant\Objects\TreeishInterface|string $ref the reference to build the log for |
||
78 | * @param string|null $path the physical path to the tree relative to the |
||
79 | * repository root |
||
80 | * @param int|null $limit limit to n entries |
||
81 | * @param int|null $offset skip n entries |
||
82 | * @param bool $firstParent skip commits brought in to branch by a merge |
||
83 | * |
||
84 | * @throws \RuntimeException |
||
85 | * @return string |
||
86 | */ |
||
87 | 20 | public function showLog($ref, $path = null, $limit = null, int $offset = null, bool $firstParent = false): string |
|
122 | } |
||
123 |