From 238e8b95a5b084e7131d3314b78419b9404cba4c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 6 Oct 2010 15:08:12 -0400 Subject: convert rcs_revert to only stage the reversion --- IkiWiki/Plugin/git.pm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'IkiWiki/Plugin/git.pm') 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); } -- cgit v1.2.3