Skip to content

Commit

Permalink
find_first_merges(): remove unnecessary code
Browse files Browse the repository at this point in the history
No names are ever set for the object_array_entries in merges, so there
is no need to pretend to copy them to the result array.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed May 28, 2013
1 parent 3826902 commit 5de0c01
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions submodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,7 @@ static int find_first_merges(struct object_array *result, const char *path,
}

if (!contains_another)
add_object_array(merges.objects[i].item,
merges.objects[i].name, result);
add_object_array(merges.objects[i].item, NULL, result);
}

free(merges.objects);
Expand Down

0 comments on commit 5de0c01

Please sign in to comment.