summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs/git.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Rcs/git.pm')
-rw-r--r--IkiWiki/Rcs/git.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm
index 26a6f4266..376d03c78 100644
--- a/IkiWiki/Rcs/git.pm
+++ b/IkiWiki/Rcs/git.pm
@@ -419,6 +419,12 @@ sub rcs_recentchanges ($) { #{{{
return @rets;
} #}}}
+sub rcs_diff ($) { #{{{
+ my $rev=shift;
+ my ($sha1) = $rev =~ /^($sha1_pattern)$/; # untaint
+ return join("\n", run_or_non("git", "diff", "$sha1^", $sha1));
+} #}}}
+
sub rcs_getctime ($) { #{{{
my $file=shift;
# Remove srcdir prefix