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

Add push #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add push #1

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 13, 2015

I want push too

I want push too
@dmitrygusev
Copy link
Member

First of all what you propose won't work, because git add doesn't support the push argument.

I bet you wanted to push after commit, then this should be done after line 41, something like:

self.run_command(['git', 'push'], callback=self.update_status)

But:

  1. Since this handler will be invoked after each git commit, and if you saved multiple files at once you will end with multiple pushes. I'd expected push only happen once. Probably once in a period of time, say, 30 seconds after last commit, same as commits are done 30 seconds after last modification of a file. So probably would be better to delay git push after line 66?
  2. Git commits usually always succeed (unless you have disk IO error), but git push in your case will likely require a network connection which may be unreachable at the moment. What would you expect in this case?
  3. I wouldn't want automatic git push for my repo, so I'd prefer a separate setting for this, probably inside the .sublime-text-git-autocommit:
auto_push: true

By the way, do you know git push is just a few key presses when you need it: CMD+P -> push -> Enter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant