-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Other: move revert command to an individual file
- Loading branch information
Showing
4 changed files
with
21 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from sublime_plugin import WindowCommand | ||
|
||
from .log import LogMixin | ||
from ..git_command import GitCommand | ||
from ...common import util | ||
|
||
|
||
class GsRevertCommitCommand(LogMixin, WindowCommand, GitCommand): | ||
|
||
def run_async(self, **kwargs): | ||
if "commit_hash" in kwargs: | ||
commit_hash = kwargs["commit_hash"] | ||
self.do_action(commit_hash) | ||
else: | ||
super().run_async(**kwargs) | ||
|
||
def do_action(self, commit_hash, **kwargs): | ||
self.git("revert", commit_hash) | ||
util.view.refresh_gitsavvy(self.window.active_view(), refresh_sidebar=True) |