Skip to contentSkip to conversation

Documentation/SubmittingPatches: add quotes to advised commit reference

PATCH In review Stefan Beller 4 participants 6 messages Aug 26, 2016 – Aug 29, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation/SubmittingPatches: add quotes to advised commit reference

Junio finds it is easier to read text when the commit subject is quoted.

---
 Documentation/SubmittingPatches | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/SubmittingPatches +1 -1
index 500230c..a591229 100644
@@ -123,7 +123,7 @@ 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)
+like this: "Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30)
 noticed [...]".
 
 
Signature · 1 line
2.10.0.rc1.1.g1ceb01a
#1 lore raw
Quoted 12 lines · Stefan Beller

Junio finds it is easier to read text when the commit subject is quoted.

---
 Documentation/SubmittingPatches | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/SubmittingPatches +0 -0
index 500230c..a591229 100644

Documentation/SubmittingPatches archive, summarize the relevant points of the discussion. · line 127

Quoted 6 lines
Documentation/SubmittingPatches +1 -1
@@ -123,7 +123,7 @@ 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)
+like this: "Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30)
 noticed [...]".

Thanks, but it is not sufficient as you would not see the need for quoting without the example.

My preference is not a main deciding factor in this case anyway. A more important reason why it makes sense to quote (aside from the fact that it makes more sense when reading) is because we already have a tool support for that.

Perhaps something like this instead?

-- >8 --
From: Beat Bolli <[email protected]>
Subject: SubmittingPatches: use gitk's "Copy commit summary" format
Date: Fri, 26 Aug 2016 18:59:01 +0200

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.

---
 Documentation/SubmittingPatches | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
Documentation/SubmittingPatches +8 -3
index 500230c..15adb86 100644
@@ -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.
#2 lore raw
Quoted 4 lines · Junio C Hamano

Perhaps something like this instead?

-- >8 --

This is way better.
Let's take that.

Thanks,
Stefan

Quoted 37 lines

From: Beat Bolli <[email protected]>
Subject: SubmittingPatches: use gitk's "Copy commit summary" format
Date: Fri, 26 Aug 2016 18:59:01 +0200

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.

---
 Documentation/SubmittingPatches | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
Documentation/SubmittingPatches +8 -3
index 500230c..15adb86 100644
@@ -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.
#4 lore raw
Quoted 7 lines · Jakub Narębski

W dniu 27.08.2016 o 00:42, Junio C Hamano <[email protected]> pisze:

Quoted 4 lines

Stefan Beller <[email protected]> writes:

-- >8 --
From: Beat Bolli <[email protected]>

???

The primary value the change adds is to make readers aware of the gitk feature. That comes from the primary author. Not something I added, Stefan added or Heiko added.

#5 lore raw
In reply to Junio C Hamano

Junio C Hamano venit, vidit, dixit 27.08.2016 00:42:

Quoted 56 lines
Quoted 12 lines · Stefan Beller

Junio finds it is easier to read text when the commit subject is quoted.

---
 Documentation/SubmittingPatches | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/SubmittingPatches +0 -0
index 500230c..a591229 100644

Documentation/SubmittingPatches archive, summarize the relevant points of the discussion. · line 127

Quoted 6 lines
Documentation/SubmittingPatches +1 -1
@@ -123,7 +123,7 @@ 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)
+like this: "Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30)
 noticed [...]".

Thanks, but it is not sufficient as you would not see the need for quoting without the example.

My preference is not a main deciding factor in this case anyway. A more important reason why it makes sense to quote (aside from the fact that it makes more sense when reading) is because we already have a tool support for that.

Perhaps something like this instead?

-- >8 --
From: Beat Bolli <[email protected]>
Subject: SubmittingPatches: use gitk's "Copy commit summary" format
Date: Fri, 26 Aug 2016 18:59:01 +0200

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.

---
 Documentation/SubmittingPatches | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
Documentation/SubmittingPatches +0 -1
index 500230c..15adb86 100644
@@ -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

Documentation/SubmittingPatches without external resources. Instead of giving a URL to a mailing list · line 132

Quoted 10 lines
Documentation/SubmittingPatches +8 -2
-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.

or (an alias for) the command

git show -s --date=format:%F --pretty='tformat:%h ("%s", %ad)'

Quoted 3 lines
Documentation/SubmittingPatches +0 -0
 (3) Generate your patch using Git tools out of your commits.