commitpkg: ensure we always stage and rm files

Signed-off-by: Morten Linderud <foxboron@archlinux.org>
This commit is contained in:
Morten Linderud 2020-05-29 23:10:18 +02:00 committed by Levente Polyak
parent f4213f9c36
commit b6f5220bed
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 9 additions and 0 deletions

View File

@ -160,6 +160,15 @@ if [[ -z $server ]]; then
fi
if [[ -n $(git status --short --untracked-files=no) ]]; then
stat_busy 'Staging files'
for f in $(git ls-files --modified); do
git add "$f"
done
for f in $(git ls-files --deleted); do
git rm "$f"
done
stat_done
msgtemplate="upgpkg: $pkgbase $(get_full_version)"
if [[ -n $1 ]]; then
stat_busy 'Committing changes'