diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
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.
Diffstat (limited to 'source/shared.h')
| -rw-r--r-- | source/shared.h | 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 7 insertions, 0 deletions
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 |
