diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-09-10 17:03:09 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-09-10 17:03:09 +0900 |
| commit | 8134746d1d33fffc3a94030c2af576e3738a037c (patch) | |
| tree | 8e16ba84c5221153f6e1599ecbf5b2757a6d6a33 /vcs-svn/repo_tree.c | |
| parent | 044aa0eb7fa44f0f2d44c3331d6218e087b45fc2 (diff) | |
| parent | b8f43b120b4d7bd0638eb072f8527c5a33a70579 (diff) | |
| download | git-8134746d1d33fffc3a94030c2af576e3738a037c.tar.gz | |
Merge branch 'jn/vcs-svn-cleanup' into maint
Code clean-up.
* jn/vcs-svn-cleanup:
vcs-svn: move remaining repo_tree functions to fast_export.h
vcs-svn: remove repo_delete wrapper function
vcs-svn: remove custom mode constants
vcs-svn: remove more unused prototypes and declarations
Diffstat (limited to 'vcs-svn/repo_tree.c')
| -rw-r--r-- | vcs-svn/repo_tree.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/vcs-svn/repo_tree.c b/vcs-svn/repo_tree.c deleted file mode 100644 index d77cb0ada7..0000000000 --- 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 *svn_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 svn_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 svn_repo_delete(const char *path) -{ - fast_export_delete(path); -} |
