cc61cf465f
It's possible for resolve_ref_unsafe() to return NULL (e.g., if we are reading and the ref does not exist), in which case we'll pass NULL to printf. On glibc systems this produces "(null)", but on others it may segfault. The tests don't expect any such case, but if we ever did trigger this, we would prefer to cleanly fail the test with unexpected input rather than segfault. Let's manually replace NULL with "(null)". The exact value doesn't matter, as it won't match any possible ref the caller could expect (and anyway, the exit code of the program will tell whether "ref" is valid or not). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
.gitignore | ||
test-chmtime.c | ||
test-config.c | ||
test-ctype.c | ||
test-date.c | ||
test-delta.c | ||
test-dump-cache-tree.c | ||
test-dump-split-index.c | ||
test-dump-untracked-cache.c | ||
test-fake-ssh.c | ||
test-genrandom.c | ||
test-hashmap.c | ||
test-index-version.c | ||
test-lazy-init-name-hash.c | ||
test-line-buffer.c | ||
test-match-trees.c | ||
test-mergesort.c | ||
test-mktemp.c | ||
test-online-cpus.c | ||
test-parse-options.c | ||
test-path-utils.c | ||
test-prio-queue.c | ||
test-read-cache.c | ||
test-ref-store.c | ||
test-regex.c | ||
test-revision-walking.c | ||
test-run-command.c | ||
test-scrap-cache-tree.c | ||
test-sha1-array.c | ||
test-sha1.c | ||
test-sha1.sh | ||
test-sigchain.c | ||
test-strcmp-offset.c | ||
test-string-list.c | ||
test-submodule-config.c | ||
test-subprocess.c | ||
test-svn-fe.c | ||
test-urlmatch-normalization.c | ||
test-wildmatch.c | ||
test-write-cache.c |