summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-11-15 12:04:52 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-11-15 12:04:52 +0900
commit9fbcb51ec548318f0088a5fee6c77a5f1d8512b4 (patch)
tree548dfa2d249d03ddb7bec8653d8e596727bf94ae /t
parentMerge branch 'sb/diff-color-moved-use-xdl-recmatch' into maint (diff)
parentworktree: handle broken symrefs in find_shared_symref() (diff)
downloadtgif-9fbcb51ec548318f0088a5fee6c77a5f1d8512b4.tar.xz
Merge branch 'jk/misc-resolve-ref-unsafe-fixes' into maint
Some codepaths did not check for errors when asking what branch the HEAD points at, which have been fixed. * jk/misc-resolve-ref-unsafe-fixes: worktree: handle broken symrefs in find_shared_symref() log: handle broken HEAD in decoration check remote: handle broken symrefs test-ref-store: avoid passing NULL to printf
Diffstat (limited to 't')
-rw-r--r--t/helper/test-ref-store.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index 05d8c4d8af..6ec2670044 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c
@@ -135,7 +135,7 @@ static int cmd_resolve_ref(struct ref_store *refs, const char **argv)
ref = refs_resolve_ref_unsafe(refs, refname, resolve_flags,
sha1, &flags);
- printf("%s %s 0x%x\n", sha1_to_hex(sha1), ref, flags);
+ printf("%s %s 0x%x\n", sha1_to_hex(sha1), ref ? ref : "(null)", flags);
return ref ? 0 : 1;
}