On Sat, 06 Apr 2013 13:00:35 -0700
""Paweł Hajdan, Jr."" <phajdan...@gentoo.org> wrote:

> On 4/6/13 12:41 PM, Michał Górny wrote:
> > I would honestly just go for the git style. It's the first thing that
> > really succeeded in standardizing patches. Inventing something new is
> > not really necessary, I believe.
> 
> Oh, I didn't mean inventing anything new.
> 
> Is there some URL or documentation I could read to familiarize myself
> with all of the "git style"?

Hmm, it seems that there is nothing really common, just various things
that were used and started to be expected by random tools. Except for
bits of notes in git manpages, there's some info in the 'submitting
patches' doc [1].

The general idea is similar to the e-mail concept. Shortly saying, it's:

  One line of topic

  Paragraph of text, usually wrapped at 72 chars.......................
  Second line of the same paragraph, etcetera.

  Second paragraph. Then we'll have a list:

  - item 1

  - item 2

  Some-tags: ...
  Other-tag: ...

(indent added to mail to make it clear, no indent in patch file :))

Although git itself rather preserves newlines, some tool concatenate
successive lines, so you separate paragraphs (and items) with empty
lines.

First paragraph (some tools may read one line only!) goes as a short
summary, that is shown in 'git log --oneline'. The following paragraphs
(optional) should explain better what's happening.

Optionally, after the last paragraph you can add a few lines with tags
in form of 'Tag: value'. AFAICS git itself uses only
'Signed-off-by' but you can find more tags in various 'submitting
patches' docs.

'Signed-off-by' lists the one responsible for the patch. Some upstreams
require that line, some take over authorship of patches if you don't
add it (like X.org), some just hate it :).

The X.org wiki lists also 'Fixes' for bugtracker URL [2] and a few tags
for reviewing patches [3] (those are probably not useful for us).

Some upstreams also use different bugtracker tag formats [4,5] but I
feel like they're not proper for our patches since they don't mention
the bugtracker URI. That said, I'd probably ping them about it.

[1]:http://git.kernel.org/cgit/git/git.git/tree/Documentation/SubmittingPatches
[2]:http://www.x.org/wiki/Development/Documentation/SubmittingPatches#Commit_message_format
[3]:http://www.x.org/wiki/Development/Documentation/SubmittingPatches#Signing_off_and_reviewing
[4]:http://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines
[5]:https://wiki.openstack.org/wiki/GitCommitMessages#Including_external_references

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to