Re: [PATCH] reset --hard/read-tree --reset -u: remove unmerged new paths

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Thursday, October 16, 2008 - 7:49 am

Ingo Molnar <mingo@elte.hu> writes:


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.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Untracked working tree files, Andrew Morton, (Wed Oct 15, 11:56 am)
Re: Untracked working tree files, david, (Wed Oct 15, 12:09 pm)
Re: Untracked working tree files, david, (Wed Oct 15, 12:14 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 12:24 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 12:26 pm)
Re: Untracked working tree files, Linus Torvalds, (Wed Oct 15, 12:31 pm)
Re: Untracked working tree files, Nicolas Pitre, (Wed Oct 15, 12:32 pm)
Re: Untracked working tree files, Nicolas Pitre, (Wed Oct 15, 12:34 pm)
Re: Untracked working tree files, david, (Wed Oct 15, 12:42 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 12:49 pm)
Re: Untracked working tree files, Linus Torvalds, (Wed Oct 15, 12:56 pm)
Re: Untracked working tree files, Linus Torvalds, (Wed Oct 15, 1:08 pm)
Re: Untracked working tree files, david, (Wed Oct 15, 1:17 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 1:23 pm)
Re: Untracked working tree files, Linus Torvalds, (Wed Oct 15, 1:23 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 1:30 pm)
Re: Untracked working tree files, Junio C Hamano, (Wed Oct 15, 3:06 pm)
Re: Untracked working tree files, Paolo Ciarrocchi, (Thu Oct 16, 1:42 am)
Re: Untracked working tree files, Andrew Morton, (Thu Oct 16, 2:32 am)
Re: [PATCH] reset --hard/read-tree --reset -u: remove unme ..., Junio C Hamano, (Thu Oct 16, 7:49 am)