]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Rcs/git.pm
git: Put -- before the filename when calling git rev-list to avoid warning message...
[ikiwiki.git] / IkiWiki / Rcs / git.pm
index 1882b43ef5f1c8e642b429785ca9e55af556ae48..5668936dd0ef9aff1e2f66c7d9987964be4f1647 100644 (file)
@@ -279,7 +279,8 @@ sub git_sha1 (;$) { #{{{
        my $file = shift || q{--};
 
        # Ignore error since a non-existing file might be given.
-       my ($sha1) = run_or_non('git', 'rev-list', '--max-count=1', 'HEAD', $file);
+       my ($sha1) = run_or_non('git', 'rev-list', '--max-count=1', 'HEAD',
+               '--', $file);
        if ($sha1) {
                ($sha1) = $sha1 =~ m/($sha1_pattern)/; # sha1 is untainted now
        } else { debug("Empty sha1sum for '$file'.") }