diff options
author | Junio C Hamano <junkio@cox.net> | 2005-04-25 18:26:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-25 18:26:45 -0700 |
commit | d1df5743809614241883ecad51876607cf432034 (patch) | |
tree | b49d0923200e1a1e765e88b044ed3c90100f8465 /Makefile | |
parent | [PATCH] Split external diff command interface to a separate file. (diff) | |
download | tgif-d1df5743809614241883ecad51876607cf432034.tar.xz |
[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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -17,7 +17,8 @@ SCRIPTS=git-merge-one-file-script git-prune-script git-pull-script git-tag-scrip PROG= update-cache show-diff init-db write-tree read-tree commit-tree \ cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \ check-files ls-tree merge-base merge-cache unpack-file git-export \ - diff-cache convert-cache http-pull rpush rpull rev-list git-mktag + diff-cache convert-cache http-pull rpush rpull rev-list git-mktag \ + diff-tree-helper all: $(PROG) @@ -28,6 +29,9 @@ LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o LIB_FILE=libgit.a LIB_H=cache.h object.h +LIB_H += strbuf.h +LIB_OBJS += strbuf.o + LIB_H += diff.h LIB_OBJS += diff.o |