diff options
author | John Keeping | 2018-03-31 16:15:48 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2018-06-27 18:11:19 +0200 |
commit | c712d5ac434b9ee8cb4e63a173a2538e1878637f (patch) | |
tree | 8b4f71d0fb9ef478409109fbf485532ae90660f0 /cgit.h | |
parent | 71d14d9c98c39a6683780060f84429a3a7e5b348 (diff) | |
download | cgit-c712d5ac434b9ee8cb4e63a173a2538e1878637f.tar.gz cgit-c712d5ac434b9ee8cb4e63a173a2538e1878637f.tar.bz2 cgit-c712d5ac434b9ee8cb4e63a173a2538e1878637f.zip |
snapshot: support archive signatures
Read signatures from the notes refs refs/notes/signatures/$FORMAT where
FORMAT is one of our archive formats ("tar", "tar.gz", ...). The note
is expected to simply contain the signature content to be returned when
the snapshot "${filename}.asc" is requested, so the signature for
cgit-1.1.tar.xz can be stored against the v1.1 tag with:
git notes --ref=refs/notes/signatures/tar.xz add -C "$(
gpg --output - --armor --detach-sign cgit-1.1.tar.xz |
git hash-object -w --stdin
)" v1.1
and then downloaded by simply appending ".asc" to the archive URL.
Signed-off-by: John Keeping <john@keeping.me.uk>
Reviewed-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -374,6 +374,8 @@ extern void cgit_parse_url(const char *url); | |||
374 | extern const char *cgit_repobasename(const char *reponame); | 374 | extern const char *cgit_repobasename(const char *reponame); |
375 | 375 | ||
376 | extern int cgit_parse_snapshots_mask(const char *str); | 376 | extern int cgit_parse_snapshots_mask(const char *str); |
377 | extern const struct object_id *cgit_snapshot_get_sig(const char *ref, | ||
378 | const struct cgit_snapshot_format *f); | ||
377 | 379 | ||
378 | extern int cgit_open_filter(struct cgit_filter *filter, ...); | 380 | extern int cgit_open_filter(struct cgit_filter *filter, ...); |
379 | extern int cgit_close_filter(struct cgit_filter *filter); | 381 | extern int cgit_close_filter(struct cgit_filter *filter); |