summaryrefslogtreecommitdiff
path: root/t/t6041-bisect-submodule.sh
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-04-18 16:53:37 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-04-19 06:24:23 +0900
commit0b5e2ea7cf3b0fd0f4339b7c8b69cb8c5853c0cd (patch)
treef390f4469b708903d71b5fbea068aaf256f3ea9d /t/t6041-bisect-submodule.sh
parentsubmodule: port submodule subcommand 'status' from shell to C (diff)
downloadtgif-0b5e2ea7cf3b0fd0f4339b7c8b69cb8c5853c0cd.tar.xz
submodule--helper: don't print null in 'submodule status'
The function compute_rev_name() can return NULL sometimes (e.g. right after 'submodule init'). The current code makes 'submodule status' print this: 19d97bf5af05312267c2e874ee6bcf584d9e9681 sha1collisiondetection ((null)) This ugly 'null' adds no value to the user using this command. More importantly printf() on some platform can't handle NULL as a string and will crash instead of printing '(null)'. Check for this and skip printing this part (the alternative is printing '(n/a)' or something but I think that is just noise). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6041-bisect-submodule.sh')
0 files changed, 0 insertions, 0 deletions