upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/34.md
diff options
context:
space:
mode:
Diffstat (limited to '34.md')
-rw-r--r--34.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/34.md b/34.md
index 52e23b5..4989803 100644
--- a/34.md
+++ b/34.md
@@ -35,6 +35,36 @@ The `r` tag annotated with the `"euc"` marker should be the commit ID of the ear
35 35
36Except `d`, all tags are optional. 36Except `d`, all tags are optional.
37 37
38## Repository state announcements
39
40An optional source of truth for the state of branches and tags in a repository.
41
42```jsonc
43{
44 "kind": 30618,
45 "content": "",
46 "tags": [
47 ["d", "<repo-id>"], // matches the identifier in the coresponding repository announcement
48 ["refs/<heads|tags>/<branch-or-tag-name>","<commit-id>"]
49 ["HEAD", "ref: refs/heads/<branch-name>"]
50 ]
51}
52```
53
54The `refs` tag may appear multiple times, or none.
55
56If no `refs` tags are present, the author is no longer tracking repository state using this event. This approach enables the author to restart tracking state at a later time unlike [NIP-09](09.md) deletion.
57
58The `refs` tag can be optionally extended to enable clients to identify how many commits ahead a ref is:
59
60```jsonc
61{
62 "tags": [
63 ["refs/<heads|tags>/<branch-or-tag-name>", "<commit-id>", "<shorthand-parent-commit-id>", "<shorthand-grandparent>", ...],
64 ]
65}
66```
67
38## Patches 68## Patches
39 69
40Patches 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. 70Patches 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.