fixed: use the --porcelain option when parsing git status

the formatting for the standard git status output is unstable,
and has changed in newer versions of the git client. this lead
to missing lines in untracked files.
This commit is contained in:
Arne Morten Kvarving
2022-02-02 14:54:51 +01:00
parent eb6265b148
commit dd0b335dc1

View File

@@ -262,7 +262,7 @@ then
fi
# Add potential new files
untracked=`git status | sed '1,/Untracked files/d' | tail -n +3 | head -n -2`
untracked=`git status --porcelain | awk '$1~/\?/{print $2}'`
if [ -n "$untracked" ]
then
git add $untracked