Code

[PATCH] Introduce diff-tree-helper.
authorJunio C Hamano <junkio@cox.net>
Tue, 26 Apr 2005 01:26:45 +0000 (18:26 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 26 Apr 2005 01:26:45 +0000 (18:26 -0700)
commitd1df5743809614241883ecad51876607cf432034
treeb49d0923200e1a1e765e88b044ed3c90100f8465
parent86436c28289eedd2ee9b7f9c872a0ed039866a0f
[PATCH] Introduce diff-tree-helper.

This patch introduces a new program, diff-tree-helper.  It reads
output from diff-cache and diff-tree, and produces a patch file.
The diff format customization can be done the same way the
show-diff uses; the same external diff interface introduced by
the previous patch to drive diff from show-diff is used so this
is not surprising.

It is used like the following examples:

   $ diff-cache --cached -z <tree> | diff-tree-helper -z -R paths...
   $ diff-tree -r -z <tree1> <tree2> | diff-tree-helper -z paths...

 - As usual, the use of the -z flag is recommended in the script
   to pass NUL-terminated filenames through the pipe between
   commands.

 - The -R flag is used to generate reverse diff.  It does not
   matter for diff-tree case, but it is sometimes useful to get
   a patch in the desired direction out of diff-cache.

 - The paths parameters are used to restrict the paths that
   appears in the output.  Again this is useful to use with
   diff-cache, which, unlike diff-tree, does not take such paths
   restriction parameters.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Makefile
diff-tree-helper.c [new file with mode: 0644]
strbuf.c [new file with mode: 0644]
strbuf.h [new file with mode: 0644]