It is possible that, when running update-dockapps.pl, a filename may match a
revision, giving an error, e.g.,
fatal: ambiguous argument 'wmbattery': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

This patch fixes this problem by inserting "--" where needed.
---
 update-dockapps.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/update-dockapps.pl b/update-dockapps.pl
index ad25496..41fcb31 100755
--- a/update-dockapps.pl
+++ b/update-dockapps.pl
@@ -89,11 +89,11 @@ foreach my $dockapp (keys %dockapps) {
                next;
        }
        my $latest_version = (sort by_version keys $dockapps{$dockapp})[-1];
-       if ($r->run("diff", "$dockapp-$latest_version", "HEAD", $dockapp)) {
+       if ($r->run("diff", "$dockapp-$latest_version", "HEAD", "--", 
$dockapp)) {
                my $commit = $r->run("log", "-1",
-                                 "--pretty=format:%H", $dockapp);
+                                 "--pretty=format:%H", "--", $dockapp);
                my $date = strftime("%Y%m%d", localtime($r->run("log", "-1",
-                                 "--pretty=format:%ct", $dockapp)));
+                                 "--pretty=format:%ct", "--", $dockapp)));
 #throw out dockapps whose last commit was stripping version names from dirs
                unless ($commit eq "eea379d83350ced6166099ebc8f41ff4e3fa1f42") {
                        my $ls = $r->run("ls-tree", $commit, $dockapp);
-- 
1.9.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to