From e75316de5340e0ba3ac75937c59fa2c9d6ab48d7 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 10 Dec 2010 00:53:54 -0600 Subject: 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 Signed-off-by: David Barr Signed-off-by: Jonathan Nieder --- vcs-svn/svndump.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'vcs-svn/svndump.c') diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c index f07376f964..e6d84bada5 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) -- cgit v1.2.1