From: Heiko Voigt <hvoigt@hvoigt.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Stefan Beller" <sbeller@google.com>,
"Git List" <git@vger.kernel.org>,
"Lars Schneider" <larsxschneider@gmail.com>,
"René Scharfe" <l.s.r@web.de>
Subject: [PATCH] document how to reference previous commits
Date: Thu, 28 Jul 2016 14:55:14 +0200 [thread overview]
Message-ID: <20160728125514.GA2813@sandbox> (raw)
In-Reply-To: <20160728111636.GA7760@sandbox>
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 lookup when needed.
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
---
On Thu, Jul 28, 2016 at 01:16:36PM +0200, Heiko Voigt wrote:
> On Tue, Jul 26, 2016 at 10:22:07AM -0700, Stefan Beller wrote:
> > Usually we refer to the commit by a triple of "abbrev. sha1 (date, subject).
> > See d201a1ecd (2015-05-21, test_bitmap_walk: free bitmap with bitmap_free)
> > for an example. Or ce41720ca (2015-04-02, blame, log: format usage strings
> > similarly to those in documentation).
> >
> > Apparently we put the subject first and then the date. I always did it
> > the other way
> > round, to there is no strict coding guide line, though it helps a lot to have an
> > understanding for a) how long are we in the "broken" state already as well as
> > b) what was the rationale for introducing it.
>
> Ah ok did not know about this format. Will change that. I also will
> follow-up with a patch to document this in SubmittingPatches so we can
> point others to that...
Here we go. Made this a seperate patch, since it is not really connected
to the submodule-config-fix series.
Cheers Heiko
Documentation/SubmittingPatches | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index e8ad978..500230c 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.
--
2.0.2.832.g083c931
next prev parent reply other threads:[~2016-07-28 12:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 19:05 [PATCH] submodule-config: use explicit empty string instead of strbuf in config_from() René Scharfe
2016-07-19 19:15 ` Junio C Hamano
2016-07-19 19:24 ` Stefan Beller
2016-07-20 8:25 ` Heiko Voigt
2016-07-21 18:57 ` René Scharfe
2016-07-25 14:37 ` Heiko Voigt
2016-07-25 14:58 ` Junio C Hamano
2016-07-26 9:49 ` [PATCH 1/2] fix passing a name for config from submodules Heiko Voigt
2016-07-26 17:22 ` Stefan Beller
2016-07-26 22:02 ` Junio C Hamano
2016-07-28 12:49 ` [PATCH 1/3] submodule-config: passing name reference for .gitmodule blobs Heiko Voigt
2016-07-28 16:26 ` Stefan Beller
2016-07-28 12:49 ` [PATCH 2/3] submodule-config: combine early return code into one goto Heiko Voigt
2016-07-28 12:50 ` [PATCH 3/3] submodule-config: fix test binary crashing when no arguments given Heiko Voigt
2016-07-28 11:17 ` [PATCH 1/2] fix passing a name for config from submodules Heiko Voigt
2016-07-28 12:55 ` Heiko Voigt [this message]
2016-07-28 15:38 ` [PATCH] document how to reference previous commits Junio C Hamano
2016-07-28 15:57 ` Stefan Beller
2016-08-17 11:36 ` Heiko Voigt
2016-08-17 17:45 ` Junio C Hamano
2016-07-28 14:59 ` [PATCH 1/2] fix passing a name for config from submodules Junio C Hamano
2016-07-26 9:49 ` [PATCH 2/2] submodule-config: combine error checking if clauses Heiko Voigt
2016-07-26 17:24 ` Stefan Beller
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=20160728125514.GA2813@sandbox \
--to=hvoigt@hvoigt.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
--cc=larsxschneider@gmail.com \
--cc=sbeller@google.com \
/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 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 NNTP newsgroup(s).