aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-15 16:32:45 -0800
committerJunio C Hamano <junkio@cox.net>2007-04-07 02:29:40 -0700
commit68faf68938ee943fc251c702f2027e4dfda354db (patch)
tree52edea66a7497c5ed566620172c1a0cc50cc59d4 /cache.h
parentee9693e246669f48f6b058a1044cefa973a44c22 (diff)
downloadgit-68faf68938ee943fc251c702f2027e4dfda354db.tar.gz
git-68faf68938ee943fc251c702f2027e4dfda354db.tar.xz
A new merge stragety 'subtree'.
This merge strategy largely piggy-backs on git-merge-recursive. When merging trees A and B, if B corresponds to a subtree of A, B is first adjusted to match the tree structure of A, instead of reading the trees at the same level. This adjustment is also done to the common ancestor tree. If you are pulling updates from git-gui repository into git.git repository, the root level of the former corresponds to git-gui/ subdirectory of the latter. The tree object of git-gui's toplevel is wrapped in a fake tree object, whose sole entry has name 'git-gui' and records object name of the true tree, before being used by the 3-way merge code. If you are merging the other way, only the git-gui/ subtree of git.git is extracted and merged into git-gui's toplevel. The detection of corresponding subtree is done by comparing the pathnames and types in the toplevel of the tree. Heuristics galore! That's the git way ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 1b50c32b1..eb57507b8 100644
--- a/cache.h
+++ b/cache.h
@@ -496,4 +496,7 @@ extern void trace_argv_printf(const char **argv, int count, const char *format,
extern int convert_to_git(const char *path, char **bufp, unsigned long *sizep);
extern int convert_to_working_tree(const char *path, char **bufp, unsigned long *sizep);
+/* match-trees.c */
+void shift_tree(const unsigned char *, const unsigned char *, unsigned char *, int);
+
#endif /* CACHE_H */