git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: Steve Folly <steve@spfweb.co.uk>, <git@vger.kernel.org>
Subject: Re: git stash pop not reapplying deletions
Date: Mon, 15 Feb 2010 18:17:44 -0800	[thread overview]
Message-ID: <7v7hqdrkjb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <201002142308.01704.trast@student.ethz.ch> (Thomas Rast's message of "Sun\, 14 Feb 2010 23\:08\:01 +0100")

Thomas Rast <trast@student.ethz.ch> writes:

> The problem is that you aren't using --index, but still expecting it
> to restore your index.  If you change it to 'git stash pop --index',
> everything will work as expected.
>
> Yes, it does stage new files, but that is only to help you: otherwise
> you could forget them before committing.

I think the reason _new_ files are added is simply because ack then there
was no other way to make it tracked.

A sane thing to do these days might be to add a newly created file with
the "intent to add" option, to mimic the way other files in the work tree
with changes are unstashed.  They get the full change in the work tree,
without restoring what their corresponding index entry used to have when
the stash was made, if you unstash without the --index option.

      parent reply	other threads:[~2010-02-16  2:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-14 19:45 git stash pop not reapplying deletions Steve Folly
2010-02-14 22:08 ` Thomas Rast
2010-02-15 14:32   ` Steve Folly
2010-02-15 15:41     ` Thomas Rast
2010-02-15 16:01       ` [PATCH] stash pop: remove 'apply' options during 'drop' invocation Thomas Rast
2010-02-15 18:46         ` [PATCH v2] " Stephen Boyd
2010-02-15 21:09       ` git stash pop not reapplying deletions Steve Folly
2010-02-16  2:17   ` Junio C Hamano [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=7v7hqdrkjb.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=steve@spfweb.co.uk \
    --cc=trast@student.ethz.ch \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).