From 40222792fa4d872e7494668a16db82acc1809345 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 22 Aug 2017 17:00:57 -0700 Subject: vcs-svn: remove more unused prototypes and declarations I forgot to remove these in v1.7.10-rc0~118^2~4^2~5^2~4 (vcs-svn: eliminate repo_tree structure, 2010-12-10). This finishes what was started in commit 36f63b50 (vcs-svn: remove unused prototypes, 2017-08-21). Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- vcs-svn/repo_tree.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'vcs-svn/repo_tree.h') diff --git a/vcs-svn/repo_tree.h b/vcs-svn/repo_tree.h index 555b64bbb6..0d3bbb677d 100644 --- a/vcs-svn/repo_tree.h +++ b/vcs-svn/repo_tree.h @@ -1,14 +1,11 @@ #ifndef REPO_TREE_H_ #define REPO_TREE_H_ -struct strbuf; - #define REPO_MODE_DIR 0040000 #define REPO_MODE_BLB 0100644 #define REPO_MODE_EXE 0100755 #define REPO_MODE_LNK 0120000 -uint32_t next_blob_mark(void); void svn_repo_copy(uint32_t revision, const char *src, const char *dst); const char *svn_repo_read_path(const char *path, uint32_t *mode_out); void svn_repo_delete(const char *path); -- cgit v1.2.1 From 21c7c2d92d4b107ca854d84d4cd4d86c7993089c Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 22 Aug 2017 17:01:34 -0700 Subject: vcs-svn: remove custom mode constants In the rest of Git, these modes are spelled as S_IFDIR, S_IFREG | 0644, S_IFREG | 0755, and S_IFLNK. Use the same constants in svn-fe for simplicity and consistency. No functional change intended. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- vcs-svn/repo_tree.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'vcs-svn/repo_tree.h') diff --git a/vcs-svn/repo_tree.h b/vcs-svn/repo_tree.h index 0d3bbb677d..c840bc9bae 100644 --- a/vcs-svn/repo_tree.h +++ b/vcs-svn/repo_tree.h @@ -1,11 +1,6 @@ #ifndef REPO_TREE_H_ #define REPO_TREE_H_ -#define REPO_MODE_DIR 0040000 -#define REPO_MODE_BLB 0100644 -#define REPO_MODE_EXE 0100755 -#define REPO_MODE_LNK 0120000 - void svn_repo_copy(uint32_t revision, const char *src, const char *dst); const char *svn_repo_read_path(const char *path, uint32_t *mode_out); void svn_repo_delete(const char *path); -- cgit v1.2.1 From 9b0db33506ea9b1d968d719f2fce9c208c66cd95 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 22 Aug 2017 17:02:15 -0700 Subject: vcs-svn: remove repo_delete wrapper function Since v1.7.10-rc0~118^2~4^2~4^2~3 (vcs-svn: pass paths through to fast-import, 2010-12-13) this is an alias for fast_export_delete. Remove the unnecessary layer of indirection. No functional change intended. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- vcs-svn/repo_tree.h | 1 - 1 file changed, 1 deletion(-) (limited to 'vcs-svn/repo_tree.h') diff --git a/vcs-svn/repo_tree.h b/vcs-svn/repo_tree.h index c840bc9bae..0cd2761183 100644 --- a/vcs-svn/repo_tree.h +++ b/vcs-svn/repo_tree.h @@ -3,6 +3,5 @@ void svn_repo_copy(uint32_t revision, const char *src, const char *dst); const char *svn_repo_read_path(const char *path, uint32_t *mode_out); -void svn_repo_delete(const char *path); #endif -- cgit v1.2.1 From b8f43b120b4d7bd0638eb072f8527c5a33a70579 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 22 Aug 2017 17:04:47 -0700 Subject: vcs-svn: move remaining repo_tree functions to fast_export.h These used to be for manipulating the in-memory repo_tree structure, but nowadays they are convenience wrappers to handle a few git-vs-svn mismatches: 1. Git does not track empty directories but Subversion does. When looking up a path in git that Subversion thinks exists and finding nothing, we can safely assume that the path represents a directory. This is needed when a later Subversion revision modifies that directory. 2. Subversion allows deleting a file by copying. In Git fast-import we have to handle that more explicitly as a deletion. These are details of the tool's interaction with git fast-import. Move them to fast_export.c, where other such details are handled. This way the function names do not start with a repo_ prefix that would clash with the repository object introduced in v2.14.0-rc0~38^2~16 (repository: introduce the repository object, 2017-06-22) or an svn_ prefix that would clash with libsvn (in case someone wants to link this code with libsvn some day). Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- vcs-svn/repo_tree.h | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 vcs-svn/repo_tree.h (limited to 'vcs-svn/repo_tree.h') diff --git a/vcs-svn/repo_tree.h b/vcs-svn/repo_tree.h deleted file mode 100644 index 0cd2761183..0000000000 --- a/vcs-svn/repo_tree.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef REPO_TREE_H_ -#define REPO_TREE_H_ - -void svn_repo_copy(uint32_t revision, const char *src, const char *dst); -const char *svn_repo_read_path(const char *path, uint32_t *mode_out); - -#endif -- cgit v1.2.1