aboutsummaryrefslogtreecommitdiff
path: root/vcs-svn/repo_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'vcs-svn/repo_tree.c')
-rw-r--r--vcs-svn/repo_tree.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/vcs-svn/repo_tree.c b/vcs-svn/repo_tree.c
index f2466bc63..67d27f0b6 100644
--- a/vcs-svn/repo_tree.c
+++ b/vcs-svn/repo_tree.c
@@ -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;