Răsfoiți Sursa

scripts: fix revision calculation using new "main" branch

Fix revision calculation when local branch is rebased on new "main" branch
instead of "master".

Signed-off-by: Marius Dinu <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/15538
Signed-off-by: Christian Marangi <[email protected]>
Marius Dinu 1 an în urmă
părinte
comite
9db53fb6aa
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      scripts/getver.sh

+ 1 - 1
scripts/getver.sh

@@ -26,7 +26,7 @@ try_git() {
 	*)
 		BRANCH="$(git rev-parse --abbrev-ref HEAD)"
 		ORIGIN="$(git rev-parse --verify --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)"
-		[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@{u} 2>/dev/null)"
+		[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name main@{u} 2>/dev/null)"
 		REV="$(git rev-list ${REBOOT}..$GET_REV 2>/dev/null | wc -l | awk '{print $1}')"
 
 		if [ -n "$ORIGIN" ]; then