[PATCH 0/2] Custom low-level merge driver support.

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

 



This two-patch series concludes my initial attempt for
gitattributes for now.

It hooks into the merge-recursive backend to allow custom low-level
3-way merge drivers to be specified path-by-path basis.

To define a custom low-level merge driver, the usual
configuration mechanism is used.

	[merge]
		driver = ancient merge %A %O %B

The new configuration item, 'merge.driver', is multi-valued.
Each of its values begin with the name of the low-level driver
('ancient' in the above example), followed by its command line.
The command line can contain the following patterns to be
processed with the usual interpolation mechanism:

	%O	name of the temporary file that has the
		ancestor's version.

	%A	name of the temporary file that has the
		version from the current branch.

	%B	name of the temporary file that has the
		version from the other branch.

The low-level driver is expected to update the file named with
%A with the result of the merge, and exit with zero status upon
a clean merge.  It can exit with non-zero status to signal that
the result still has conflicts.

Once you set up a low-level merge driver, you can specify that
driver to be used for specific paths, using the attributes
mechanism, by using the driver's name as the value of 'merge'
attribute.  For example, taken together with the above 'ancient'
driver configuration and this line in your .git/info/attributes:

	*.txt	merge=ancient

will use the old "RCS merge" external program to merge a file
whose extension is ".txt", just like we used to do before
v1.5.0.

-
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]