Merge branch 'db/delta-applier' into svn-fe
[gitweb.git] / vcs-svn / repo_tree.c
index f2466bc63412f2afc2b0ce07306ed2351d0fa749..67d27f0b6ca95ad62f95bb6c4fb38c58065dc8f0 100644 (file)
@@ -8,39 +8,23 @@
 #include "repo_tree.h"
 #include "fast_export.h"
 
-const char *repo_read_path(const char *path)
+const char *repo_read_path(const char *path, uint32_t *mode_out)
 {
        int err;
-       uint32_t dummy;
        static struct strbuf buf = STRBUF_INIT;
 
        strbuf_reset(&buf);
-       err = fast_export_ls(path, &dummy, &buf);
+       err = fast_export_ls(path, mode_out, &buf);
        if (err) {
                if (errno != ENOENT)
                        die_errno("BUG: unexpected fast_export_ls error");
+               /* Treat missing paths as directories. */
+               *mode_out = REPO_MODE_DIR;
                return NULL;
        }
        return buf.buf;
 }
 
-uint32_t repo_read_mode(const char *path)
-{
-       int err;
-       uint32_t result;
-       static struct strbuf dummy = STRBUF_INIT;
-
-       strbuf_reset(&dummy);
-       err = fast_export_ls(path, &result, &dummy);
-       if (err) {
-               if (errno != ENOENT)
-                       die_errno("BUG: unexpected fast_export_ls error");
-               /* Treat missing paths as directories. */
-               return REPO_MODE_DIR;
-       }
-       return result;
-}
-
 void repo_copy(uint32_t revision, const char *src, const char *dst)
 {
        int err;