mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Denis OSTERLAND <denis.osterland@diehl.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] setlocalversion: only use tags actually on current branch
Date: Wed, 12 Dec 2018 15:32:53 +0000	[thread overview]
Message-ID: <1544628773.6959.62.camel@diehl.com> (raw)
In-Reply-To: <20181212145328.zsuwntfjofnjv4vr@pengutronix.de>

Hi,

Am Mittwoch, den 12.12.2018, 15:53 +0100 schrieb Michael Olbrich:
> Hi,
> 
> On Wed, Dec 12, 2018 at 02:35:45PM +0000, Denis OSTERLAND wrote:
> > 
> > Am Mittwoch, den 12.12.2018, 14:51 +0100 schrieb Michael Olbrich:
> > > 
> > > 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.
> > > > With --first-parent it will be E-3-gXXXX.
> > > > This is more intuitive result,
> > > > especially when more than just one branch gets merged.
> > > Nack. This only works with explicit merges. If multiple people update the
> > > branch with git pull/push, then the first parent may not be the upstream
> > > commit and the correct tag may be missed.
> > I am not sure if I got the point here.
> > 
> > Is this your concern:
> >                            tag C
> >                              v
> >                      A---B---C origin/master
> >                     /         \
> >                D---E---F---G---H master
> > 
> > and now when pushing master to origin C becomes invisible.
> Exactly, and that is not acceptable in general.
Okay.
We do "git rebase origin/master" before push, but in general you are right this is possible.

> 
> > 
> > > 
> > > In your example above consider 'C' the HEAD of the local master branch
> > > before a pull/push. Then the first parent of 'H' is 'C'. And a if 'F' is
> > > the tag, then it is ignored.
> > The branches are equal, so of course yes.
> > 
> > If I got you right:
> > 
> >               tag C
> >                 v
> >         A---B---C---H topic
> >        /           /
> >   D---E---F-------G master
> >           ^
> >         tag F
> > 
> > At G it is F-1-gXXXX.
> > At H it is C-3-gXXXX and C-1-gXXXX with --first-parent.
> > 
> > Seems to be correct behavior to me.
> I'm not sure what your point is here.
I guess I got you wrong here. Your paragraph also applies to above example.

> 
> Michael
> 

I found a simple to do it in my BSP:

diff --git a/configs/ptxconfig b/configs/ptxconfig
index f59c6ea..15ce835 100644
--- a/configs/ptxconfig
+++ b/configs/ptxconfig
@@ -61,7 +61,7 @@ PTXCONF_WEBUI=y
 #
 PTXCONF_PROJECT_VENDOR="Diehl Connectivity Solutions GmbH"
 PTXCONF_PROJECT="Jelica"
-PTXCONF_PROJECT_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
+PTXCONF_PROJECT_VERSION="-${BSP_AUTOVERSION}"
 
 #
 # ------------------------------------
diff --git a/rules/autoversion.make b/rules/autoversion.make
new file mode 100644
index 0000000..971f762
--- /dev/null
+++ b/rules/autoversion.make
@@ -0,0 +1,13 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Denis Osterland <Denis.Osterland@diehl.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+BSP_AUTOVERSION=$(shell git describe --first-parent --dirty)
+
+# vim: syntax=make

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
ptxdist@pengutronix.de

  reply	other threads:[~2018-12-12 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12  9:14 Denis OSTERLAND
2018-12-12  9:47 ` Alexander Dahl
2018-12-12 13:51 ` Michael Olbrich
2018-12-12 14:35   ` Denis OSTERLAND
2018-12-12 14:53     ` Michael Olbrich
2018-12-12 15:32       ` Denis OSTERLAND [this message]
2018-12-13  7:29 ` Uwe Kleine-König
2018-12-13  7:56   ` Denis OSTERLAND
2018-12-13  9:37     ` Denis OSTERLAND

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=1544628773.6959.62.camel@diehl.com \
    --to=denis.osterland@diehl.com \
    --cc=ptxdist@pengutronix.de \
    /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