Skip to content

Commit 1036643

Browse files
committed
Add setting fetch_new_remotes: true
When adding remotes, we always asked if we should now also fetch this remote. Add "fetch_new_remotes" and just fetch without asking if set to `True`. This is also the default because frankly you likely want that. (Except for huge repos, but then set this in the project settings, no?)
1 parent d60e133 commit 1036643

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

GitSavvy.sublime-settings

+5
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@
290290
*/
291291
"confirm_force_push": true,
292292

293+
/*
294+
When set to `true`, GitSavvy will fetch newly added remotes automatically.
295+
*/
296+
"fetch_new_remotes": true,
297+
293298
/*
294299
When set to `true`, closing the commit message window via keyboard will result
295300
in a commit action being taken, except in cases where the message is empty.

core/commands/remote.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def on_enter_name(self, remote_name):
4343
run_on_new_thread(self.git, "config", "--local", "gitsavvy.pushdefault", remote_name)
4444
self.update_store({"last_remote_used_for_push": remote_name})
4545

46-
if sublime.ok_cancel_dialog(
46+
if self.savvy_settings.get("fetch_new_remotes", True) or sublime.ok_cancel_dialog(
4747
"Your remote was added successfully. "
4848
"Would you like to fetch from this remote?"
4949
):

0 commit comments

Comments
 (0)