Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add fetch command

  • Loading branch information...
commit 1a647c585c6a5f949f7cb13d3a6f0a5ad4b4f07c 1 parent e34bc3a
@garacio garacio authored
View
1  .gitignore
@@ -0,0 +1 @@
+*.pyc
View
3  Default (OSX).sublime-keymap
@@ -6,5 +6,6 @@
{ "keys": ["ctrl+super+d"], "command": "git_diff"},
{ "keys": ["ctrl+super+s"], "command": "git_status"},
{ "keys": ["ctrl+super+l"], "command": "git_log"},
- { "keys": ["ctrl+super+b"], "command": "git_blame"}
+ { "keys": ["ctrl+super+b"], "command": "git_blame"},
+ { "keys": ["ctrl+super+f"], "command": "git_fetch"}
]
View
12 GitCommand.py
@@ -399,3 +399,15 @@ def on_done(self, tag_name):
folder_name = os.path.dirname(self.view.file_name())
self.view.window().run_command('exec', {'cmd': ['git', 'tag', tag_name], 'working_dir': folder_name, 'quiet': True})
+
+class GitFetchCommand(sublime_plugin.TextCommand):
+ def is_enabled(self, *args):
+ if self.view.file_name():
+ return True
+ return False
+
+ def run(self, edit):
+ if self.view.file_name():
+ folder_name = os.path.dirname(self.view.file_name())
+
+ self.view.window().run_command('exec', {'cmd': ['git', 'fetch'], 'working_dir': folder_name, 'quiet': False})
View
3  Main.sublime-menu
@@ -42,7 +42,8 @@
{ "caption": "-" },
{ "caption": "Init...", "command": "git_init" },
{ "caption": "-" },
- { "caption": "Settings...", "command": "git_settings" }
+ { "caption": "Settings...", "command": "git_settings" },
+ { "caption": "Fetch", "command": "git_fetch" }
]
}
]
Please sign in to comment.
Something went wrong with that request. Please try again.