From bfb4601a151e6411d6f905cc4ace434756323807 Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Fri, 16 Oct 2020 09:28:46 +0800 Subject: [PATCH] Fix issue in lsync script According to 'git diff --help', the `--exist-code` flag can be used to ensure that the command returns 0 when no difference is found. --- scripts/lsync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lsync.sh b/scripts/lsync.sh index 740b390be1..a1378bf154 100755 --- a/scripts/lsync.sh +++ b/scripts/lsync.sh @@ -23,7 +23,7 @@ fi # Last commit for the localized file LASTCOMMIT=`git log -n 1 --pretty=format:%h -- $LOCALIZED` -git diff $LASTCOMMIT...HEAD $EN_VERSION +git diff --exit-code $LASTCOMMIT...HEAD $EN_VERSION if [ "$?" -eq 0 ]; then echo "$LOCALIZED is still in sync"