[source] scripts/getver.sh: treat all commits as local if can't find upstream

LEDE Commits lede-commits at lists.infradead.org
Mon Nov 21 05:36:16 PST 2016


rmilecki pushed a commit to source.git, branch master:
https://git.lede-project.org/bf3d92f0cdcea5cd9ec30f54d6e4d350cda1bb41

commit bf3d92f0cdcea5cd9ec30f54d6e4d350cda1bb41
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Thu Nov 17 07:25:21 2016 +0100

    scripts/getver.sh: treat all commits as local if can't find upstream
    
    If something goes wrong and script can't find upstream revision it will
    return something like:
    r2220
    which looks like a valid upstream revision 2220. We cant' distinguish it
    from e.g. 2200 upstream commits and 20 local ones.
    
    The new format still provides revision number but also points clearly
    that is may be not the upstream one:
    r0+2220
    
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
    Acked-by: John Crispin < john at phrozen.org>
---
 scripts/getver.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/getver.sh b/scripts/getver.sh
index e718485..d5f2986 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -33,7 +33,7 @@ try_git() {
 			UPSTREAM_BASE="$(git merge-base $GET_REV $ORIGIN)"
 			UPSTREAM_REV="$(git rev-list ${REBOOT}..$UPSTREAM_BASE | wc -l | awk '{print $1}')"
 		else
-			UPSTREAM_REV=$REV
+			UPSTREAM_REV=0
 		fi
 
 		if [ "$REV" -gt "$UPSTREAM_REV" ]; then



More information about the lede-commits mailing list