Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add 'git gui blame' command. #203

Open
wants to merge 2 commits into from

1 participant

@rchl

Much easier to work with than text blame when needing to navigate to parent
revisions and see full commit messages.

Automatically scrolls to the line on which the cursor is positioned.

Rafal Chlodn... added some commits
Rafal Chlodnicki Add 'git gui blame' command.
Much easier to work with than text blame when needing to navigate to parent
revisions and see full commit messages.

Automatically scrolls to the line on which the cursor is positioned.
c01913a
Rafal Chlodnicki Add menu item for 'git gui blame'. 2310f49
@phts phts referenced this pull request from a commit
@phts phts Merge branch 'blame-gui' of https://github.com/rchl/sublime-text-2-gi…
…t.git

Merged pull request:
#203: Add 'git gui blame' command.
9492120
@phts phts referenced this pull request from a commit in phts/sublime-text-git
@phts phts Merge remote-tracking branch 'remotes/rchl/blame-gui'
Merged pull request:
#203: Add 'git gui blame' command.
691f88e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 29, 2012
  1. Add 'git gui blame' command.

    Rafal Chlodnicki authored
    Much easier to work with than text blame when needing to navigate to parent
    revisions and see full commit messages.
    
    Automatically scrolls to the line on which the cursor is positioned.
  2. Add menu item for 'git gui blame'.

    Rafal Chlodnicki authored
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 0 deletions.
  1. +4 −0 Default.sublime-commands
  2. +1 −0  Main.sublime-menu
  3. +10 −0 history.py
View
4 Default.sublime-commands
@@ -7,6 +7,10 @@
"command": "git_blame"
}
,{
+ "caption": "Git: Blame (GUI)",
+ "command": "git_gui_blame"
+ }
+ ,{
"caption": "Git: New Tag",
"command": "git_new_tag"
}
View
1  Main.sublime-menu
@@ -27,6 +27,7 @@
,{ "caption": "Commit Selected Hunk", "command": "git_commit_selected_hunk" }
,{ "caption": "-" }
,{ "caption": "Blame", "command": "git_blame" }
+ ,{ "caption": "Blame (GUI)", "command": "git_gui_blame" }
,{ "caption": "-" }
,{ "caption": "Toggle Annotations", "command": "git_toggle_annotations" }
]
View
10 history.py
@@ -37,6 +37,16 @@ def blame_done(self, result, position=None):
syntax=plugin_file("syntax/Git Blame.tmLanguage"))
+class GitGuiBlameCommand(GitTextCommand):
+ def run(self, edit):
+ command = ['git', 'gui', 'blame'];
+ # get the cursor's line number
+ line, column = self.view.rowcol(self.view.sel()[0].begin())
+ command.append('--line=%s' % line)
+ command.append(self.get_file_name())
+ self.run_command(command)
+
+
class GitLog(object):
def run(self, edit=None):
fn = self.get_file_name()
Something went wrong with that request. Please try again.