aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-05-02 13:03:42 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-05-02 13:03:42 -0400
commitf06267fc3beb59e593b33249860ff2c94d32b347 (patch)
tree9600c5a2c59c804c35b64c5f6f14d8a56aa7e646 /IkiWiki
parentb2dea99417ebfee3d448ab6b49ca58cb2780258d (diff)
downloadikiwiki-f06267fc3beb59e593b33249860ff2c94d32b347.tar
ikiwiki-f06267fc3beb59e593b33249860ff2c94d32b347.tar.gz
git: Put -- before the filename when calling git rev-list to avoid warning message when the file doesn't exist.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Rcs/git.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm
index 1882b43ef..5668936dd 100644
--- a/IkiWiki/Rcs/git.pm
+++ b/IkiWiki/Rcs/git.pm
@@ -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'.") }