Skip to content

Commit d4c0f3f

Browse files
committed
Remove prompt_for_tracking_branch setting
1 parent 1cdc7b4 commit d4c0f3f

File tree

4 files changed

+6
-25
lines changed

4 files changed

+6
-25
lines changed

GitSavvy.sublime-settings

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,6 @@
228228
*/
229229
"max_items_in_tags_dashboard": -1,
230230

231-
/*
232-
When set to `true`, GitSavvy will offer to set the upstream on `git: push`
233-
when tracking branch is not configured.
234-
*/
235-
"prompt_for_tracking_branch": true,
236-
237231
/*
238232
When set to `true`, GitSavvy will automatically display more info about the
239233
current commit in a output panel.

core/commands/push.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
START_PUSH_MESSAGE = "Starting push..."
2222
END_PUSH_MESSAGE = "Push complete."
23-
SET_UPSTREAM_PROMPT = ("You have not set an upstream for the active branch. "
24-
"Would you like to set one?")
2523
CONFIRM_FORCE_PUSH = ("You are about to `git push {}`. Would you "
2624
"like to proceed?")
2725

@@ -99,10 +97,7 @@ def run(self, local_branch_name=None, force=False, force_with_lease=False):
9997
else:
10098
kont()
10199

102-
elif (
103-
not self.savvy_settings.get("prompt_for_tracking_branch") or
104-
sublime.ok_cancel_dialog(SET_UPSTREAM_PROMPT)
105-
):
100+
else:
106101
self.window.run_command("gs_push_to_branch_name", {
107102
"local_branch_name": local_branch.name,
108103
"set_upstream": True,

docs/remotes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Like `git: pull from branch`, but rebasing on the remote branch instead of mergi
3131

3232
## `git: push`
3333

34-
This command will push current branch to the tracking branch. If the tracking branch is not set, you will be asked to configure it unless `prompt_for_tracking_branch` is set to `false`. In that case, you will be prompted for a remote, then the current branch will be pushed to a remote branch with the same name.
34+
This command will push current branch to the tracking branch. If the tracking branch is not set, you will be prompted for a remote and a branch name.
3535

3636
## `git: push to branch`
3737

github/commands/pull_request.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
from GitSavvy.core.git_mixins.branches import Branch
2020

2121

22-
PUSH_PROMPT = ("You have not set an upstream for the active branch. "
23-
"Would you like to push to a remote?")
24-
25-
2622
class GsGithubPullRequestCommand(WindowCommand, git_mixins.GithubRemotesMixin, GitCommand):
2723

2824
"""
@@ -182,14 +178,10 @@ def run_async(self):
182178
return
183179

184180
if not current_branch.tracking:
185-
if (
186-
not self.savvy_settings.get("prompt_for_tracking_branch")
187-
or sublime.ok_cancel_dialog(PUSH_PROMPT)
188-
):
189-
self.window.run_command("gs_github_push_and_create_pull_request", {
190-
"local_branch_name": current_branch.name,
191-
"set_upstream": True
192-
})
181+
self.window.run_command("gs_github_push_and_create_pull_request", {
182+
"local_branch_name": current_branch.name,
183+
"set_upstream": True
184+
})
193185

194186
elif (
195187
"ahead" in current_branch.tracking_status

0 commit comments

Comments
 (0)