diff --git a/34.md b/34.md index 94d530b0..ca3c6af3 100644 --- a/34.md +++ b/34.md @@ -165,33 +165,30 @@ 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. - ## Git Diffs Git Diff events (`kind: 1622`) represent changes between two commits within a Git repository, encapsulated as a unified diff. This event type is distinct from Git patches as it explicitly represents the state difference between two specific commits rather than modifications intended for direct application. Clients should render the event's `content` field as preformatted unified diff text (commonly displayed with diff highlighting). -### Event Format - ```jsonc { "kind": 1622, "content": "", "tags": [ - // Addressing tag for repository identification + // Reference to the repo's 30617 event if one exists ["a", "30617::"], // Explicit commit ID this diff represents (mandatory) ["commit", ""], // Parent commit ID from which the diff is generated (mandatory) ["parent-commit", ""], - // Optional specification of repository URL for interoperability + // Explicit repository URL (optional if resolvable via 'a' tag, recommended for interoperability) ["repo", "https://github.com/user/repo.git"], - // Optional branch or reference for context - ["branch", "feature/update-nip34"], + // refs associated with the repository + ["refs//",""] // File path within the repository affected by this diff (optional but recommended if diff is single-file) - ["file", "src/module/example.ts"], + ["file", ""], // Optional start and end lines in the diff context (recommended for precise referencing) ["lines", "172", "196"], // Optional description for context or explanation of changes @@ -208,7 +205,6 @@ Clients rendering Git Diff events SHOULD: - Clearly indicate repository, branch, and file context if provided. This detailed structure improves clarity, usability, and interoperability, providing clients with comprehensive context and ensuring precise referencing and rendering. -The first patch in a series MAY be a cover letter in the format produced by `git format-patch`. ## Permalinks @@ -245,7 +241,6 @@ Clients rendering permalink events SHOULD: - Display provided code/text using syntax highlighting according to the specified language tag (`l`). - Offer navigation or direct links to view the file within external repository browsers or clients. - ## Possible things to be added later - "branch merge" kind (specifying a URL from where to fetch the branch to be merged)