MCPcopy Create free account
hub / github.com/git/git / error_on_missing_default_upstream

Function error_on_missing_default_upstream

builtin/rebase.c:1054–1082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1052}
1053
1054static void NORETURN error_on_missing_default_upstream(void)
1055{
1056 struct branch *current_branch = branch_get(NULL);
1057
1058 printf(_("%s\n"
1059 "Please specify which branch you want to rebase against.\n"
1060 "See git-rebase(1) for details.\n"
1061 "\n"
1062 " git rebase '<branch>'\n"
1063 "\n"),
1064 current_branch ? _("There is no tracking information for "
1065 "the current branch.") :
1066 _("You are not currently on a branch."));
1067
1068 if (current_branch) {
1069 const char *remote = current_branch->remote_name;
1070
1071 if (!remote)
1072 remote = _("<remote>");
1073
1074 printf(_("If you wish to set tracking information for this "
1075 "branch you can do so with:\n"
1076 "\n"
1077 " git branch --set-upstream-to=%s/<branch> %s\n"
1078 "\n"),
1079 remote, current_branch->name);
1080 }
1081 exit(1);
1082}
1083
1084static int check_exec_cmd(const char *cmd)
1085{

Callers 1

cmd_rebaseFunction · 0.85

Calls 1

branch_getFunction · 0.85

Tested by

no test coverage detected