diff options
-rw-r--r-- | cgitrc.5.txt | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 6b4efa2..34b351b 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt | |||
@@ -775,14 +775,25 @@ through use of git notes. For example, the following command may be used to | |||
775 | add a signature to a .tar.xz archive: | 775 | add a signature to a .tar.xz archive: |
776 | 776 | ||
777 | git notes --ref=refs/notes/signatures/tar.xz add -C "$( | 777 | git notes --ref=refs/notes/signatures/tar.xz add -C "$( |
778 | gpg --output - --armor --detach-sign cgit-1.1.tar.xz | | 778 | gpg --output - --armor --detach-sign cgit-1.1.tar.xz | |
779 | git hash-object -w --stdin | 779 | git hash-object -w --stdin |
780 | )" v1.1 | 780 | )" v1.1 |
781 | 781 | ||
782 | If it is instead desirable to attach a signature of the underlying .tar, this | 782 | If it is instead desirable to attach a signature of the underlying .tar, this |
783 | will be linked, as a special case, beside a .tar.* link that does not have its | 783 | will be linked, as a special case, beside a .tar.* link that does not have its |
784 | own signature. | 784 | own signature. For example, a signature of a tarball of the latest tag might |
785 | 785 | be added with a similar command: | |
786 | |||
787 | tag="$(git describe --abbrev=0)" | ||
788 | git notes --ref=refs/notes/signatures/tar add -C "$( | ||
789 | git archive --format tar --prefix "cgit-${tag#v}/" "$tag" | | ||
790 | gpg --output - --armor --detach-sign | | ||
791 | git hash-object -w --stdin | ||
792 | )" "$tag" | ||
793 | |||
794 | Since git-archive(1) is expected to produce stable output between versions, | ||
795 | this allows one to generate a long-term signature of the contents of a given | ||
796 | tag. | ||
786 | 797 | ||
787 | EXAMPLE CGITRC FILE | 798 | EXAMPLE CGITRC FILE |
788 | ------------------- | 799 | ------------------- |