git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: ltuikov@yahoo.com
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] merge: loosen overcautious "working file will be lost" check.
Date: Mon, 09 Oct 2006 15:47:36 -0700	[thread overview]
Message-ID: <7vy7rp9kdz.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20061009172053.48882.qmail@web31804.mail.mud.yahoo.com> (Luben Tuikov's message of "Mon, 9 Oct 2006 10:20:52 -0700 (PDT)")

Luben Tuikov <ltuikov@yahoo.com> writes:

> I think this is a good thing.
>
> How about this case I've noticed in my trees:
>
> After branching out, a file is deleted, only to add
> a different file with the same file name.
>
> Then any time I pull in from the trunk to merge,
> merge fails with git-diff-files showing all 0's and the
> file name in question.  Picture:
>
>   Branch B       +-----------------M1---->
>                 /                 /
>                C2 <-- git-add A  /
>               /                 /
>              C1 <-- git-rm A   /
>             /                 /
> Trunk -----+-----------------+---->

Sorry I do not understand the picture; where is the common
ancestor?  If it is the left plus sign on the Trunk line, and
you are talking about what happens when making the merge M1,
then before C1 A did not exist (so Trunk tip which is the right
plus sign on the Trunk line would not either), and the other
head (tip of branch B you are pulling the trunk into) would have
one already (from C2), so I would imagine it would be "one side
adds while the other did not touch" (net effect since branch B
forked from trunk is an addition of A, while Trunk did not do
anything with respect to path A), so I do not see where any
conflict can come from.  Puzzled.

  reply	other threads:[~2006-10-09 22:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-09  0:11 "fatal: Untracked working tree file 'so-and-so' would be overwritten by merge" Linus Torvalds
2006-10-09  4:48 ` Junio C Hamano
2006-10-09  5:20   ` Junio C Hamano
2006-10-09  5:48     ` [RFC/PATCH] merge: loosen overcautious "working file will be lost" check Junio C Hamano
2006-10-09 17:20       ` Luben Tuikov
2006-10-09 22:47         ` Junio C Hamano [this message]
2006-10-10  0:01           ` Luben Tuikov
2006-10-10  0:19             ` Junio C Hamano
2006-10-10  0:59               ` Luben Tuikov
2006-10-09 16:03     ` "fatal: Untracked working tree file 'so-and-so' would be overwritten by merge" Linus Torvalds
2006-10-09 16:55       ` Junio C Hamano
2006-10-10  6:32       ` 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

  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=7vy7rp9kdz.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=ltuikov@yahoo.com \
    /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).