All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Nicholas Mc Guire <der.herr@hofr.at>
Cc: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>,
	kernelnewbies@kernelnewbies.org
Subject: Re: How to generate Fixes: <commit> ("<text>") things
Date: Thu, 9 May 2019 13:41:44 +0200	[thread overview]
Message-ID: <20190509114144.GA6590@kroah.com> (raw)
In-Reply-To: <20190509103801.GA26954@osadl.at>

On Thu, May 09, 2019 at 12:38:01PM +0200, Nicholas Mc Guire wrote:
> On Thu, May 09, 2019 at 06:28:39PM +0800, wuzhouhui wrote:
> > Hi,
> > 
> > Stupid question, maybe. But I just could find the answer vi Bing or Google.
> > 
> > How to generate
> >     Fixes: <commit> ("<text>")
> > E.g.
> >     Fixes: 298a32b13208 ("kmemleak: powerpc: skip scanning holes in the .bss section")
> > 
> > Or they just write it manually?
> >
> starting with documentation in th kernel might be better than
> google or bing
> 
> <snip Documentation/process/submitting-patches.rst>
>    The following git config settings can be used to add a pretty format
>    for outputting the above style in the git log or git show commands:
> [core]
>         abbrev = 12
> [pretty]
>         fixes = Fixes: %h (\"%s\")
> <snip>
> 
> or on the commandline you can simply use
> 
> git log -1 --pretty=format:"Fixes: %h (\"%s\")" SHA 

Here's what I, and many other, kernel developers use:
	git show -s --abbrev-commit --abbrev=12 --pretty=format:"Fixes: %h (\"%s\")%n"

Probably does the same thing, but doesn't require you to set 'abbrev=12'
in your git config if you don't want to.

Nice to see that's this is now documented.

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2019-05-09 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 10:28 How to generate Fixes: <commit> ("<text>") things wuzhouhui
2019-05-09 10:38 ` Nicholas Mc Guire
2019-05-09 11:41   ` Greg KH [this message]
2019-05-09 13:19     ` wuzhouhui
2019-05-09 13:55     ` Nicholas Mc Guire

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=20190509114144.GA6590@kroah.com \
    --to=greg@kroah.com \
    --cc=der.herr@hofr.at \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=wuzhouhui14@mails.ucas.ac.cn \
    /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.