Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
* How to generate Fixes: <commit> ("<text>") things
@ 2019-05-09 10:28 wuzhouhui
  2019-05-09 10:38 ` Nicholas Mc Guire
  0 siblings, 1 reply; 5+ messages in thread
From: wuzhouhui @ 2019-05-09 10:28 UTC (permalink / raw)
  To: kernelnewbies

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?

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to generate Fixes: <commit> ("<text>") things
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Mc Guire @ 2019-05-09 10:38 UTC (permalink / raw)
  To: wuzhouhui; +Cc: kernelnewbies

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 

thx!
hofrat

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to generate Fixes: <commit> ("<text>") things
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Greg KH @ 2019-05-09 11:41 UTC (permalink / raw)
  To: Nicholas Mc Guire; +Cc: wuzhouhui, kernelnewbies

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to generate Fixes: <commit> ("<text>") things
  2019-05-09 11:41   ` Greg KH
@ 2019-05-09 13:19     ` wuzhouhui
  2019-05-09 13:55     ` Nicholas Mc Guire
  1 sibling, 0 replies; 5+ messages in thread
From: wuzhouhui @ 2019-05-09 13:19 UTC (permalink / raw)
  To: Greg KH; +Cc: Nicholas Mc Guire, kernelnewbies


> On May 9, 2019, at 7:41 PM, Greg KH <greg@kroah.com> 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.
> 
> Nice to see that's this is now documented.

Thanks for all replies!

I have sticked at kernel of distros for a long time, and didn't noticed hat the
documentation has been changed a lot in upstream.

> 
> greg k-h


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to generate Fixes: <commit> ("<text>") things
  2019-05-09 11:41   ` Greg KH
  2019-05-09 13:19     ` wuzhouhui
@ 2019-05-09 13:55     ` Nicholas Mc Guire
  1 sibling, 0 replies; 5+ messages in thread
From: Nicholas Mc Guire @ 2019-05-09 13:55 UTC (permalink / raw)
  To: Greg KH; +Cc: wuzhouhui, kernelnewbies

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox