projects
/
web.mtrack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbe5bd7
)
MTrack/SCM.php
author
Alan Knowles
<alan@akbkhome.com>
Tue, 6 Sep 2011 09:52:15 +0000
(17:52 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Tue, 6 Sep 2011 09:52:15 +0000
(17:52 +0800)
MTrack/SCM.php
patch
|
blob
|
history
diff --git
a/MTrack/SCM.php
b/MTrack/SCM.php
index
1cd4551
..
e25fee1
100644
(file)
--- a/
MTrack/SCM.php
+++ b/
MTrack/SCM.php
@@
-104,7
+104,18
@@
abstract class MTrackSCM
}
}
-
+ function escapeArg($a) {
+ if (preg_match('/\-[a-z0-9]+$/i', $a)) {
+ return $a; // raw -a
+ }
+ if (preg_match('/\-\-[a-z0-9]+=/i', $a)) {
+ $lr = explode('=', $a,2);
+ return $lr[0].'=' . escapeshellarg($lr[1]); // raw -a
+ }
+ return escapeshellarg($a);
+
+
+ }
public $repopath = '';
/*