git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Custom low-level merge driver support.
@ 2007-04-18  9:21 Junio C Hamano
  2007-04-18  9:21 ` [PATCH 1/2] " Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Junio C Hamano @ 2007-04-18  9:21 UTC (permalink / raw)
  To: git

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.

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

end of thread, other threads:[~2007-04-19  8:09 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-18  9:21 [PATCH 0/2] Custom low-level merge driver support Junio C Hamano
2007-04-18  9:21 ` [PATCH 1/2] " Junio C Hamano
2007-04-18 10:36   ` Johannes Sixt
2007-04-18 10:55     ` Johannes Schindelin
2007-04-18  9:21 ` [PATCH 2/2] Allow the default low-level merge driver to be configured Junio C Hamano
2007-04-18 10:48 ` [PATCH 0/2] Custom low-level merge driver support Johannes Schindelin
2007-04-18 15:34   ` Martin Waitz
2007-04-18 15:56     ` Junio C Hamano
2007-04-18 16:08       ` Martin Waitz
2007-04-18 16:16     ` Linus Torvalds
2007-04-18 17:10       ` Junio C Hamano
2007-04-18 18:45         ` Linus Torvalds
2007-04-18 19:00           ` Junio C Hamano
2007-04-18 19:23             ` Junio C Hamano
2007-04-18 19:43               ` Linus Torvalds
2007-04-18 19:51             ` Linus Torvalds
2007-04-18 20:13               ` Junio C Hamano
2007-04-18 20:35                 ` Linus Torvalds
2007-04-18 20:09                   ` David Lang
2007-04-18 21:01                     ` Junio C Hamano
2007-04-19  7:52                   ` Martin Waitz
2007-04-19  8:08                     ` Junio C Hamano
2007-04-18 18:28       ` [PATCH] Custom low-level merge driver: change the configuration scheme 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).