* Alejandro Colomar <alx.manpages@xxxxxxxxx>, 2021-02-22, 15:03:
+ git status \ + |sed '/Changes not staged for commit:/q' \ + |grep -E '^\s*(modified|deleted|new file):' \
"git status" (without further options) is not suitable for scripting: "The default, long format, is designed to be human readable, verbose and descriptive. Its contents and format are subject to change at any time."
You could use "git status --porcelain" instead, which has stable and (supposedly) easy to parse format. Or, better, you could use "git diff --staged --name-only".
-- Jakub Wilk