Skip to content
Browse files

Merge branch 'master' of github.com:kemayo/sublime-text-2-git

  • Loading branch information...
2 parents d082103 + 2a9904b commit 88893b0086b43786d13f5fcabe82f85b4ffaf19c @kemayo committed
Showing with 18 additions and 4 deletions.
  1. +5 −1 Default.sublime-commands
  2. +2 −1 Main.sublime-menu
  3. +11 −2 diff.py
View
6 Default.sublime-commands
@@ -47,10 +47,14 @@
"command": "git_diff_commit"
}
,{
- "caption": "Git: Diff Tool",
+ "caption": "Git: Diff Tool Current File",
"command": "git_diff_tool"
}
,{
+ "caption": "Git: Diff Tool All",
+ "command": "git_diff_tool_all"
+ }
+ ,{
"caption": "Git: Commit",
"command": "git_commit"
}
View
3 Main.sublime-menu
@@ -15,6 +15,7 @@
,{ "caption": "Graph", "command": "git_graph" }
,{ "caption": "-" }
,{ "caption": "Diff", "command": "git_diff" }
+ ,{ "caption": "DiffTool", "command": "git_diff_tool" }
,{ "caption": "-" }
,{ "caption": "Add", "command": "git_add" }
,{ "caption": "Add Selected Hunk", "command": "git_add_selected_hunk" }
@@ -39,7 +40,7 @@
,{ "caption": "-" }
,{ "caption": "Diff", "command": "git_diff_all" }
,{ "caption": "Diff Staged", "command": "git_diff_commit" }
- ,{ "caption": "Diff Tool", "command": "git_diff_tool" }
+ ,{ "caption": "Diff Tool", "command": "git_diff_tool_all" }
,{ "caption": "Reset Hard", "command": "git_reset_hard_head" }
,{ "caption": "-" }
,{ "caption": "Add...", "command": "git_add_choice" }
View
13 diff.py
@@ -5,7 +5,7 @@
class GitDiff (object):
def run(self, edit=None):
self.run_command(['git', 'diff', '--no-color', '--', self.get_file_name()],
- self.diff_done)
+ self.diff_done)
def diff_done(self, result):
if not result.strip():
@@ -48,6 +48,15 @@ class GitDiffCommitCommand(GitDiffCommit, GitWindowCommand):
pass
-class GitDiffTool(GitWindowCommand):
+class GitDiffTool(object):
+ def run(self, edit=None):
+ self.run_command(['git', 'difftool', '--', self.get_file_name()])
+
+
+class GitDiffToolCommand(GitDiffTool, GitTextCommand):
+ pass
+
+
+class GitDiffToolAll(GitWindowCommand):
def run(self):
self.run_command(['git', 'difftool'])

0 comments on commit 88893b0

Please sign in to comment.
Something went wrong with that request. Please try again.