From fc8c88db66470ea9870964a3ee9f0fb5a95ddaaf Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 9 Jan 2017 13:58:58 +0000 Subject: [PATCH] git: don't redundantly pass "--" to git_sha1 git_sha1 already puts "--" before its arguments, so git_sha1_file($dir, 'doc/index.mdwn') would have incorrectly invoked git rev-list --max-count=1 HEAD -- -- doc/index.mdwn If there is no file in the wiki named "--", that's harmless, because it merely names the latest revision in which either "--" or "doc/index.mdwn" changed. However, it could return incorrect results if there is somehow a file named "--". (cherry picked from commit 0463357392471f58ccd2c7f39cafabd8472e129b) --- IkiWiki/Plugin/git.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index c81c8eae7..010d6d54c 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -578,7 +578,7 @@ sub rcs_find_changes ($) { sub git_sha1_file ($$) { my $dir=shift; my $file=shift; - return git_sha1($dir, "--", $file); + return git_sha1($dir, $file); } sub git_sha1 ($@) { -- 2.39.2