git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	david@lang.hm, Git Mailing List <git@vger.kernel.org>
Subject: Re: Untracked working tree files
Date: Wed, 15 Oct 2008 15:06:36 -0700	[thread overview]
Message-ID: <7v3aixqzrn.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0810151311210.3288@nehalem.linux-foundation.org> (Linus Torvalds's message of "Wed, 15 Oct 2008 13:23:50 -0700 (PDT)")

Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Wed, 15 Oct 2008, Linus Torvalds wrote:
>> 
> It's quite possible that we should remove unmerged entries. Except that's 
> not how our internal 'read_cache_unmerged()' function works. It really 
> just ignores them, and throws them on the floor. We _could_ try to just 
> turn them into a (since) stage-0 entry.
>
> Junio?

I'd agree that dropping unmerged entries to stage-0 when we can would make
sense.  An conflicted existing path would get an stage-0 entry in the
index, which is compared with the switched-to HEAD (which could be the
same as the current one when "git reset --hard" is run without a rev), we
notice that they are different and the index entry and the work tree path
is overwritten by the version from the switched-to HEAD.  For a new path
that a failed merge tried to bring in, we notice that the switched-to HEAD
does not have that path and happily remove it from the index and from the
work tree.  All will go a lot smoother than the current code.

I am not sure what should happen when we can't drop the unmerged entry
down to stage-0 due to D/F conflicts, though.  IIRC, read-tree proper
would not touch the work tree in such a case, but merge-recursive creates
our and their versions with funny suffixes, which will not be known to the
index and will be left in the working tree.

  parent reply	other threads:[~2008-10-15 22:08 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 [this message]
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

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=7v3aixqzrn.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@lang.hm \
    --cc=git@vger.kernel.org \
    --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).