]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/git.pm
convert rcs_revert to only stage the reversion
[ikiwiki.git] / IkiWiki / Plugin / git.pm
index 3ccaa446a344f2dee24a4d277c2b803b8a7ff888..996ab6fba0f5e6076c3a793d4ec06ef57ec93b6f 100644 (file)
@@ -846,19 +846,14 @@ sub rcs_preprevert (@) {
                [git_parse_changes(git_commit_info($rev, 1))]);
 }
 
                [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)) {
 
        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 {
        }
        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);
        }
                run_or_die('git', 'reset', '--hard');
                return sprintf(gettext("Failed to revert commit %s"), $rev);
        }