nip34: simplify r tag for earliest unique commit.

This commit is contained in:
fiatjaf 2024-04-24 18:44:36 -03:00 committed by fiatjaf_
parent 243b286582
commit bad8826211

11
34.md
View File

@ -23,8 +23,7 @@ Git repositories are hosted in Git-enabled servers, but their existence can be a
["web", "<url for browsing>", ...], // a webpage url, if the git server being used provides such a thing ["web", "<url for browsing>", ...], // a webpage url, if the git server being used provides such a thing
["clone", "<url for git-cloning>", ...], // a url to be given to `git clone` so anyone can clone it ["clone", "<url for git-cloning>", ...], // a url to be given to `git clone` so anyone can clone it
["relays", "<relay-url>", ...] // relays that this repository will monitor for patches and issues ["relays", "<relay-url>", ...] // relays that this repository will monitor for patches and issues
["earliest-unique-commit", "<commit-id>"] // usually root commit but a recent commit for forks ["r", "<earliest-unique-commit-id>", "euc"]
["r", "<earliest-unique-commit-id>"] // so clients can subscribe to all events related to a local git repo
["maintainers", "<other-recognized-maintainer>", ...] ["maintainers", "<other-recognized-maintainer>", ...]
] ]
} }
@ -32,13 +31,15 @@ Git repositories are hosted in Git-enabled servers, but their existence can be a
The tags `web`, `clone`, `relays`, `maintainers` can have multiple values. The tags `web`, `clone`, `relays`, `maintainers` can have multiple values.
The `r` tag annotated with the `"euc"` marker should be the commit ID of the earliest unique commit of this repo, made to identify it among forks and group it with other repositories hosted elsewhere that may represent essentially the same project. In most cases it will be the root commit of a repository. In case of a permanent fork between two projects, then the first commit after the fork should be used.
Except `d`, all tags are optional. Except `d`, all tags are optional.
## Patches ## Patches
Patches can be sent by anyone to any repository. Patches to a specific repository SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. Patch events SHOULD include an `a` tag pointing to that repository's announcement address. Patches can be sent by anyone to any repository. Patches to a specific repository SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. Patch events SHOULD include an `a` tag pointing to that repository's announcement address.
Patches in a patch set SHOULD include a NIP-10 `e` `reply` tag pointing to the previous patch. Patches in a patch set SHOULD include a NIP-10 `e` `reply` tag pointing to the previous patch.
The first patch revision in a patch revision SHOULD include a NIP-10 `e` `reply` to the original root patch. The first patch revision in a patch revision SHOULD include a NIP-10 `e` `reply` to the original root patch.
@ -132,7 +133,7 @@ Root Patches and Issues have a Status that defaults to 'Open' and can be set by
["e", "<applied-or-merged-patch-event-id>", "", "mention"], // for each ["e", "<applied-or-merged-patch-event-id>", "", "mention"], // for each
// when merged // when merged
["merge-commit", "<merge-commit-id>"] ["merge-commit", "<merge-commit-id>"]
["r", "<merge-commit-id>"] ["r", "<merge-commit-id>"]
// when applied // when applied
["applied-as-commits", "<commit-id-in-master-branch>", ...] ["applied-as-commits", "<commit-id-in-master-branch>", ...]
["r", "<applied-commit-id>"] // for each ["r", "<applied-commit-id>"] // for each
@ -142,7 +143,7 @@ Root Patches and Issues have a Status that defaults to 'Open' and can be set by
The Status event with the largest created_at date is valid. The Status event with the largest created_at date is valid.
The Status of a patch-revision defaults to either that of the root-patch, or `1632` (Closed) if the root-patch's Status is `1631` and the patch-revision isn't tagged in the `1631` event. The Status of a patch-revision defaults to either that of the root-patch, or `1632` (Closed) if the root-patch's Status is `1631` and the patch-revision isn't tagged in the `1631` event.
## Possible things to be added later ## Possible things to be added later