We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa20303 commit 0264f5dCopy full SHA for 0264f5d
builtin/push.c
@@ -90,7 +90,7 @@ static void refspec_append_mapped(struct refspec *refspec, const char *ref,
90
if (push_default == PUSH_DEFAULT_UPSTREAM &&
91
skip_prefix(matched->name, "refs/heads/", &branch_name)) {
92
struct branch *branch = branch_get(branch_name);
93
- if (branch->merge_nr == 1 && branch->merge[0]->src) {
+ if (branch && branch->merge_nr == 1 && branch->merge[0]->src) {
94
refspec_appendf(refspec, "%s:%s",
95
ref, branch->merge[0]->src);
96
return;
0 commit comments