Re: How to generate Fixes: ("") things
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: ("") > > > 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 > > > > > >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\") > > > > > > 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
Re: How to generate Fixes: ("") things
> On May 9, 2019, at 7:41 PM, 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: ("") >>> 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 >> >> >> 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\") >> >> >> 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
Re: How to generate Fixes: ("") things
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: ("") > > 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 > > >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\") > > > 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
Re: How to generate Fixes: ("") things
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: ("") > 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 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\") 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
How to generate Fixes: ("") things
Hi, Stupid question, maybe. But I just could find the answer vi Bing or Google. How to generate Fixes: ("") 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