From f06267fc3beb59e593b33249860ff2c94d32b347 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kodama.kitenet.net>
Date: Fri, 2 May 2008 13:03:42 -0400
Subject: git: Put -- before the filename when calling git rev-list to avoid
 warning message when the file doesn't exist.

---
 IkiWiki/Rcs/git.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'IkiWiki/Rcs')

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'.") }
-- 
cgit v1.2.3