git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git's behaviour during a 'both added' merge conflict
@ 2012-03-22 14:23 Jeremy Morton
  2012-03-22 18:49 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Morton @ 2012-03-22 14:23 UTC (permalink / raw)
  To: git

I've noticed that when you're merging and there is a 'both added'
merge conflict, git creates the .LOCAL and .REMOTE files for the
merge, but not the .BASE file.  Now, there isn't an actual base file
because the file has been added anew in both branches, but wouldn't it
make sense for git to just create an empty .BASE file anyway?
Conceptually, new content is being added on both sides to an empty
container - the fact that it didn't exist as a file on the filesystem
before is something git isn't meant to care about.  It also makes
things easier for merge tools which are expecting a .BASE file; in
practice, scripts just usually create the empty .BASE file anyway.
Why not have git do this itself without a script?

Best regards,
Jeremy Morton (Jez)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git's behaviour during a 'both added' merge conflict
  2012-03-22 14:23 git's behaviour during a 'both added' merge conflict Jeremy Morton
@ 2012-03-22 18:49 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2012-03-22 18:49 UTC (permalink / raw)
  To: Jeremy Morton; +Cc: git

Jeremy Morton <jeremy@configit.com> writes:

> I've noticed that when you're merging and there is a 'both added'
> merge conflict, git creates the .LOCAL and .REMOTE files for the
> merge, but not the .BASE file.

Strictly speaking, git doesn't, but I think mergetool may.

You may find this thread interesting:

  http://thread.gmane.org/gmane.comp.version-control.git/188776/focus=188867

which resulted in ec245ba (mergetool: Provide an empty file when needed,
2012-01-19); that change is in v1.7.9.1 and upwards IIRC.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-22 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-22 14:23 git's behaviour during a 'both added' merge conflict Jeremy Morton
2012-03-22 18:49 ` Junio C Hamano

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).