git-p4: add Git LFS backend for large file system
[gitweb.git] / tree-walk.h
index ae7fb3a824a960c6c03efae799683cd7e18d402c..3b2f7bf17d37de5b475c415b41c6abb4281d5469 100644 (file)
@@ -40,6 +40,24 @@ struct traverse_info;
 typedef int (*traverse_callback_t)(int n, unsigned long mask, unsigned long dirmask, struct name_entry *entry, struct traverse_info *);
 int traverse_trees(int n, struct tree_desc *t, struct traverse_info *info);
 
+enum follow_symlinks_result {
+       FOUND = 0, /* This includes out-of-tree links */
+       MISSING_OBJECT = -1, /* The initial symlink is missing */
+       DANGLING_SYMLINK = -2, /*
+                               * The initial symlink is there, but
+                               * (transitively) points to a missing
+                               * in-tree file
+                               */
+       SYMLINK_LOOP = -3,
+       NOT_DIR = -4, /*
+                      * Somewhere along the symlink chain, a path is
+                      * requested which contains a file as a
+                      * non-final element.
+                      */
+};
+
+enum follow_symlinks_result get_tree_entry_follow_symlinks(unsigned char *tree_sha1, const char *name, unsigned char *result, struct strbuf *result_path, unsigned *mode);
+
 struct traverse_info {
        struct traverse_info *prev;
        struct name_entry name;