@@ -52,7 +52,7 @@ public function getRepositoryPath()
5252 */
5353public function createTag ($ name , $ options = NULL )
5454{
55- $ this ->run ('tag ' , $ options , $ name );
55+ $ this ->run ('tag ' , $ options , ' --end-of-options ' , $ name );
5656return $ this ;
5757}
5858
@@ -86,7 +86,7 @@ public function renameTag($oldName, $newName)
8686{
8787// http://stackoverflow.com/a/1873932
8888// create new as alias to old (`git tag NEW OLD`)
89- $ this ->run ('tag ' , $ newName , $ oldName );
89+ $ this ->run ('tag ' , ' --end-of-options ' , $ newName , $ oldName );
9090// delete old (`git tag -d OLD`)
9191$ this ->removeTag ($ oldName );
9292return $ this ;
@@ -114,7 +114,7 @@ public function getTags()
114114 */
115115public function merge ($ branch , $ options = NULL )
116116{
117- $ this ->run ('merge ' , $ options , $ branch );
117+ $ this ->run ('merge ' , $ options , ' --end-of-options ' , $ branch );
118118return $ this ;
119119}
120120
@@ -131,7 +131,7 @@ public function merge($branch, $options = NULL)
131131public function createBranch ($ name , $ checkout = FALSE )
132132{
133133// git branch $name
134- $ this ->run ('branch ' , $ name );
134+ $ this ->run ('branch ' , ' --end-of-options ' , $ name );
135135
136136if ($ checkout ) {
137137$ this ->checkout ($ name );
@@ -234,7 +234,7 @@ public function getLocalBranches()
234234 */
235235public function checkout ($ name )
236236{
237- $ this ->run ('checkout ' , $ name );
237+ $ this ->run ('checkout ' , ' --end-of-options ' , $ name );
238238return $ this ;
239239}
240240
@@ -253,7 +253,7 @@ public function removeFile($file)
253253}
254254
255255foreach ($ file as $ item ) {
256- $ this ->run ('rm ' , $ item , '-r ' );
256+ $ this ->run ('rm ' , ' -r ' , '--end-of-options ' , $ item );
257257}
258258
259259return $ this ;
@@ -282,7 +282,7 @@ public function addFile($file)
282282throw new GitException ("The path at ' $ item' does not represent a valid file. " );
283283}
284284
285- $ this ->run ('add ' , $ item );
285+ $ this ->run ('add ' , ' --end-of-options ' , $ item );
286286}
287287
288288return $ this ;
@@ -319,7 +319,7 @@ public function renameFile($file, $to = NULL)
319319}
320320
321321foreach ($ file as $ from => $ to ) {
322- $ this ->run ('mv ' , $ from , $ to );
322+ $ this ->run ('mv ' , ' --end-of-options ' , $ from , $ to );
323323}
324324
325325return $ this ;
@@ -454,7 +454,7 @@ public function hasChanges()
454454 */
455455public function pull ($ remote = NULL , array $ params = NULL )
456456{
457- $ this ->run ('pull ' , $ remote , $ params );
457+ $ this ->run ('pull ' , $ params , ' --end-of-options ' , $ remote );
458458return $ this ;
459459}
460460
@@ -468,7 +468,7 @@ public function pull($remote = NULL, array $params = NULL)
468468 */
469469public function push ($ remote = NULL , array $ params = NULL )
470470{
471- $ this ->run ('push ' , $ remote , $ params );
471+ $ this ->run ('push ' , $ params , ' --end-of-options ' , $ remote );
472472return $ this ;
473473}
474474
@@ -482,7 +482,7 @@ public function push($remote = NULL, array $params = NULL)
482482 */
483483public function fetch ($ remote = NULL , array $ params = NULL )
484484{
485- $ this ->run ('fetch ' , $ remote , $ params );
485+ $ this ->run ('fetch ' , $ params , ' --end-of-options ' , $ remote );
486486return $ this ;
487487}
488488
@@ -497,7 +497,7 @@ public function fetch($remote = NULL, array $params = NULL)
497497 */
498498public function addRemote ($ name , $ url , array $ params = NULL )
499499{
500- $ this ->run ('remote ' , 'add ' , $ params , $ name , $ url );
500+ $ this ->run ('remote ' , 'add ' , $ params , ' --end-of-options ' , $ name , $ url );
501501return $ this ;
502502}
503503
@@ -511,7 +511,7 @@ public function addRemote($name, $url, array $params = NULL)
511511 */
512512public function renameRemote ($ oldName , $ newName )
513513{
514- $ this ->run ('remote ' , 'rename ' , $ oldName , $ newName );
514+ $ this ->run ('remote ' , 'rename ' , ' --end-of-options ' , $ oldName , $ newName );
515515return $ this ;
516516}
517517
@@ -524,7 +524,7 @@ public function renameRemote($oldName, $newName)
524524 */
525525public function removeRemote ($ name )
526526{
527- $ this ->run ('remote ' , 'remove ' , $ name );
527+ $ this ->run ('remote ' , 'remove ' , ' --end-of-options ' , $ name );
528528return $ this ;
529529}
530530
@@ -539,7 +539,7 @@ public function removeRemote($name)
539539 */
540540public function setRemoteUrl ($ name , $ url , array $ params = NULL )
541541{
542- $ this ->run ('remote ' , 'set-url ' , $ params , $ name , $ url );
542+ $ this ->run ('remote ' , 'set-url ' , $ params , ' --end-of-options ' , $ name , $ url );
543543return $ this ;
544544}
545545
0 commit comments