1
0
mirror of https://github.com/git/git.git synced 2024-10-21 13:59:03 +02:00
git/builtin
Nguyễn Thái Ngọc Duy 0b5e2ea7cf 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>
2018-04-19 06:24:23 +09:00
..
add.c
am.c
annotate.c
apply.c
archive.c
bisect--helper.c
blame.c
branch.c
bundle.c
cat-file.c
check-attr.c
check-ignore.c
check-mailmap.c
check-ref-format.c
checkout-index.c
checkout.c
clean.c
clone.c
column.c
commit-tree.c Merge branch 'rk/commit-tree-make-F-verbatim' 2017-09-19 10:47:57 +09:00
commit.c
config.c
count-objects.c
credential.c
describe.c
diff-files.c
diff-index.c
diff-tree.c
diff.c
difftool.c
fast-export.c
fetch-pack.c
fetch.c
fmt-merge-msg.c
for-each-ref.c
fsck.c
gc.c
get-tar-commit-id.c
grep.c
hash-object.c
help.c
index-pack.c
init-db.c
interpret-trailers.c
log.c
ls-files.c
ls-remote.c
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'rs/strbuf-leakfix' 2017-09-19 10:47:57 +09:00
mktag.c
mktree.c
mv.c
name-rev.c Merge branch 'mg/timestamp-t-fix' 2017-09-19 10:47:52 +09:00
notes.c
pack-objects.c Merge branch 'ma/ts-cleanups' 2017-09-10 17:08:22 +09:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c
pull.c
push.c
read-tree.c
rebase--helper.c
receive-pack.c
reflog.c
remote-ext.c
remote-fd.c
remote.c
repack.c
replace.c
rerere.c
reset.c Merge branch 'jk/leak-checkers' 2017-09-19 10:47:55 +09:00
rev-list.c
rev-parse.c Merge branch 'mh/packed-ref-store-prep' 2017-09-19 10:47:55 +09:00
revert.c
rm.c
send-pack.c
shortlog.c
show-branch.c
show-ref.c
stripspace.c
submodule--helper.c submodule--helper: don't print null in 'submodule status' 2018-04-19 06:24:23 +09:00
symbolic-ref.c
tag.c
unpack-file.c
unpack-objects.c
update-index.c Merge branch 'jk/leak-checkers' 2017-09-19 10:47:55 +09:00
update-ref.c
update-server-info.c
upload-archive.c
var.c
verify-commit.c
verify-pack.c
verify-tag.c
worktree.c
write-tree.c