|
@@ -11,7 +11,7 @@ discard block |
|
|
block discarded – undo |
|
11
|
11
|
public function getMergeBase(string $commit1, string $commit2) : string |
|
12
|
12
|
{ |
|
13
|
13
|
try { |
|
14
|
|
- $this->extractFromCommand('git merge-base --is-ancestor ' . escapeshellarg($commit1) . ' ' . escapeshellarg($commit2)); |
|
|
14
|
+ $this->extractFromCommand('git merge-base --is-ancestor '.escapeshellarg($commit1).' '.escapeshellarg($commit2)); |
|
15
|
15
|
} catch (GitException $e) { |
|
16
|
16
|
// The command will return exit code 1 if $commit1 is an ancestor of $commit2 |
|
17
|
17
|
// Exit code one triggers an exception. We catch it. |
|
@@ -19,14 +19,14 @@ discard block |
|
|
block discarded – undo |
|
19
|
19
|
} |
|
20
|
20
|
|
|
21
|
21
|
|
|
22
|
|
- $results = $this->extractFromCommand('git merge-base ' . escapeshellarg($commit1). ' '. escapeshellarg($commit2)); |
|
|
22
|
+ $results = $this->extractFromCommand('git merge-base '.escapeshellarg($commit1).' '.escapeshellarg($commit2)); |
|
23
|
23
|
|
|
24
|
24
|
return $results[0]; |
|
25
|
25
|
} |
|
26
|
26
|
|
|
27
|
27
|
public function getLatestCommitForBranch(string $branch) : string |
|
28
|
28
|
{ |
|
29
|
|
- $results = $this->extractFromCommand('git log -n 1 --pretty=format:"%H" ' . escapeshellarg($branch)); |
|
|
29
|
+ $results = $this->extractFromCommand('git log -n 1 --pretty=format:"%H" '.escapeshellarg($branch)); |
|
30
|
30
|
|
|
31
|
31
|
return $results[0]; |
|
32
|
32
|
} |
Please login to merge, or discard this patch.