From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Junio C Hamano'" <gitster@pobox.com>,
"'Jake Stine'" <jake.stine@gmail.com>
Cc: <git@vger.kernel.org>
Subject: RE: [bug] git stash push {dir-pathspec} wipes untracked files
Date: Thu, 15 Mar 2018 13:02:58 -0400 [thread overview]
Message-ID: <002f01d3bc7f$7b6261f0$722725d0$@nexbridge.com> (raw)
In-Reply-To: <xmqq1sgl703v.fsf@gitster-ct.c.googlers.com>
> -----Original Message-----
> From: git-owner@vger.kernel.org <git-owner@vger.kernel.org> On Behalf
> Of Junio C Hamano
> Sent: March 15, 2018 12:52 PM
> To: Jake Stine <jake.stine@gmail.com>
> Cc: git@vger.kernel.org
> Subject: Re: [bug] git stash push {dir-pathspec} wipes untracked files
>
> Jake Stine <jake.stine@gmail.com> writes:
>
> > Hi, I ran into what I believe is a bug today. I’m using primarily Git
> > for Windows 2.16.2 and also reproduced the behavior on Git for Windows
> > 2.15.1 and Git 2.14.1 on Ubuntu:
> >
> > Given any repository with at least one subdirectory:
> >
> > 1. Create some untracked files in the subdir
> > 2. Modify a tracked file in the subdir
> > 3. Execute `git stash push subdir`
> > 4. The untracked files will be removed, without warning.
> >
> > `git stash push` behaves as-expcted and does not touch untracked
> > files. It’s only when a directory tree is specified as [pathspec]
> > that the problem occurs.
>
> I wonder if this is the same as the topic on this thread.
>
> https://public-
> inbox.org/git/CA+HNv10i7AvWXjrQjxxy1LNJTmhr7LE4TwxhHUYBiWtmJCOf_
> A@mail.gmail.com/
>
> What is curious is that the fix bba067d2 ("stash: don't delete untracked files
> that match pathspec", 2018-01-06) appeared first in 2.16.2, on which
> Windows 2.16.2 is supposed to be built upon.
>
> > Here's the precise reproduction case executed on a linux box:
>
> This does not reproduce for me with v2.16.2-17-g38e79b1fda (the tip of
> 'maint'); I do not have an install of vanilla v2.16.2 handy, but I suspect v2.16.2
> would work just fine, too.
This does not reproduce for me either in v2.16.2.9-g3dbadef9f (which is the NonStop port of 2.16.2)
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: subdir/a
Untracked files:
(use "git add <file>..." to include in what will be committed)
subdir/b
no changes added to commit (use "git add" and/or "git commit -a")
/home/randall/foot: git stash push subdir
Saved working directory and index state WIP on master: b772270 i
/home/randall/foot: ls subdir
a b
/home/randall/foot: git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
subdir/b
nothing added to commit but untracked files present (use "git add" to track)
next prev parent reply other threads:[~2018-03-15 17:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 16:40 [bug] git stash push {dir-pathspec} wipes untracked files Jake Stine
2018-03-15 16:52 ` Junio C Hamano
2018-03-15 17:02 ` Randall S. Becker [this message]
2018-03-15 20:39 ` Igor Djordjevic
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='002f01d3bc7f$7b6261f0$722725d0$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jake.stine@gmail.com \
/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).