diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-03-07 09:01:19 +0000 |
|---|---|---|
| committer | fiatjaf_ <fiatjaf@gmail.com> | 2024-04-17 17:46:34 -0300 |
| commit | 8225a018c72c4d11b575ed4e57fa587d08c09027 (patch) | |
| tree | c76ca33520709ff4c5cee874c011e4ffe4188120 | |
| parent | cb0d35a5f9f1b88a270f7fbbfbdb97e095e28d56 (diff) | |
NIP-34: optional tags to improve discoverability
earliest-unique-commit r tag enables clients to:
- retrieve all repo events refering to a local git repo
- group repo events with different identifers that refer to same repo
- retrieve all patches for a local repo,
irespective of the tagged repo event
current-commit-id r tag enables clients to prevent accidental submission of a patch,
which has already been proposed
root-revision tag enables clients to filter out proposal revisions
from a list of proposals
| -rw-r--r-- | 34.md | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -23,6 +23,8 @@ Git repositories are hosted in Git-enabled servers, but their existence can be a | |||
| 23 | ["web", "<url for browsing>", ...], // a webpage url, if the git server being used provides such a thing | 23 | ["web", "<url for browsing>", ...], // a webpage url, if the git server being used provides such a thing |
| 24 | ["clone", "<url for git-cloning>", ...], // a url to be given to `git clone` so anyone can clone it | 24 | ["clone", "<url for git-cloning>", ...], // a url to be given to `git clone` so anyone can clone it |
| 25 | ["relays", "<relay-url>", ...] // relays that this repository will monitor for patches and issues | 25 | ["relays", "<relay-url>", ...] // relays that this repository will monitor for patches and issues |
| 26 | ["earliest-unique-commit", "<commit-id>"] // usually root commit but a recent commit for forks | ||
| 27 | ["r", "<earliest-unique-commit-id>"] // so clients can subscribe to all events related to a local git repo | ||
| 26 | ["maintainers", "<other-recognized-maintainer>", ...] | 28 | ["maintainers", "<other-recognized-maintainer>", ...] |
| 27 | ] | 29 | ] |
| 28 | } | 30 | } |
| @@ -46,17 +48,20 @@ The first patch revision in a patch revision SHOULD include a NIP-10 `e` `reply` | |||
| 46 | "content": "<patch>", // contents of <git format-patch> | 48 | "content": "<patch>", // contents of <git format-patch> |
| 47 | "tags": [ | 49 | "tags": [ |
| 48 | ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"], | 50 | ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"], |
| 51 | ["r", "<earliest-unique-commit-id-of-repo>"] // so clients can subscribe to all patches sent to a local git repo | ||
| 49 | ["p", "<repository-owner>"], | 52 | ["p", "<repository-owner>"], |
| 50 | ["p", "<other-user>"], // optionally send the patch to another user to bring it to their attention | 53 | ["p", "<other-user>"], // optionally send the patch to another user to bring it to their attention |
| 51 | 54 | ||
| 52 | // for the first patch in a thread or series | 55 | ["t", "root"], // ommited for additional patches in a series |
| 53 | ["t", "root"], | 56 | // for the first patch in a revision |
| 57 | ["t", "root-revision"], | ||
| 54 | 58 | ||
| 55 | // optional tags for when it is desirable that the merged patch has a stable commit id | 59 | // optional tags for when it is desirable that the merged patch has a stable commit id |
| 56 | // these fields are necessary for ensuring that the commit resulting from applying a patch | 60 | // these fields are necessary for ensuring that the commit resulting from applying a patch |
| 57 | // has the same id as it had in the proposer's machine -- all these tags can be omitted | 61 | // has the same id as it had in the proposer's machine -- all these tags can be omitted |
| 58 | // if the maintainer doesn't care about these things | 62 | // if the maintainer doesn't care about these things |
| 59 | ["commit", "<current-commit-id>"], | 63 | ["commit", "<current-commit-id>"], |
| 64 | ["r", "<current-commit-id>"] // so clients can find existing patches for a specific commit | ||
| 60 | ["parent-commit", "<parent-commit-id>"], | 65 | ["parent-commit", "<parent-commit-id>"], |
| 61 | ["commit-pgp-sig", "-----BEGIN PGP SIGNATURE-----..."], // empty string for unsigned commit | 66 | ["commit-pgp-sig", "-----BEGIN PGP SIGNATURE-----..."], // empty string for unsigned commit |
| 62 | ["committer", "<name>", "<email>", "<timestamp>", "<timezone offset in minutes>"], | 67 | ["committer", "<name>", "<email>", "<timestamp>", "<timezone offset in minutes>"], |