From: Karel Zak Date: Thu, 6 Mar 2025 09:23:36 +0000 (+0100) Subject: tools/git-tp-sync: fix checkout -f use X-Git-Tag: v2.41-rc2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e21b9fa759b07b251b1e790ee5356dcdf46da55a;p=thirdparty%2Futil-linux.git tools/git-tp-sync: fix checkout -f use Signed-off-by: Karel Zak --- diff --git a/tools/git-tp-sync b/tools/git-tp-sync index 00c847b91..6ae10a153 100755 --- a/tools/git-tp-sync +++ b/tools/git-tp-sync @@ -183,7 +183,9 @@ function regenerate_po_files { # ignore files where is only modified one line ("POT-Creation-Date") PO_IGNORE=$(git diff --numstat $PODIR/*.po | gawk -v ORS=" " '/1[[:blank:]]1[[:blank:]]/ { print $3 }') - git checkout -f $PO_IGNORE &> /dev/null + if [ -n "$PO_IGNORE" ]; then + git checkout -f $PO_IGNORE &> /dev/null + fi if [ $(git ls-files -m "$PODIR" | wc -l) -gt 0 ]; then if [ "$DRYRUN" = "true" ]; then