Re: When a merge turns into a conflict

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

 



Anand Kumria <wildfire@xxxxxxxxxxx> writes:

> However when my colleague came to merge my patches in; git complained 
> that the file had conflict because:
>
> 	a. it found the ========= AsciiDoc header line

Perhaps .git/hooks/pre-commit hook is enabled for the person who needed
to merge, fix conflicts and make a commit.

We ship the hook _disabled_ by default, but that hook inspects the
change (relative to the HEAD, which means "difference this merge brings
in relative to the state before I started the merge") and complains if
it finds lines that:

 * have trailing whitespaces,

 * have a SP immediately before HT in the indentation, or

 * matches 7 or more <, >, or = at the beginning (i.e. <<<<<<<, =======,
   or >>>>>>>, typically are conflict markers).

And the last heuristics does trigger on an AsciiDoc text.

The easiest (and standard) workaround in such a case is, after
inspecting the change yourself to make sure you are bitten by false
positive, to commit with --no-verify option:

	git commit --no-verify

This bypasses the pre-commit hook.
-
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