From: Junio C Hamano <gitster@pobox.com>
To: Charles Bailey <charles@hashpling.org>
Cc: git@vger.kernel.org, Thomas Rast <trast@student.ethz.ch>,
Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 2/3] stash: Don't overwrite files that have gone from the index
Date: Sun, 18 Apr 2010 16:11:21 -0700 [thread overview]
Message-ID: <7vpr1wtkyu.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 20100418182805.GB29329@hashpling.org
Charles Bailey <charles@hashpling.org> writes:
> To be complete, any work tree file which differs from HEAD needs to be
> saved, regardless of whether it still appears in the index or not.
Sounds quite sane.
> - git add -u &&
> + git diff --name-only -z HEAD | git update-index -z --add --remove --stdin &&
Paths that exist in HEAD but not in the index will be caught with this;
what about paths that do not exist in HEAD but is in the index---they will
be kept in the index so they are fine as well. Good.
Thanks.
next prev parent reply other threads:[~2010-04-18 23:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <9eaa7a4672f2010c9e6e3b3f473f1c09abcfcc45.1271614677.git.charles@hashpling.org>
2010-04-18 18:28 ` [PATCH v2 2/3] stash: Don't overwrite files that have gone from the index Charles Bailey
2010-04-18 23:11 ` Junio C Hamano [this message]
2010-04-18 18:28 ` [PATCH v2 3/3] Documentation: Describe other situations where -z affects git diff Charles Bailey
2010-04-18 20:44 ` Junio C Hamano
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=7vpr1wtkyu.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=charles@hashpling.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--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.
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).