aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--IkiWiki/Rcs/git.pm3
-rw-r--r--debian/changelog2
2 files changed, 4 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'.") }
diff --git a/debian/changelog b/debian/changelog
index dc16f5ac2..5f2f16c81 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ ikiwiki (2.45) UNRELEASED; urgency=low
* Fix ugly display when editing a page that has vanished.
* srcfile now has an optional second parameter to avoid it throwing an error
if the source file does not exist.
+ * git: Put -- before the filename when calling git rev-list to avoid
+ warning message when the file doesn't exist.
-- Joey Hess <joeyh@debian.org> Sat, 26 Apr 2008 15:09:36 -0400