From: Florian Wagner Date: Thu, 17 Mar 2016 11:20:30 +0000 (+0100) Subject: Correctly handle filenames starting with a dash in add/rm/mv. X-Git-Tag: debian/3.20120629.2+deb7u2~28 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/1226d9f144310876080c077a9c45bd2257829a32?hp=b24da2c9fa0c675f97b16773f3d366a78e9e94b8 Correctly handle filenames starting with a dash in add/rm/mv. (cherry picked from commit bbdba8d770b73bc44f55219615b360484b7d240f) --- diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 0140768ff..51f711a28 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -654,7 +654,7 @@ sub rcs_add ($) { ensure_committer(); - run_or_cry('git', 'add', $file); + run_or_cry('git', 'add', '--', $file); } sub rcs_remove ($) { @@ -664,7 +664,7 @@ sub rcs_remove ($) { ensure_committer(); - run_or_cry('git', 'rm', '-f', $file); + run_or_cry('git', 'rm', '-f', '--', $file); } sub rcs_rename ($$) { @@ -672,7 +672,7 @@ sub rcs_rename ($$) { ensure_committer(); - run_or_cry('git', 'mv', '-f', $src, $dest); + run_or_cry('git', 'mv', '-f', '--', $src, $dest); } sub rcs_recentchanges ($) {