diff options
| author | Marius Dinu <m95d+git@psihoexpert.ro> | 2024-05-21 18:08:33 +0300 |
|---|---|---|
| committer | Christian Marangi <ansuelsmth@gmail.com> | 2024-05-21 17:53:33 +0200 |
| commit | 9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8 (patch) | |
| tree | aa75c4176f1efbbb51744d88890d545ae76d6e12 /scripts | |
| parent | cd9241db230e43387962cf13b4e8bbdc61f1581c (diff) | |
| download | upstream-9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8.tar.gz upstream-9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8.tar.bz2 upstream-9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8.zip | |
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 <m95d+git@psihoexpert.ro>
Link: https://github.com/openwrt/openwrt/pull/15538
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/getver.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/getver.sh b/scripts/getver.sh index 61906040b18..0659d8004a0 100755 --- a/scripts/getver.sh +++ b/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 |
