aboutsummaryrefslogtreecommitdiff
path: root/vcs-svn/svndump.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-12-10 00:53:54 -0600
committerJonathan Nieder <jrnieder@gmail.com>2011-03-07 00:56:50 -0600
commite75316de5340e0ba3ac75937c59fa2c9d6ab48d7 (patch)
tree9b3b17b1f662c3a59db3fa5edbc4e0d4add851b1 /vcs-svn/svndump.c
parent5a38b186d3ac5840d6ae78511d6dccab8367f242 (diff)
downloadgit-e75316de5340e0ba3ac75937c59fa2c9d6ab48d7.tar.gz
git-e75316de5340e0ba3ac75937c59fa2c9d6ab48d7.tar.xz
vcs-svn: simplify repo_modify_path and repo_copy
Restrict the repo_tree API to functions that are actually needed. - decouple reading the mode and content of dirents from other operations. - remove repo_modify_path. It is only used to read the mode from dirents. - remove the ability to use repo_read_mode on a missing path. The existing code only errors out in that case, anyway. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'vcs-svn/svndump.c')
-rw-r--r--vcs-svn/svndump.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index f07376f96..e6d84bada 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -235,9 +235,7 @@ static void handle_node(void)
uint32_t mode;
if (!have_text)
mark = repo_read_path(node_ctx.dst);
- mode = repo_modify_path(node_ctx.dst, 0, 0);
- if (!mode)
- die("invalid dump: path to be modified is missing");
+ mode = repo_read_mode(node_ctx.dst);
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)