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

On Thu, May 09, 2019 at 01:41:44PM +0200, Greg KH wrote:
> 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.

yup - the above command assumes that it is set in the contfig but
you can pass it in for git log as well - same options basically

git log -1 --abbrev-commit --abbrev=12 --pretty=format:"Fixes: %h (\"%s\")"

thx!
hofrat

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

      parent reply	other threads:[~2019-05-09 13:56 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
2019-05-09 13:19     ` wuzhouhui
2019-05-09 13:55     ` Nicholas Mc Guire [this message]

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=20190509135511.GA27791@osadl.at \
    --to=der.herr@hofr.at \
    --cc=greg@kroah.com \
    --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 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).