mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] setlocalversion: only use tags actually on current branch
Date: Thu, 13 Dec 2018 08:29:44 +0100	[thread overview]
Message-ID: <20181213072944.jdtgclsmqn6bqipj@pengutronix.de> (raw)
In-Reply-To: <20181212091421.21904-1-Denis.Osterland@diehl.com>

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.

> 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 <Denis.Osterland@diehl.com>
> ---
>  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?

>  		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?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2018-12-13  7:29 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
2018-12-13  7:29 ` Uwe Kleine-König [this message]
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=20181213072944.jdtgclsmqn6bqipj@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --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