+
Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion builtin/pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static struct option pull_options[] = {
0),
OPT_BOOL(0, "show-forced-updates", &opt_show_forced_updates,
N_("check for forced-updates on all updated branches")),
OPT_PASSTHRU(0, "set-upstream", &set_upstream, NULL,
OPT_PASSTHRU('u', "set-upstream", &set_upstream, NULL,
N_("set upstream for git pull/fetch"),
PARSE_OPT_NOARG),

Expand Down
7 changes: 7 additions & 0 deletions t/t5553-set-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ test_expect_success 'pull --set-upstream upstream main sets branch main but not
check_config_missing other
'

test_expect_success 'pull -u upstream main sets branch main but not other' '
clear_config main other &&
git pull --no-rebase -u upstream main &&
check_config main upstream refs/heads/main &&
check_config_missing other
'

test_expect_success 'pull --set-upstream main:other2 does not set the branch other2' '
clear_config other2 &&
git pull --no-rebase --set-upstream upstream main:other2 &&
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载