Here is a preliminary fix for an earlier copy-pasto, plus two patches from your v3. I tried to reduce the nesting level by swapping the order of if/elif chain; please double check the logic to ensure I didn't make stupid mistakes while doing so. Junio C Hamano (1): stash: fix nonsense pipeline Thomas Gummerer (2): stash push: avoid printing errors stash push -u: don't create empty stash git-stash.sh | 13 +++++++------ t/t3903-stash.sh | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) -- 2.17.0-rc0