-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uses --end-of-options after command options (for security reasons)
- Loading branch information
Showing
6 changed files
with
48 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,17 @@ require __DIR__ . '/bootstrap.php'; | |
$runner = new AssertRunner(__DIR__); | ||
$git = new Git($runner); | ||
|
||
$runner->assert(['clone', '-q', '[email protected]:czproject/git-php.git', __DIR__]); | ||
$runner->assert(['remote', 'add', 'origin2', '[email protected]:czproject/git-php.git']); | ||
$runner->assert(['remote', 'add', 'remote', '[email protected]:czproject/git-php.git']); | ||
$runner->assert(['clone', '-q', '--end-of-options', '[email protected]:czproject/git-php.git', __DIR__]); | ||
$runner->assert(['remote', 'add', '--end-of-options', 'origin2', '[email protected]:czproject/git-php.git']); | ||
$runner->assert(['remote', 'add', '--end-of-options', 'remote', '[email protected]:czproject/git-php.git']); | ||
$runner->assert(['remote', 'add', [ | ||
'--mirror=push', | ||
], 'only-push', 'test-url']); | ||
$runner->assert(['remote', 'rename', 'remote', 'origin3']); | ||
], '--end-of-options', 'only-push', 'test-url']); | ||
$runner->assert(['remote', 'rename', '--end-of-options', 'remote', 'origin3']); | ||
$runner->assert(['remote', 'set-url', [ | ||
'--push', | ||
], 'origin3', 'test-url']); | ||
$runner->assert(['remote', 'remove', 'origin2']); | ||
], '--end-of-options', 'origin3', 'test-url']); | ||
$runner->assert(['remote', 'remove', '--end-of-options', 'origin2']); | ||
|
||
$repo = $git->cloneRepository('[email protected]:czproject/git-php.git', __DIR__); | ||
$repo->addRemote('origin2', '[email protected]:czproject/git-php.git'); | ||
|
@@ -34,9 +34,9 @@ $repo->setRemoteUrl('origin3', 'test-url', [ | |
]); | ||
$repo->removeRemote('origin2'); | ||
|
||
$runner->assert(['push', 'origin']); | ||
$runner->assert(['fetch', 'origin']); | ||
$runner->assert(['pull', 'origin']); | ||
$runner->assert(['push', '--end-of-options', 'origin']); | ||
$runner->assert(['fetch', '--end-of-options', 'origin']); | ||
$runner->assert(['pull', '--end-of-options', 'origin']); | ||
$repo->push('origin'); | ||
$repo->fetch('origin'); | ||
$repo->pull('origin'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters