From b03c055330bfc06472c6e2a28bb2ea12ca6fb0a1 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 17 Oct 2026 17:09:14 -1000 Subject: Pass over a notes ref that names no tree A pusher can point refs/notes/commits or a signature notes ref at any object, and git dies loading one that is no tree, which ended every page of the repository, the dumb transport included. Such a ref now counts as absent. --- source/shared.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/shared.h') diff --git a/source/shared.h b/source/shared.h index 10aa659..e22eb57 100644 --- a/source/shared.h +++ b/source/shared.h @@ -133,4 +133,11 @@ extern int cgit_readme_is_tracked(const char *readme); */ extern int cgit_valid_rev(const char *rev); +/* + * Whether notes_ref names a tree, which is what a notes tree can be loaded + * from. A ref pointing at anything else makes git die on loading it, and a + * pusher can point one anywhere. + */ +extern int cgit_notes_ref_usable(const char *notes_ref); + #endif // CGIT_SHARED_H -- cgit