aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtool/git-refresh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tool/git-refresh b/tool/git-refresh
index d36c4d80bc..9ed7d7c76e 100755
--- a/tool/git-refresh
+++ b/tool/git-refresh
@@ -31,6 +31,9 @@ dir="$2"
shift 2
[ x"$branch" = x ] && unset branch || :
if [ -d "$dir" ]; then
+ if [ x"$(git -C "$dir" describe --tags)" = x"$branch" ]; then
+ exit 0 # already up-to-date
+ fi
echo updating `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ...
[ $quiet ] || set -x
$CHDIR "$dir"