Re: [PATCH] pre-commit hook: less easily-tripped conflict marker detection
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jun 28, 2006, 01:58 UTC
- Message-ID
- <7vhd2659e4.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060627223226.GA10178@soma>
Eric Wong <normalperson@yhbt.net> writes:
Show 5 quoted lines
>> Hmm. Undecided. > > At this point, I think this is probably the best change to make. There > are many things that a user could do that an automated checker could > miss, and there are also many things that it could be overchecking for.
Agreed to the latter part of the last sentence. Undecided about the rest and the implementation.
Show 7 quoted lines
>
> - if (/^(?:[<>=]){7}/) {
> + if (/^[<>]{7} / || /^={7}$/) {
>
> I would also make this change, because I'm pretty certain 7 characters
> (and one space for [<>]) is standard for merge(1). We already rely on
> that for rerere.One of the things we might want is to use diff3 instead of merge but I presume the latter is a thin wrapper around the former so that would be OK. I am however not enthused about the @unresolved array approach.