msysgit: stash -u deletes ignored files

711 views
Skip to first unread message

kise...@gmail.com

unread,
Apr 6, 2012, 8:39:48 AM4/6/12
to msy...@googlegroups.com
There seems to a bug in git stash. Subfolders with ignored files are deleted if the subfolders themselves are not ignored.

How to reproduce.
---
mkdir TestRepo
cd TestRepo
mkdir Ignored
echo " " > Ignored/Ignored.txt
echo "Ignored/Ignored.txt" > .gitignore
echo > File1.txt
git init
git add .
git commit --message="Initial commit"
echo "Test change" > File1.txt
git stash -u
git stash pop

Expected result:
Ignored/Ignored1.txt is present in the repository. It is either not deleted after stash or at least restored after pop.

Actual result:
Ignored is deleted along with any files in it.

git version 1.7.9.msysgit.0

Sebastian Schuberth

unread,
Apr 7, 2012, 2:40:24 PM4/7/12
to kise...@gmail.com, msy...@googlegroups.com
On 06.04.2012 14:39, kise...@gmail.com wrote:

> There seems to a bug in git stash. Subfolders with ignored files are
> deleted if the subfolders themselves are not ignored.

I'm able to reproduce this with git version 1.7.10.msysgit.1 as well as
on Linux, so please report this upstream to the git mailing list. Thank you.

--
Sebastian Schuberth

Reply all
Reply to author
Forward
0 new messages