Code

vcs-svn: avoid using ls command twice
[git.git] / vcs-svn / svndump.c
index 7ecb227a6d62abd2031de44af646b19bc9fcf539..99a5ba0d1008083a2a0c868d1984f44c03ba4232 100644 (file)
@@ -246,8 +246,7 @@ static void handle_node(void)
                old_data = NULL;
        } else if (node_ctx.action == NODEACT_CHANGE) {
                uint32_t mode;
-               old_data = repo_read_path(node_ctx.dst);
-               mode = repo_read_mode(node_ctx.dst);
+               old_data = repo_read_path(node_ctx.dst, &mode);
                if (mode == REPO_MODE_DIR && type != REPO_MODE_DIR)
                        die("invalid dump: cannot modify a directory into a file");
                if (mode != REPO_MODE_DIR && type == REPO_MODE_DIR)