From 175d38ca231d0dd9cca3bbebae40f797346a850d Mon Sep 17 00:00:00 2001 From: Heiko Voigt Date: Thu, 28 Jul 2016 14:55:14 +0200 Subject: SubmittingPatches: document how to reference previous commits To reference previous commits people used to put just the abbreviated SHA-1 into commit messages. This is what has evolved as a more stable format for referencing commits. So lets document it for everyone to look-up when needed. Signed-off-by: Heiko Voigt Signed-off-by: Junio C Hamano --- Documentation/SubmittingPatches | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation') diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index e8ad978824..500230c054 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -121,6 +121,11 @@ its behaviour. Try to make sure your explanation can be understood without external resources. Instead of giving a URL to a mailing list archive, summarize the relevant points of the discussion. +If you want to reference a previous commit in the history of a stable +branch use the format "abbreviated sha1 (subject, date)". So for example +like this: "Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30) +noticed [...]". + (3) Generate your patch using Git tools out of your commits. -- cgit v1.2.3 From 4369523b4b1ec34c48b11cc18a655ba445a231ac Mon Sep 17 00:00:00 2001 From: Beat Bolli Date: Fri, 26 Aug 2016 18:59:01 +0200 Subject: SubmittingPatches: use gitk's "Copy commit summary" format Update the suggestion in 175d38ca ("SubmittingPatches: document how to reference previous commits", 2016-07-28) on the format to refer to a commit to match what gitk has been giving since last year with its "Copy commit summary" command; also mention this as one of the ways to obtain a commit reference in this format. Signed-off-by: Beat Bolli Signed-off-by: Junio C Hamano --- Documentation/SubmittingPatches | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 500230c054..08352deaae 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -122,9 +122,14 @@ without external resources. Instead of giving a URL to a mailing list archive, summarize the relevant points of the discussion. If you want to reference a previous commit in the history of a stable -branch use the format "abbreviated sha1 (subject, date)". So for example -like this: "Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30) -noticed [...]". +branch, use the format "abbreviated sha1 (subject, date)", +with the subject enclosed in a pair of double-quotes, like this: + + Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30) + noticed that ... + +The "Copy commit summary" command of gitk can be used to obtain this +format. (3) Generate your patch using Git tools out of your commits. -- cgit v1.2.3