From d37ce407e2d7847b83ea8278bb765e1912359077 Mon Sep 17 00:00:00 2001
From: Michael Vines <mvines@codeaurora.org>
Date: Fri, 16 Jan 2015 21:00:46 -0800
Subject: [PATCH] treeid.sh: strip characters up to the last forward slash when
 extracting manifest revision redux

Change-Id: I5e59c4e7cd3991436041c34b4aeb1c85410bc59a
---
 treeid.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/treeid.sh b/treeid.sh
index e4a6794..d7ddc25 100755
--- a/treeid.sh
+++ b/treeid.sh
@@ -3,7 +3,7 @@
 # Attempt to identify the Android tree in use.  On success one or more
 # tree identifiers are output to stdout.
 #
-# Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+# Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are
@@ -39,7 +39,7 @@ fi
 TREEID=
 if [[ -f .repo/manifest.xml ]] ; then
    # Tokenize <default revision="x_y_z"/> by '_'
-   TOKENS=$(repo info -l .repo/manifest 2>/dev/null | sed -e '/merge/!d ; s/^.*branch:// ; s/.*b2g_//g;')
+   TOKENS=$(repo info -l .repo/manifest 2>/dev/null | sed -e '/merge/!d ; s/^.*branch:// ; s/.*\///; s/.*b2g_//g;')
 
    MANIFEST_ID=
    for T in $TOKENS; do
-- 
GitLab