From b6f5220bed76c9ea9f83f4c6c81ced9977b26d77 Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Fri, 29 May 2020 23:10:18 +0200 Subject: commitpkg: ensure we always stage and rm files Signed-off-by: Morten Linderud --- src/commitpkg.in | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/commitpkg.in b/src/commitpkg.in index 9186378..59471bf 100644 --- a/src/commitpkg.in +++ b/src/commitpkg.in @@ -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' -- cgit v1.2.3-70-g09d2