From: Junio C Hamano <gitster@pobox.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
david@lang.hm, Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] reset --hard/read-tree --reset -u: remove unmerged new paths
Date: Thu, 16 Oct 2008 07:49:21 -0700 [thread overview]
Message-ID: <7v8wsok32m.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20081016072010.GA19188@elte.hu> (Ingo Molnar's message of "Thu, 16 Oct 2008 09:20:10 +0200")
Ingo Molnar <mingo@elte.hu> writes:
> Does your fix mean that all i have to do in the future is a hard reset
> back to HEAD, and that dangling files are not supposed to stay around?
As long as the index *somehow* knows about these new files, they are
removed.
The situation is:
(0) you start from a HEAD that does not have path xyzzy;
(1) you attempt to merge a rev that has path xyzzy;
(2) the merge conflicts, leaving higher staged index entries for the
path.
(3) you decide not to conclude the merge by saying "reset --hard".
The old logic for "reset" was to remove paths that exist in the index at
stage #0 (i.e. cleanly merged) and not in HEAD. The patch changes the
rule to remove paths that exist in the index at any stage (i.e. including
the ones that have conflicted and not resolved yet) and not in HEAD.
prev parent reply other threads:[~2008-10-16 14:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 18:56 Untracked working tree files Andrew Morton
2008-10-15 19:09 ` david
2008-10-15 19:14 ` david
2008-10-15 19:24 ` Andrew Morton
2008-10-15 19:26 ` Andrew Morton
2008-10-15 19:32 ` Nicolas Pitre
2008-10-15 19:34 ` Nicolas Pitre
2008-10-15 19:31 ` Linus Torvalds
2008-10-15 19:42 ` david
2008-10-15 19:56 ` Linus Torvalds
2008-10-15 20:17 ` david
2008-10-15 19:49 ` Andrew Morton
2008-10-15 20:08 ` Linus Torvalds
2008-10-15 20:23 ` Andrew Morton
2008-10-16 8:42 ` Paolo Ciarrocchi
2008-10-16 9:32 ` Andrew Morton
2008-10-15 20:23 ` Linus Torvalds
2008-10-15 20:30 ` Andrew Morton
2008-10-15 22:06 ` Junio C Hamano
2008-10-15 23:00 ` [PATCH] reset --hard/read-tree --reset -u: remove unmerged new paths Junio C Hamano
2008-10-15 23:16 ` Linus Torvalds
2008-10-16 6:27 ` Junio C Hamano
2008-10-16 7:20 ` Ingo Molnar
2008-10-16 14:49 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v8wsok32m.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=akpm@linux-foundation.org \
--cc=david@lang.hm \
--cc=git@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.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).