Re: Is XDL_MERGE_ZEALOUS too zealous (or maybe not zealous enough)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 19 Oct 2008, Junio C Hamano wrote:

> <<<<<<< ours
> 	/* --track without -b should DWIM */
> 	if (0 < opts.track && !opts.new_branch) {
> 		const char *argv0 = argv[0];
> 	...
> 		opts.new_branch = argv0 + 1;
> 	}
> 
> 	if (opts.track == BRANCH_TRACK_UNSPECIFIED)
> 		opts.track = git_branch_track;
> =======
> 	if (conflict_style) {
> 		opts.merge = 1; /* implied */
> 		git_xmerge_config("merge.conflictstyle", conflict_style, NULL);
> 	}
> 
> 	if (!opts.new_branch && (opts.track != git_branch_track))
> 		die("git checkout: --track and --no-track require -b");
> >>>>>>> theirs

This is that case that adjacent blocks A and B are changed to A' B and A 
B' in the to-be-merged branches.

I could imagine that you would have this automerged to A' B', but I 
actually advise against that.

My gut feeling tells me that a "for" statement as block "A" and some 
change ("B") in the _body_ of the "for" loop that takes advantage of the 
original version of the "for" statement would be _real_ hard to detect.

Better have trivial conflicts reported, but catch more non-trivial ones 
(instead of mismerging them).

(Another possibility would be that block "B" is actually an "else".  Also 
in this case it is easy to think of cases that would wreak havoc; OTOH we 
would mismerge them _already_ if at least 1 common line is unchanged 
between the blocks.  Tough.)

But I might be completely wrong.

Ciao,
Dscho "who is a little jet-lagged, so you should trust him even less than 
normally"


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux