list-objects.c: don't segfault for missing cmdline objects
commit4cf67869b2ae3df7ab76b03c627f7b72d18d24ce
authorMatthew DeVore <matvore@google.com>
Wed, 5 Dec 2018 21:43:46 +0000 (5 13:43 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Dec 2018 01:10:13 +0000 (6 10:10 +0900)
treea6e33d75471168a4f47d5237c36517879d40c16e
parentc670b1f876521c9f7cd40184bf7ed05aad843433
list-objects.c: don't segfault for missing cmdline objects

When a command is invoked with both --exclude-promisor-objects,
--objects-edge-aggressive, and a missing object on the command line,
the rev_info.cmdline array could get a NULL pointer for the value of
an 'item' field. Prevent dereferencing of a NULL pointer in that
situation.

Properly handle --ignore-missing. If it is not passed, die when an
object is missing. Otherwise, just silently ignore it.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c
t/t0410-partial-clone.sh