Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use per-view settings for git/gitk/flow_command #580

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,16 @@ def run_command(self, command, callback=None, show_status=True, filter_empty_arg
):
self.active_view().run_command('save')
if command[0] == 'git':
if command[1] == 'flow' and s.get('git_flow_command'):
command[0] = s.get('git_flow_command')
if command[1] == 'flow' and (self.active_view().settings().get('git_flow_command') if self.active_view() else s.get('git_flow_command')):
command[0] = self.active_view().settings().get('git_flow_command') if self.active_view() else s.get('git_flow_command')
del(command[1])
else:
us = sublime.load_settings('Preferences.sublime-settings')
if s.get('git_command') or us.get('git_binary'):
command[0] = s.get('git_command') or us.get('git_binary')
elif GIT:
command[0] = GIT
if command[0] == 'gitk' and s.get('gitk_command'):
if s.get('gitk_command'):
command[0] = s.get('gitk_command')
elif GITK:
command[0] = GITK
command[0] = ( \
(self.active_view().settings().get('git_command') or self.active_view().settings().get('git_binary')) if self.active_view() else \
(s.get('git_command') or sublime.load_settings('Preferences.sublime-settings').get('git_binary')) \
) or GIT
if command[0] == 'gitk' and (self.active_view().settings().get('gitk_command') if self.active_view() else s.get('gitk_command')):
command[0] = (self.active_view().settings().get('gitk_command') if self.active_view() else s.get('gitk_command')) or GITK
if not callback:
callback = self.generic_done

Expand Down