From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jim Meyering <jim@meyering.net>,
Drew Northup <drew.northup@maine.edu>,
git list <git@vger.kernel.org>, Yann Dirson <ydirson@altern.org>,
Stephen Boyd <bebarino@gmail.com>
Subject: [PATCH 1/5] Documentation: describe the format of messages with inline patches
Date: Thu, 14 Apr 2011 21:22:02 -0500 [thread overview]
Message-ID: <20110415022202.GB19829@elie> (raw)
In-Reply-To: <20110415021100.GA19829@elie>
Add a DISCUSSION section to the "git format-patch" manual to encourage
people to send patches in a form that can be applied by "git am"
automatically. There are two such forms:
1. The default form in which most metadata goes in the mail header
and the message body starts with the patch description;
2. The snipsnip form in which a message starts with pertinent
discussion and ends with a patch after a "scissors" mark.
The example requires QP encoding in the "Subject:" header intended for
the mailer to give the reader a chance to reflect on that, rather than
being startled by it later. By contrast, in-body "From:" and
"Subject:" lines should be human-readable and not QP encoded.
Inspired-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/git-format-patch.txt | 58 ++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index a5525e9..a4a9813 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -229,6 +229,64 @@ attachments, and sign off patches with configuration variables.
------------
+DISCUSSION
+----------
+
+The patch produced by 'git format-patch' is in UNIX mailbox format,
+with a fixed "magic" time stamp to indicate that the file is output
+from format-patch rather than a real mailbox, like so:
+
+------------
+From 8f72bad1baf19a53459661343e21d6491c3908d3 Mon Sep 17 00:00:00 2001
+From: Tony Luck <tony.luck@intel.com>
+Date: Tue, 13 Jul 2010 11:42:54 -0700
+Subject: [PATCH] =?UTF-8?q?[IA64]=20Put=20ia64=20config=20files=20on=20the=20?=
+ =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20diet?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+arch/arm config files were slimmed down using a python script
+(See commit c2330e286f68f1c408b4aa6515ba49d57f05beae comment)
+
+Do the same for ia64 so we can have sleek & trim looking
+...
+------------
+
+Typically it will be placed in a MUA's drafts folder, edited to add
+timely commentary that should not go in the changelog after the three
+dashes, and then sent as a message whose body starts with "arch/arm
+config files were". On the receiving end, readers can save
+interesting patches in a UNIX mailbox and apply them with
+linkgit:git-am[1].
+
+When a patch is part of an ongoing discussion, the patch generated by
+'git format-patch' can be tweaked to take advantage of the 'git am
+--scissors' feature. After your response to the discussion comes a
+line that consists solely of "`-- >8 --`" (scissors and perforation),
+followed by the patch with unnecessary header fields removed:
+
+------------
+...
+> So we should do such-and-such.
+
+Makes sense to me. How about this patch?
+
+-- >8 --
+Subject: [IA64] Put ia64 config files on the Uwe Kleine-König diet
+
+arch/arm config files were slimmed down using a python script
+...
+------------
+
+When sending a patch this way, most often you are sending your own
+patch, so in addition to the "`From $SHA1 $magic_timestamp`" marker you
+should omit `From:` and `Date:` lines from the patch file. The patch
+title is likely to be different from the subject of the discussion the
+patch is in response to, so it is likely that you would want to keep
+the Subject: line, like the example above.
+
+
EXAMPLES
--------
--
1.7.5.rc0
next prev parent reply other threads:[~2011-04-15 2:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 15:39 [PATCH] remove doubled words, e.g., s/to to/to/, and fix related typos Jim Meyering
2011-04-13 18:35 ` Drew Northup
2011-04-13 21:22 ` Jim Meyering
2011-04-13 22:17 ` [PATCH/RFC] Documentation/format-patch: summarize patch-sending workflow Jonathan Nieder
2011-04-13 22:38 ` Junio C Hamano
2011-04-14 21:11 ` [PATCH v2] Documentation: summarize how format-patch output is consumed Jonathan Nieder
2011-04-14 22:05 ` Junio C Hamano
2011-04-15 2:11 ` [PATCH/RFC v3 0/5] Documentation/format-patch: more hints on submitting patches Jonathan Nieder
2011-04-15 2:22 ` Jonathan Nieder [this message]
2011-04-15 20:11 ` [PATCH 1/5] Documentation: describe the format of messages with inline patches Drew Northup
2011-04-15 20:24 ` Junio C Hamano
2011-04-15 2:24 ` [PATCH 2/5] Documentation: explain how to check for patch corruption Jonathan Nieder
2011-04-15 4:53 ` Junio C Hamano
2011-04-15 6:17 ` Jonathan Nieder
2011-04-15 2:28 ` [PATCH 3/5] Documentation: hints for sending patches inline with Thunderbird Jonathan Nieder
2011-04-15 2:32 ` [PATCH 4/5] Documentation: publicize KMail hints for sending patches inline Jonathan Nieder
2011-04-17 13:57 ` Michele Ballabio
2011-04-15 2:33 ` [PATCH 5/5] Documentation: publicize hints for sending patches with GMail Jonathan Nieder
2011-04-15 7:41 ` [PATCH/RFC 6/5] Documentation/format-patch: suggest Toggle Word Wrap add-on for Thunderbird Johannes Sixt
2011-04-15 17:54 ` Junio C Hamano
2011-04-15 18:01 ` Michael J Gruber
2011-04-15 18:49 ` Junio C Hamano
2011-04-15 20:17 ` Jonathan Nieder
2011-04-18 6:31 ` [PATCH 6/5 v2] " Johannes Sixt
2011-04-13 22:26 ` [PATCH] remove doubled words, e.g., s/to to/to/, and fix related typos Jakub Narebski
2011-04-13 18:47 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110415022202.GB19829@elie \
--to=jrnieder@gmail.com \
--cc=bebarino@gmail.com \
--cc=drew.northup@maine.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jim@meyering.net \
--cc=ydirson@altern.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.