builtin/pack-objects.c: avoid redundant NULL check
Before calling `for_each_object_in_pack()`, the caller `read_packs_list_from_stdin()` loops through each of the `include_packs` and checks that its `->util` pointer (which is used to store the `struct packed_git *` itself) is non-NULL. This check is redundant, because `read_packs_list_from_stdin()` already checks that the included packs are non-NULL earlier on in the same function (and it does not add any new entries in between). Remove this check, since it is not doing anything in the meantime. Co-authored-by: Victoria Dye <vdye@github.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
44f9fd6496
commit
58a6abb7ba
@ -3361,8 +3361,6 @@ static void read_packs_list_from_stdin(void)
|
||||
|
||||
for_each_string_list_item(item, &include_packs) {
|
||||
struct packed_git *p = item->util;
|
||||
if (!p)
|
||||
die(_("could not find pack '%s'"), item->string);
|
||||
for_each_object_in_pack(p,
|
||||
add_object_entry_from_pack,
|
||||
&revs,
|
||||
|
Loading…
Reference in New Issue
Block a user