aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index cda6eaf1fd..40a0e8d244 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1728,7 +1728,7 @@ static int do_fetch(struct transport *transport,
if (transport->remote->follow_remote_head != FOLLOW_REMOTE_NEVER)
do_set_head = 1;
}
- if (branch_has_merge_config(branch) &&
+ if (branch && branch_has_merge_config(branch) &&
!strcmp(branch->remote_name, transport->remote->name)) {
int i;
for (i = 0; i < branch->merge_nr; i++) {
@@ -2560,6 +2560,7 @@ int cmd_fetch(int argc,
if (server_options.nr)
gtransport->server_options = &server_options;
result = transport_fetch_refs(gtransport, NULL);
+ gtransport->smart_options->acked_commits = NULL;
oidset_iter_init(&acked_commits, &iter);
while ((oid = oidset_iter_next(&iter)))