path: root/diff.h
diff options
authorJunio C Hamano <>2005-05-19 10:32:35 (GMT)
committerLinus Torvalds <>2005-05-19 15:59:40 (GMT)
commit5c97558c9a813a0a775c438a79cfc438def00c22 (patch)
tree59b9eaa38cd2ec6f846ed2f2b6767055022a227a /diff.h
parenta310d4349467d78266f38d29e500c77b96ee5bef (diff)
[PATCH] Detect renames in diff family.
This rips out the rename detection engine from diff-helper and moves it to the diff core, and updates the internal calling convention used by diff-tree family into the diff core. In order to give the same option name to diff-tree family as well as to diff-helper, I've changed the earlier diff-helper '-r' option to '-M' (stands for Move; sorry but the natural abbreviation 'r' for 'rename' is already taken for 'recursive'). Although I did a fair amount of test with the git-diff-tree with existing rename commits in the core GIT repository, this should still be considered beta (preview) release. This patch depends on the diff-delta infrastructure just committed. This implements almost everything I wanted to see in this series of patch, except a few minor cleanups in the calling convention into diff core, but that will be a separate cleanup patch. Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'diff.h')
1 files changed, 4 insertions, 15 deletions
diff --git a/diff.h b/diff.h
index 815987d..cce4649 100644
--- a/diff.h
+++ b/diff.h
@@ -17,21 +17,10 @@ extern void diff_change(unsigned mode1, unsigned mode2,
extern void diff_unmerge(const char *path);
-/* These are for diff-helper */
+extern void diff_setup(int detect_rename, int minimum_score,
+ int reverse,
+ const char **spec, int cnt);
-struct diff_spec {
- unsigned char blob_sha1[20];
- unsigned short mode; /* file mode */
- unsigned sha1_valid : 1; /* if true, use blob_sha1 and trust mode;
- * however with a NULL SHA1, read them
- * from the file system.
- * if false, use the name and read mode from
- * the filesystem.
- */
- unsigned file_valid : 1; /* if false the file does not even exist */
-extern void run_external_diff(const char *name, const char *other,
- struct diff_spec *, struct diff_spec *);
+extern void diff_flush(void);
#endif /* DIFF_H */