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>
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user