Skip to content

Commit e0c78fa

Browse files
authored
commit: Do not print error message on zero untracked files
1 parent 3198721 commit e0c78fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/commit.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ git status -s | grep '^ D ' | cut -d' ' -f3 | xargs -r git rm
2323
git diff -I'^"POT-Creation-Date: ' --numstat *.po **/*.po | cut -f3 | xargs -r git add -v
2424

2525
# Add currently untracked PO files, and update other helper files
26-
git add -v $(git ls-files -o --exclude-standard *.po **/*.po)
26+
untracked_files=$(git ls-files -o --exclude-standard *.po **/*.po)
27+
if [ -n "${untracked_files+x}" ]; then
28+
git add -v $untracked_files
29+
fi
2730

2831
# Commit only if there is any cached file
2932
git diff-index --cached --quiet HEAD || { git add -v $extra_files; git commit -vm "Update translations"; }

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy