`git stash apply --index` fails with `error: No valid patches in input` on one machine

168 views Asked by At

When I try to pop/apply a simple stash with --index that includes files from the index/staging area, I get the following output:

$ git stash apply --index   
error: No valid patches in input (allow with "--allow-empty")
error: conflicts in index. Try without --index.

This only happens on my machine (git version 2.43.0, arch linux+zsh). I cannot reproduce it on another machine.

I tried disabling autocrlf, but it does not solve the problem.

This does not happen if I omit --index.

1

There are 1 answers

2
Udi On

Solved!

I had a setting that messed it up:

git config pager.stash="less -FRX"

I will report this as a bug :-)