git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
blob 5448918da9cbb1aefd874ef6a780686281207133 1886 bytes (raw)
name: Documentation/technical/format-patch-metadata.txt 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 
format-patch Metadata
=====================

Background
----------

The current format-patch data lacks a way to express general metadata that may
be useful to synthesize the original commit more accurately.  This may be
helpful to emit patches as a transport for actual commits between machines in a
case where bundles are not practical, such as a mailing list.

Syntax
------

The syntax contains three space-separated components: a field name, an encoding,
and field data.

The field name contains no spaces.  Values without an `@` are specified below or
by a future version of Git.  Values containing an `@` followed by a domain are
specified by that domain owner, much as algorithm names in the SSH protocol.

The encoding is either `plain`, in which case the field data is a literal string
with no spaces, or `base64`, in which case the field data is one or more
space-separated base64 items, which when interpreted have all spaces stripped
and are then encoded.  This allows fields to be specified that contain octets
which are not valid in or which are too long to specified in an RFC 5322 header
unencoded.

Fields
------

base-commit-sha1::
	This specifies the base commit for this patch using a SHA-1 object ID.
base-commit-sha256::
	This specifies the base commit for this patch using a SHA-256 object ID.
	appropriate.
gpgsig-sha1::
	This specifies a signature for this patch using the SHA-1 format, as specified
	in the `gpgsig` header.
gpgsig-sha256::
	This specifies the base commit for this patch using the SHA-256 object ID, as
	specified in the `gpgsig-sha256` header.

Examples
--------

----
X-Git-Metadata: base-commit-sha1 plain da39a3ee5e6b4b0d3255bfef95601890afd80709

X-Git-Metadata: gpgsig-sha256 base64
  LS0tLS1CRUdJTiBTU0ggU0lHTkFUVVJFLS0tLS0KYmxhaCBibGFoIGJsYWgKLS0tLS1FTkQgU1NI
  IFNJR05BVFVSRS0tLS0tCg==

X-Git-Metadata: foo@example.com plain quux
----

debug log:

solving 5448918da9 ...
found 5448918da9 in https://public-inbox.org/git/20220919145231.48245-2-sandals@crustytoothpaste.net/

applying [1/1] https://public-inbox.org/git/20220919145231.48245-2-sandals@crustytoothpaste.net/
diff --git a/Documentation/technical/format-patch-metadata.txt b/Documentation/technical/format-patch-metadata.txt
new file mode 100644
index 0000000000..5448918da9

Checking patch Documentation/technical/format-patch-metadata.txt...
Applied patch Documentation/technical/format-patch-metadata.txt cleanly.

index at:
100644 5448918da9cbb1aefd874ef6a780686281207133	Documentation/technical/format-patch-metadata.txt

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).