Message ID | 7d57ec61-8c76-99a9-d94b-52228ce7533f@suse.cz |
---|---|
State | New |
Headers | show |
Series | Improve svn-rev to search for pattern at line beginning. | expand |
On Fri, Apr 03, 2020 at 11:13:17AM +0200, Martin Liška wrote: > 2020-04-03 Martin Liska <mliska@suse.cz> > > * gcc-git-customization.sh: Search for the pattern > at line beginning only. Ok, thanks. > diff --git a/contrib/gcc-git-customization.sh b/contrib/gcc-git-customization.sh > index f3e48316ead..a932bf8c06a 100755 > --- a/contrib/gcc-git-customization.sh > +++ b/contrib/gcc-git-customization.sh > @@ -18,7 +18,7 @@ ask () { > } > > # Add a git command to find the git commit equivalent to legacy SVN revision NNN > -git config alias.svn-rev '!f() { rev=$1; shift; git log --all --grep="From-SVN: r\\?$rev\\b" "${@}"; } ; f' > +git config alias.svn-rev '!f() { rev=$1; shift; git log --all --grep="^From-SVN: r\\?$rev\\b" "${@}"; } ; f' > > # Add git commands to convert git commit to monotonically increasing revision number > # and vice versa > Jakub
Thanks, this matches the commit hook (which only rejects From-SVN: at start of line, not elsewhere in a commit message).
diff --git a/contrib/gcc-git-customization.sh b/contrib/gcc-git-customization.sh index f3e48316ead..a932bf8c06a 100755 --- a/contrib/gcc-git-customization.sh +++ b/contrib/gcc-git-customization.sh @@ -18,7 +18,7 @@ ask () { } # Add a git command to find the git commit equivalent to legacy SVN revision NNN -git config alias.svn-rev '!f() { rev=$1; shift; git log --all --grep="From-SVN: r\\?$rev\\b" "${@}"; } ; f' +git config alias.svn-rev '!f() { rev=$1; shift; git log --all --grep="^From-SVN: r\\?$rev\\b" "${@}"; } ; f' # Add git commands to convert git commit to monotonically increasing revision number # and vice versa