From: Jeremy Cline <[email protected]>

ARK's master branch tracks Linus's master branch, so drop the check for
a remote named "linus" (which might be wrong anyway) and use the local
master branch to calculate the snapshot.

While this does assume that the local master branch is up-to-date,
that's better than trying to guess the correct remote name and can be
easily scripted.

Cc: Frantisek Hrbata <[email protected]>
Cc: Rado Vrbovsky <[email protected]>
Cc: Jeremy Cline <[email protected]>
Cc: Luis Claudio Goncalves <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: "Herton R. Krzesinski" <[email protected]>
Cc: Juri Lelli <[email protected]>
Cc: Jan Stancek <[email protected]>
Cc: Clark Williams <[email protected]>
Signed-off-by: Jeremy Cline <[email protected]>
---
 redhat/Makefile.common | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/redhat/Makefile.common b/redhat/Makefile.common
index a3b16c8a50f2..d980847aacc7 100644
--- a/redhat/Makefile.common
+++ b/redhat/Makefile.common
@@ -41,17 +41,11 @@ else
   VERSION_ON_UPSTREAM:=0
 endif
 ifeq ($(VERSION_ON_UPSTREAM),1)
-  # In order to do a snapshot properly, we need to have a remote set up
-  # to track upstream.
-  _HAVE_UPSTREAM_REMOTE:=$(shell git remote | grep -wc linus)
-  ifeq ($(_HAVE_UPSTREAM_REMOTE),1)
-    MERGE_BASE:=$(shell git merge-base HEAD linus/master)
-    TAG:=$(shell git describe $(MERGE_BASE))
-    # a snapshot off of a tagged git is of the form [tag]-[cnt]-g[hash]
-    SNAPSHOT:=$(shell echo $(TAG) | grep -c '\-g')
-  else
-    SNAPSHOT:=0
-  endif
+  # master is expected to track mainline.
+  MERGE_BASE:=$(shell git merge-base HEAD master)
+  TAG:=$(shell git describe $(MERGE_BASE))
+  # a snapshot off of a tagged git is of the form [tag]-[cnt]-g[hash]
+  SNAPSHOT:=$(shell echo $(TAG) | grep -c '\-g')
 else
   SNAPSHOT:=0
 endif
-- 
2.26.2
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to