Hi Am Donnerstag, den 13.12.2018, 08:29 +0100 schrieb Uwe Kleine-König: > On Wed, Dec 12, 2018 at 09:14:52AM +0000, Denis OSTERLAND wrote: > > > > Consider following situation: > > > > tag C > > v > > A---B---C topic > > / \ > > D---E---F---G---H master > > ^ > > tag E > > > > PTXDIST_BSP_AUTOVERSION at commit G will be E-2-gXXXX, > > but at commit H it will be C-3-gXXXX. > At H I'd expect C-1-gXXXX. > > I think in general using --first-parent is wrong. It's only in some > workflows (i.e. when there is a single person that does "mainline > merges") where the first parent is special. This is result of discussion with Michael Olbrich.
> > > > > With --first-parent it will be E-3-gXXXX. > > This is more intuitive result, > > especially when more than just one branch gets merged. > > > > Signed-off-by: Denis Osterland <[email protected]> > > --- > > scripts/kernel/setlocalversion | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/scripts/kernel/setlocalversion b/scripts/kernel/setlocalversion > > index 3feb87dce..7eaaaf413 100755 > > --- a/scripts/kernel/setlocalversion > > +++ b/scripts/kernel/setlocalversion > > @@ -55,12 +55,12 @@ if head=`git ${git_abbrev} rev-parse --verify --short > > HEAD 2>/dev/null`; then > > > > # If we are at a tagged commit (like "ptxdist-2010.05.0"), we > > # print it here > > - if atag="`git describe --exact-match 2>/dev/null`"; then > > + if atag="`git describe --first-parent --exact-match 2>/dev/null`"; then > With --exact-match --first-parent is a noop, isn't it? You are right. > > > > > echo "$atag" | awk -F- '{printf("%s", $(NF))}' > unrelated to this patch: if atag is "ELWMS-1.0-rc17" the result here is > "rc17", isn't it? You are right. This behavior is untouched. Tag "ELWMS-1.0_rc17" would give "1.0_rc17". This is obviously missing in my posted custom rule and I have to add it to add it. Thanks for the hint. > > Best regards > Uwe > Regards Denis Diehl Connectivity Solutions GmbH Geschäftsführung: Horst Leonberger Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht Nürnberg: HRB 32315 ___________________________________________________________________________________________________ Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt. The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. _______________________________________________ ptxdist mailing list [email protected]
