Rewritten svndump.c left only very little functionality in repo_tree.c which could easily be inlined. Let's remove it. Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@xxxxxxxxx> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- Makefile | 1 - vcs-svn/repo_tree.c | 48 ------------------------------------------------ vcs-svn/repo_tree.h | 14 -------------- 3 files changed, 63 deletions(-) delete mode 100644 vcs-svn/repo_tree.c diff --git a/Makefile b/Makefile index 1b09454..5f72a65 100644 --- a/Makefile +++ b/Makefile @@ -2188,7 +2188,6 @@ XDIFF_OBJS += xdiff/xhistogram.o VCSSVN_OBJS += vcs-svn/line_buffer.o VCSSVN_OBJS += vcs-svn/sliding_window.o -VCSSVN_OBJS += vcs-svn/repo_tree.o VCSSVN_OBJS += vcs-svn/fast_export.o VCSSVN_OBJS += vcs-svn/svndiff.o VCSSVN_OBJS += vcs-svn/svndump.o diff --git a/vcs-svn/repo_tree.c b/vcs-svn/repo_tree.c deleted file mode 100644 index 67d27f0..0000000 --- a/vcs-svn/repo_tree.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed under a two-clause BSD-style license. - * See LICENSE for details. - */ - -#include "git-compat-util.h" -#include "strbuf.h" -#include "repo_tree.h" -#include "fast_export.h" - -const char *repo_read_path(const char *path, uint32_t *mode_out) -{ - int err; - static struct strbuf buf = STRBUF_INIT; - - strbuf_reset(&buf); - err = fast_export_ls(path, mode_out, &buf); - if (err) { - if (errno != ENOENT) - die_errno("BUG: unexpected fast_export_ls error"); - /* Treat missing paths as directories. */ - *mode_out = REPO_MODE_DIR; - return NULL; - } - return buf.buf; -} - -void repo_copy(uint32_t revision, const char *src, const char *dst) -{ - int err; - uint32_t mode; - static struct strbuf data = STRBUF_INIT; - - strbuf_reset(&data); - err = fast_export_ls_rev(revision, src, &mode, &data); - if (err) { - if (errno != ENOENT) - die_errno("BUG: unexpected fast_export_ls_rev error"); - fast_export_delete(dst); - return; - } - fast_export_modify(dst, mode, data.buf); -} - -void repo_delete(const char *path) -{ - fast_export_delete(path); -} diff --git a/vcs-svn/repo_tree.h b/vcs-svn/repo_tree.h index 889c6a3..6d0f51e 100644 --- a/vcs-svn/repo_tree.h +++ b/vcs-svn/repo_tree.h @@ -1,23 +1,9 @@ #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 repo_copy(uint32_t revision, const char *src, const char *dst); -void repo_add(const char *path, uint32_t mode, uint32_t blob_mark); -const char *repo_read_path(const char *path, uint32_t *mode_out); -void repo_delete(const char *path); -void repo_commit(uint32_t revision, const char *author, - const struct strbuf *log, const char *uuid, const char *url, - long unsigned timestamp); -void repo_diff(uint32_t r1, uint32_t r2); -void repo_init(void); -void repo_reset(void); - #endif -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html