aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/git.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-10-06 15:08:12 -0400
committerJoey Hess <joey@kitenet.net>2010-10-06 15:08:12 -0400
commit238e8b95a5b084e7131d3314b78419b9404cba4c (patch)
tree448ac7310509725d8d344fe0b9aba721f6ed127f /IkiWiki/Plugin/git.pm
parent58a0698d921efe0daa932599515f6b41b2da4044 (diff)
downloadikiwiki-238e8b95a5b084e7131d3314b78419b9404cba4c.tar
ikiwiki-238e8b95a5b084e7131d3314b78419b9404cba4c.tar.gz
convert rcs_revert to only stage the reversion
Diffstat (limited to 'IkiWiki/Plugin/git.pm')
-rw-r--r--IkiWiki/Plugin/git.pm13
1 files changed, 4 insertions, 9 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
index 3ccaa446a..996ab6fba 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
@@ -846,19 +846,14 @@ sub rcs_preprevert (@) {
[git_parse_changes(git_commit_info($rev, 1))]);
}
-sub rcs_revert (@) {
- # Try to revert the given patch; returns undef on _success_.
- my %params = @_;
- my $rev = $params{rev};
+sub rcs_revert ($) {
+ # Try to revert the given rev; returns undef on _success_.
+ my $rev = $shift;
if (run_or_non('git', 'revert', '--no-commit', $rev)) {
- debug "Committing revert for patch '$rev'.";
- rcs_commit_staged(message =>
- sprintf(gettext("This reverts commit %s"), $rev), @_);
+ return undef;
}
else {
- # No idea what is actually getting reverted, so all we can
- # do is say we failed.
run_or_die('git', 'reset', '--hard');
return sprintf(gettext("Failed to revert commit %s"), $rev);
}