aboutsummaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-26 14:51:30 -0700
committerJunio C Hamano <gitster@pobox.com>2022-05-26 14:51:30 -0700
commitf49c478f628910de206c5e882a3cd3abec76d4e6 (patch)
treede71e2834c8cd48e6c2aaf447453d408d67fced0 /config.c
parent6afdb07b7b918ed9282ea6e955f53369df862be8 (diff)
parent05d57750c66e4b58233787954c06b8f714bbee75 (diff)
downloadgit-f49c478f628910de206c5e882a3cd3abec76d4e6.tar.gz
Merge branch 'tk/simple-autosetupmerge'
"git -c branch.autosetupmerge=simple branch $A $B" will set the $B as $A's upstream only when $A and $B shares the same name, and "git -c push.default=simple" on branch $A would push to update the branch $A at the remote $B came from. Also more places use the sole remote, if exists, before defaulting to 'origin'. * tk/simple-autosetupmerge: push: new config option "push.autoSetupRemote" supports "simple" push push: default to single remote even when not named origin branch: new autosetupmerge option 'simple' for matching branches
Diffstat (limited to 'config.c')
-rw-r--r--config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/config.c b/config.c
index fa471dbdb8..75cc16f36b 100644
--- a/config.c
+++ b/config.c
@@ -1781,6 +1781,9 @@ static int git_default_branch_config(const char *var, const char *value)
} else if (value && !strcmp(value, "inherit")) {
git_branch_track = BRANCH_TRACK_INHERIT;
return 0;
+ } else if (value && !strcmp(value, "simple")) {
+ git_branch_track = BRANCH_TRACK_SIMPLE;
+ return 0;
}
git_branch_track = git_config_bool(var, value);
return 0;