git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Киселёв Максим Алексеевич" <kiselevma@gmail.com>
To: git@vger.kernel.org
Subject: stash -u deletes ignored files
Date: Sat, 7 Apr 2012 23:13:57 +0400	[thread overview]
Message-ID: <CAGk-iSPYAV1HyK5e6n7E05reYBtLG2BiVsJuChxeCnm0DGjMrQ@mail.gmail.com> (raw)

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.

I use git version 1.7.9.msysgit.0

Sebastian Schuberth could reproduce this as well:

> 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.

Original discussion on msysgit mailing list:
https://groups.google.com/forum/?fromgroups#!topic/msysgit/FuAh7eXbPSw

-- 
Regards,
Max A. Kiselev

             reply	other threads:[~2012-04-07 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-07 19:13 Киселёв Максим Алексеевич [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-09-06  0:19 stash -u deletes ignored files Richard Browne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGk-iSPYAV1HyK5e6n7E05reYBtLG2BiVsJuChxeCnm0DGjMrQ@mail.gmail.com \
    --to=kiselevma@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).