Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.
What did you do before the bug happened? (Steps to reproduce your issue)
Running the following script:
#!/bin/bash
git init workDir
cd workDir
git commit -m first --allow-empty
echo b > b
git add b
GIT_TRACE=TRUE git stash push --staged --keep-index
git stash pop
cat b
What did you expect to happen? (Expected behavior)
I expect file `b` to be present after running the script.
If I run the script with only `git stash push --staged` or
`git stash push --keep-index`, the file is present afterward.
What happened instead? (Actual behavior)
The file is not present after running the script.
`cat b` will report that the file does not exist.