update-dockapps.pl: Avoid ambiguous argument error.
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.
This commit is contained in:
parent
a98548fdb6
commit
3ca8afb4af
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue