{"thread":{"id":"54035","subject":"[PATCH 0/5] slimming down installed size","startedAt":"2020-08-13T14:55:18Z","lastAt":"2020-08-17T21:40:44Z","messageCount":36,"participants":["Jeff King","Taylor Blau","Derrick Stolee","Junio C Hamano","Johannes Schindelin","Emily Shaffer","Jeff Hostetler"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"403548","messageId":"20200813145515.GA891139@coredump.intra.peff.net","threadId":"54035","inReplyTo":null,"subject":"[PATCH 0/5] slimming down installed size","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T14:55:15Z","receivedAt":"2020-08-13T14:55:18Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"A while ago I was looking at the size of an installed (and stripped)\nbuild of Git, and noticed we could make a few more things into builtins.\n\nPatches 2-4 do that.  I don't think there's any real downside here.\nWe're not bringing in any new link dependencies to the main binary. And\neven if these programs don't use all of the code that's in the main\nbinary, operating systems are good at just loading the pages that we do\nneed (and you're probably running other Git programs anyway, which means\nthe main binary is in RAM anyway and we're actually reducing the overall\nmemory footprint).\n\nThe final patch is not strictly related, but it's something I've had\nsitting around for a long time. I actually posted it almost exactly two\nyears ago:\n\n  https://lore.kernel.org/git/20180817190310.GA5360@sigill.intra.peff.net/\n\nwhich ended with Jonathan saying:\n\n>  - keeping this in-tree for the benefit of just one user is excessive,\n>    so removing it is probably the right thing\n> \n>  - it would be nice if the commit removing this code from Git includes\n>    a note to help people find its new home\n> \n> Would you mind holding off until I'm able to arrange that last bit?\n\nSo...I held off for a bit, but I'd really like to be done with this (and\nI prefer dropping the code, because I have a few other tree-wide\ncleanups for which I'd just as soon not have to deal with vcs-svn).\n\n  [1/5]: Makefile: drop builtins from MSVC pdb list\n  [2/5]: make credential helpers builtins\n  [3/5]: make git-bugreport a builtin\n  [4/5]: make git-fast-import a builtin\n  [5/5]: drop vcs-svn experiment\n\n .gitignore                                    |    1 -\n Makefile                                      |   45 +-\n builtin.h                                     |    5 +\n bugreport.c => builtin/bugreport.c            |   10 +-\n .../credential-cache--daemon.c                |   29 +-\n .../credential-cache.c                        |   29 +-\n .../credential-store.c                        |    6 +-\n fast-import.c => builtin/fast-import.c        |    3 +-\n contrib/buildsystems/CMakeLists.txt           |   52 +-\n contrib/svn-fe/.gitignore                     |    4 -\n contrib/svn-fe/Makefile                       |  105 --\n contrib/svn-fe/svn-fe.c                       |   18 -\n contrib/svn-fe/svn-fe.txt                     |   71 --\n contrib/svn-fe/svnrdump_sim.py                |   68 -\n git.c                                         |    5 +\n remote-testsvn.c                              |  341 -----\n t/helper/.gitignore                           |    2 -\n t/helper/test-line-buffer.c                   |   81 --\n t/helper/test-svn-fe.c                        |   52 -\n t/t0081-line-buffer.sh                        |   90 --\n t/t9010-svn-fe.sh                             | 1105 -----------------\n t/t9011-svn-da.sh                             |  248 ----\n t/t9020-remote-svn.sh                         |   95 --\n t/test-lib-functions.sh                       |    2 +-\n vcs-svn/LICENSE                               |   32 -\n vcs-svn/fast_export.c                         |  365 ------\n vcs-svn/line_buffer.c                         |  126 --\n vcs-svn/line_buffer.txt                       |   77 --\n vcs-svn/sliding_window.c                      |   79 --\n vcs-svn/svndiff.c                             |  309 -----\n vcs-svn/svndump.c                             |  540 --------\n 31 files changed, 80 insertions(+), 3915 deletions(-)\n rename bugreport.c => builtin/bugreport.c (96%)\n rename credential-cache--daemon.c => builtin/credential-cache--daemon.c (91%)\n rename credential-cache.c => builtin/credential-cache.c (83%)\n rename credential-store.c => builtin/credential-store.c (96%)\n rename fast-import.c => builtin/fast-import.c (99%)\n delete mode 100644 contrib/svn-fe/.gitignore\n delete mode 100644 contrib/svn-fe/Makefile\n delete mode 100644 contrib/svn-fe/svn-fe.c\n delete mode 100644 contrib/svn-fe/svn-fe.txt\n delete mode 100755 contrib/svn-fe/svnrdump_sim.py\n delete mode 100644 remote-testsvn.c\n delete mode 100644 t/helper/test-line-buffer.c\n delete mode 100644 t/helper/test-svn-fe.c\n delete mode 100755 t/t0081-line-buffer.sh\n delete mode 100755 t/t9010-svn-fe.sh\n delete mode 100755 t/t9011-svn-da.sh\n delete mode 100755 t/t9020-remote-svn.sh\n delete mode 100644 vcs-svn/LICENSE\n delete mode 100644 vcs-svn/fast_export.c\n delete mode 100644 vcs-svn/line_buffer.c\n delete mode 100644 vcs-svn/line_buffer.txt\n delete mode 100644 vcs-svn/sliding_window.c\n delete mode 100644 vcs-svn/svndiff.c\n delete mode 100644 vcs-svn/svndump.c\n\n"},{"id":"403549","messageId":"20200813145719.GA891370@coredump.intra.peff.net","threadId":"54035","inReplyTo":"20200813145515.GA891139@coredump.intra.peff.net","subject":"[PATCH 1/5] Makefile: drop builtins from MSVC pdb list","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T14:57:19Z","receivedAt":"2020-08-13T14:57:21Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Over the years some more programs have become builtins, but nobody\nupdated this MSVC-specific section of the file (which specifically says\nthat it should not include builtins). Let's bring it up to date.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nGiven that nobody has mentioned this, it makes me wonder if anybody is\neven using this part of the Makefile at all these days. Or maybe having\nextra lines here isn't a problem (though it's also missing some entries,\nlike one for git-bugreport).\n\n Makefile | 2 --\n 1 file changed, 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 65f8cfb236..271b96348e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2901,7 +2901,6 @@ ifdef MSVC\n \t# because it is just a copy/hardlink of git.exe, rather than a unique binary.\n \t$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n-\t$(INSTALL) git-upload-pack.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n@@ -2912,7 +2911,6 @@ ifdef MSVC\n \t$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n-\t$(INSTALL) git-show-index.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n ifndef DEBUG\n \t$(INSTALL) $(vcpkg_rel_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) $(vcpkg_rel_bin)/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n-- \n2.28.0.573.gec6564704b\n\n"},{"id":"403550","messageId":"20200813145855.GB891370@coredump.intra.peff.net","threadId":"54035","inReplyTo":"20200813145515.GA891139@coredump.intra.peff.net","subject":"[PATCH 2/5] make credential helpers builtins","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T14:58:55Z","receivedAt":"2020-08-13T14:58:59Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"There's no real reason for credential helpers to be separate binaries. I\ndid them this way originally under the notion that helper don't _need_\nto be part of Git, and so can be built totally separately (and indeed,\nthe ones in contrib/credential are). But the ones in our main Makefile\nbuild on libgit.a, and the resulting binaries are reasonably large.\n\nWe can slim down our total disk footprint by just making them builtins.\nThis reduces the size of:\n\n  make strip install\n\nfrom 29MB to 24MB on my Debian system.\n\nNote that credential-cache can't operate without support for Unix\nsockets. Currently we just don't build it at all when NO_UNIX_SOCKETS is\nset. We could continue that with conditionals in the Makefile and our\nlist of builtins. But instead, let's build a dummy implementation that\ndies with an informative message. That has two advantages:\n\n  - it's simpler, because the conditional bits are all kept inside\n    the credential-cache source\n\n  - a user who is expecting it to exist will be told _why_ they can't\n    use it, rather than getting the \"credential-cache is not a git\n    command\" error which makes it look like the Git install is broken.\n\nNote that our dummy implementation does still respond to \"-h\" in order\nto appease t0012 (and this may be a little friendlier for users, as\nwell).\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Makefile                                      |  8 ++---\n builtin.h                                     |  3 ++\n .../credential-cache--daemon.c                | 29 ++++++++++++++++---\n .../credential-cache.c                        | 29 ++++++++++++++++---\n .../credential-store.c                        |  6 ++--\n contrib/buildsystems/CMakeLists.txt           | 20 +------------\n git.c                                         |  3 ++\n 7 files changed, 63 insertions(+), 35 deletions(-)\n rename credential-cache--daemon.c => builtin/credential-cache--daemon.c (91%)\n rename credential-cache.c => builtin/credential-cache.c (83%)\n rename credential-store.c => builtin/credential-store.c (96%)\n\ndiff --git a/Makefile b/Makefile\nindex 271b96348e..5b43c0fafb 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -672,7 +672,6 @@ EXTRA_PROGRAMS =\n PROGRAMS += $(EXTRA_PROGRAMS)\n \n PROGRAM_OBJS += bugreport.o\n-PROGRAM_OBJS += credential-store.o\n PROGRAM_OBJS += daemon.o\n PROGRAM_OBJS += fast-import.o\n PROGRAM_OBJS += http-backend.o\n@@ -1052,6 +1051,9 @@ BUILTIN_OBJS += builtin/checkout-index.o\n BUILTIN_OBJS += builtin/checkout.o\n BUILTIN_OBJS += builtin/clean.o\n BUILTIN_OBJS += builtin/clone.o\n+BUILTIN_OBJS += builtin/credential-cache.o\n+BUILTIN_OBJS += builtin/credential-cache--daemon.o\n+BUILTIN_OBJS += builtin/credential-store.o\n BUILTIN_OBJS += builtin/column.o\n BUILTIN_OBJS += builtin/commit-graph.o\n BUILTIN_OBJS += builtin/commit-tree.o\n@@ -1634,11 +1636,8 @@ ifdef NO_INET_PTON\n endif\n ifdef NO_UNIX_SOCKETS\n \tBASIC_CFLAGS += -DNO_UNIX_SOCKETS\n-\tEXCLUDED_PROGRAMS += git-credential-cache git-credential-cache--daemon\n else\n \tLIB_OBJS += unix-socket.o\n-\tPROGRAM_OBJS += credential-cache.o\n-\tPROGRAM_OBJS += credential-cache--daemon.o\n endif\n \n ifdef NO_ICONV\n@@ -2901,7 +2900,6 @@ ifdef MSVC\n \t# because it is just a copy/hardlink of git.exe, rather than a unique binary.\n \t$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n-\t$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\ndiff --git a/builtin.h b/builtin.h\nindex a5ae15bfe5..4a0aed5448 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -138,6 +138,9 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix);\n int cmd_config(int argc, const char **argv, const char *prefix);\n int cmd_count_objects(int argc, const char **argv, const char *prefix);\n int cmd_credential(int argc, const char **argv, const char *prefix);\n+int cmd_credential_cache(int argc, const char **argv, const char *prefix);\n+int cmd_credential_cache_daemon(int argc, const char **argv, const char *prefix);\n+int cmd_credential_store(int argc, const char **argv, const char *prefix);\n int cmd_describe(int argc, const char **argv, const char *prefix);\n int cmd_diff_files(int argc, const char **argv, const char *prefix);\n int cmd_diff_index(int argc, const char **argv, const char *prefix);\ndiff --git a/credential-cache--daemon.c b/builtin/credential-cache--daemon.c\nsimilarity index 91%\nrename from credential-cache--daemon.c\nrename to builtin/credential-cache--daemon.c\nindex ec1271f89c..c61f123a3b 100644\n--- a/credential-cache--daemon.c\n+++ b/builtin/credential-cache--daemon.c\n@@ -1,9 +1,12 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n+#include \"parse-options.h\"\n+\n+#ifndef NO_UNIX_SOCKETS\n+\n #include \"config.h\"\n #include \"tempfile.h\"\n #include \"credential.h\"\n #include \"unix-socket.h\"\n-#include \"parse-options.h\"\n \n struct credential_cache_entry {\n \tstruct credential item;\n@@ -257,7 +260,7 @@ static void init_socket_directory(const char *path)\n \tfree(path_copy);\n }\n \n-int cmd_main(int argc, const char **argv)\n+int cmd_credential_cache_daemon(int argc, const char **argv, const char *prefix)\n {\n \tstruct tempfile *socket_file;\n \tconst char *socket_path;\n@@ -275,7 +278,7 @@ int cmd_main(int argc, const char **argv)\n \n \tgit_config_get_bool(\"credentialcache.ignoresighup\", &ignore_sighup);\n \n-\targc = parse_options(argc, argv, NULL, options, usage, 0);\n+\targc = parse_options(argc, argv, prefix, options, usage, 0);\n \tsocket_path = argv[0];\n \n \tif (!socket_path)\n@@ -295,3 +298,21 @@ int cmd_main(int argc, const char **argv)\n \n \treturn 0;\n }\n+\n+#else\n+\n+int cmd_credential_cache_daemon(int argc, const char **argv, const char *prefix)\n+{\n+\tconst char * const usage[] = {\n+\t\t\"git credential-cache--daemon [options] <action>\",\n+\t\t\"\",\n+\t\t\"credential-cache--daemon is disabled in this build of Git\",\n+\t\tNULL\n+\t};\n+\tstruct option options[] = { OPT_END() };\n+\n+\targc = parse_options(argc, argv, prefix, options, usage, 0);\n+\tdie(_(\"credential-cache--daemon unavailable; no unix socket support\"));\n+}\n+\n+#endif /* NO_UNIX_SOCKET */\ndiff --git a/credential-cache.c b/builtin/credential-cache.c\nsimilarity index 83%\nrename from credential-cache.c\nrename to builtin/credential-cache.c\nindex 1cccc3a0b9..d0fafdeb9e 100644\n--- a/credential-cache.c\n+++ b/builtin/credential-cache.c\n@@ -1,7 +1,10 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n+#include \"parse-options.h\"\n+\n+#ifndef NO_UNIX_SOCKETS\n+\n #include \"credential.h\"\n #include \"string-list.h\"\n-#include \"parse-options.h\"\n #include \"unix-socket.h\"\n #include \"run-command.h\"\n \n@@ -96,7 +99,7 @@ static char *get_socket_path(void)\n \treturn socket;\n }\n \n-int cmd_main(int argc, const char **argv)\n+int cmd_credential_cache(int argc, const char **argv, const char *prefix)\n {\n \tchar *socket_path = NULL;\n \tint timeout = 900;\n@@ -113,7 +116,7 @@ int cmd_main(int argc, const char **argv)\n \t\tOPT_END()\n \t};\n \n-\targc = parse_options(argc, argv, NULL, options, usage, 0);\n+\targc = parse_options(argc, argv, prefix, options, usage, 0);\n \tif (!argc)\n \t\tusage_with_options(usage, options);\n \top = argv[0];\n@@ -134,3 +137,21 @@ int cmd_main(int argc, const char **argv)\n \n \treturn 0;\n }\n+\n+#else\n+\n+int cmd_credential_cache(int argc, const char **argv, const char *prefix)\n+{\n+\tconst char * const usage[] = {\n+\t\t\"git credential-cache [options] <action>\",\n+\t\t\"\",\n+\t\t\"credential-cache is disabled in this build of Git\",\n+\t\tNULL\n+\t};\n+\tstruct option options[] = { OPT_END() };\n+\n+\targc = parse_options(argc, argv, prefix, options, usage, 0);\n+\tdie(_(\"credential-cache unavailable; no unix socket support\"));\n+}\n+\n+#endif /* NO_UNIX_SOCKETS */\ndiff --git a/credential-store.c b/builtin/credential-store.c\nsimilarity index 96%\nrename from credential-store.c\nrename to builtin/credential-store.c\nindex 294e771681..5331ab151a 100644\n--- a/credential-store.c\n+++ b/builtin/credential-store.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"lockfile.h\"\n #include \"credential.h\"\n #include \"string-list.h\"\n@@ -143,7 +143,7 @@ static void lookup_credential(const struct string_list *fns, struct credential *\n \t\t\treturn; /* Found credential */\n }\n \n-int cmd_main(int argc, const char **argv)\n+int cmd_credential_store(int argc, const char **argv, const char *prefix)\n {\n \tconst char * const usage[] = {\n \t\t\"git credential-store [<options>] <action>\",\n@@ -161,7 +161,7 @@ int cmd_main(int argc, const char **argv)\n \n \tumask(077);\n \n-\targc = parse_options(argc, (const char **)argv, NULL, options, usage, 0);\n+\targc = parse_options(argc, (const char **)argv, prefix, options, usage, 0);\n \tif (argc != 1)\n \t\tusage_with_options(usage, options);\n \top = argv[0];\ndiff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\nindex 47215df25b..4be61247e5 100644\n--- a/contrib/buildsystems/CMakeLists.txt\n+++ b/contrib/buildsystems/CMakeLists.txt\n@@ -501,15 +501,9 @@ unset(CMAKE_REQUIRED_INCLUDES)\n \n #programs\n set(PROGRAMS_BUILT\n-\tgit git-bugreport git-credential-store git-daemon git-fast-import git-http-backend git-sh-i18n--envsubst\n+\tgit git-bugreport git-daemon git-fast-import git-http-backend git-sh-i18n--envsubst\n \tgit-shell git-remote-testsvn)\n \n-if(NO_UNIX_SOCKETS)\n-\tlist(APPEND excluded_progs git-credential-cache git-credential-cache--daemon)\n-else()\n-\tlist(APPEND PROGRAMS_BUILT git-credential-cache git-credential-cache--daemon)\n-endif()\n-\n if(NOT CURL_FOUND)\n \tlist(APPEND excluded_progs git-http-fetch git-http-push)\n \tadd_compile_definitions(NO_CURL)\n@@ -633,9 +627,6 @@ target_link_libraries(git common-main)\n add_executable(git-bugreport ${CMAKE_SOURCE_DIR}/bugreport.c)\n target_link_libraries(git-bugreport common-main)\n \n-add_executable(git-credential-store ${CMAKE_SOURCE_DIR}/credential-store.c)\n-target_link_libraries(git-credential-store common-main)\n-\n add_executable(git-daemon ${CMAKE_SOURCE_DIR}/daemon.c)\n target_link_libraries(git-daemon common-main)\n \n@@ -672,15 +663,6 @@ endif()\n add_executable(git-remote-testsvn ${CMAKE_SOURCE_DIR}/remote-testsvn.c)\n target_link_libraries(git-remote-testsvn common-main vcs-svn)\n \n-if(NOT NO_UNIX_SOCKETS)\n-\tadd_executable(git-credential-cache ${CMAKE_SOURCE_DIR}/credential-cache.c)\n-\ttarget_link_libraries(git-credential-cache common-main)\n-\n-\tadd_executable(git-credential-cache--daemon ${CMAKE_SOURCE_DIR}/credential-cache--daemon.c)\n-\ttarget_link_libraries(git-credential-cache--daemon common-main)\n-endif()\n-\n-\n set(git_builtin_extra\n \tcherry cherry-pick format-patch fsck-objects\n \tinit merge-subtree restore show\ndiff --git a/git.c b/git.c\nindex 8bd1d7551d..39a160fa52 100644\n--- a/git.c\n+++ b/git.c\n@@ -499,6 +499,9 @@ static struct cmd_struct commands[] = {\n \t{ \"config\", cmd_config, RUN_SETUP_GENTLY | DELAY_PAGER_CONFIG },\n \t{ \"count-objects\", cmd_count_objects, RUN_SETUP },\n \t{ \"credential\", cmd_credential, RUN_SETUP_GENTLY | NO_PARSEOPT },\n+\t{ \"credential-cache\", cmd_credential_cache },\n+\t{ \"credential-cache--daemon\", cmd_credential_cache_daemon },\n+\t{ \"credential-store\", cmd_credential_store },\n \t{ \"describe\", cmd_describe, RUN_SETUP },\n \t{ \"diff\", cmd_diff, NO_PARSEOPT },\n \t{ \"diff-files\", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE | NO_PARSEOPT },\n-- \n2.28.0.573.gec6564704b\n\n"},{"id":"403551","messageId":"20200813145936.GC891370@coredump.intra.peff.net","threadId":"54035","inReplyTo":"20200813145515.GA891139@coredump.intra.peff.net","subject":"[PATCH 3/5] make git-bugreport a builtin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T14:59:36Z","receivedAt":"2020-08-13T14:59:38Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"There's no reason that bugreport has to be a separate binary. And since\nit links against libgit.a, it has a rather large disk footprint. Let's\nmake it a builtin, which reduces the size of a stripped installation\nfrom 24MB to 22MB.\n\nThis also simplifies our Makefile a bit. And we can take advantage of\nbuiltin niceties like RUN_SETUP_GENTLY.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Makefile                            |  6 +-----\n builtin.h                           |  1 +\n bugreport.c => builtin/bugreport.c  | 10 +++-------\n contrib/buildsystems/CMakeLists.txt |  5 +----\n git.c                               |  1 +\n 5 files changed, 7 insertions(+), 16 deletions(-)\n rename bugreport.c => builtin/bugreport.c (96%)\n\ndiff --git a/Makefile b/Makefile\nindex 5b43c0fafb..acaff6968b 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -671,7 +671,6 @@ EXTRA_PROGRAMS =\n # ... and all the rest that could be moved out of bindir to gitexecdir\n PROGRAMS += $(EXTRA_PROGRAMS)\n \n-PROGRAM_OBJS += bugreport.o\n PROGRAM_OBJS += daemon.o\n PROGRAM_OBJS += fast-import.o\n PROGRAM_OBJS += http-backend.o\n@@ -1041,6 +1040,7 @@ BUILTIN_OBJS += builtin/archive.o\n BUILTIN_OBJS += builtin/bisect--helper.o\n BUILTIN_OBJS += builtin/blame.o\n BUILTIN_OBJS += builtin/branch.o\n+BUILTIN_OBJS += builtin/bugreport.o\n BUILTIN_OBJS += builtin/bundle.o\n BUILTIN_OBJS += builtin/cat-file.o\n BUILTIN_OBJS += builtin/check-attr.o\n@@ -2458,10 +2458,6 @@ endif\n git-%$X: %.o GIT-LDFLAGS $(GITLIBS)\n \t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)\n \n-git-bugreport$X: bugreport.o GIT-LDFLAGS $(GITLIBS)\n-\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n-\t\t$(LIBS)\n-\n git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS)\n \t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n \t\t$(IMAP_SEND_LDFLAGS) $(LIBS)\ndiff --git a/builtin.h b/builtin.h\nindex 4a0aed5448..1e78d6c142 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -119,6 +119,7 @@ int cmd_archive(int argc, const char **argv, const char *prefix);\n int cmd_bisect__helper(int argc, const char **argv, const char *prefix);\n int cmd_blame(int argc, const char **argv, const char *prefix);\n int cmd_branch(int argc, const char **argv, const char *prefix);\n+int cmd_bugreport(int argc, const char **argv, const char *prefix);\n int cmd_bundle(int argc, const char **argv, const char *prefix);\n int cmd_cat_file(int argc, const char **argv, const char *prefix);\n int cmd_checkout(int argc, const char **argv, const char *prefix);\ndiff --git a/bugreport.c b/builtin/bugreport.c\nsimilarity index 96%\nrename from bugreport.c\nrename to builtin/bugreport.c\nindex 09579e268d..9c920cc065 100644\n--- a/bugreport.c\n+++ b/builtin/bugreport.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"parse-options.h\"\n #include \"strbuf.h\"\n #include \"help.h\"\n@@ -119,16 +119,14 @@ static void get_header(struct strbuf *buf, const char *title)\n \tstrbuf_addf(buf, \"\\n\\n[%s]\\n\", title);\n }\n \n-int cmd_main(int argc, const char **argv)\n+int cmd_bugreport(int argc, const char **argv, const char *prefix)\n {\n \tstruct strbuf buffer = STRBUF_INIT;\n \tstruct strbuf report_path = STRBUF_INIT;\n \tint report = -1;\n \ttime_t now = time(NULL);\n \tchar *option_output = NULL;\n \tchar *option_suffix = \"%Y-%m-%d-%H%M\";\n-\tint nongit_ok = 0;\n-\tconst char *prefix = NULL;\n \tconst char *user_relative_path = NULL;\n \n \tconst struct option bugreport_options[] = {\n@@ -139,8 +137,6 @@ int cmd_main(int argc, const char **argv)\n \t\tOPT_END()\n \t};\n \n-\tprefix = setup_git_directory_gently(&nongit_ok);\n-\n \targc = parse_options(argc, argv, prefix, bugreport_options,\n \t\t\t     bugreport_usage, 0);\n \n@@ -170,7 +166,7 @@ int cmd_main(int argc, const char **argv)\n \tget_system_info(&buffer);\n \n \tget_header(&buffer, _(\"Enabled Hooks\"));\n-\tget_populated_hooks(&buffer, nongit_ok);\n+\tget_populated_hooks(&buffer, !startup_info->have_repository);\n \n \t/* fopen doesn't offer us an O_EXCL alternative, except with glibc. */\n \treport = open(report_path.buf, O_CREAT | O_EXCL | O_WRONLY, 0666);\ndiff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\nindex 4be61247e5..3e211606fd 100644\n--- a/contrib/buildsystems/CMakeLists.txt\n+++ b/contrib/buildsystems/CMakeLists.txt\n@@ -501,7 +501,7 @@ unset(CMAKE_REQUIRED_INCLUDES)\n \n #programs\n set(PROGRAMS_BUILT\n-\tgit git-bugreport git-daemon git-fast-import git-http-backend git-sh-i18n--envsubst\n+\tgit git-daemon git-fast-import git-http-backend git-sh-i18n--envsubst\n \tgit-shell git-remote-testsvn)\n \n if(NOT CURL_FOUND)\n@@ -624,9 +624,6 @@ list(TRANSFORM git_SOURCES PREPEND \"${CMAKE_SOURCE_DIR}/\")\n add_executable(git ${CMAKE_SOURCE_DIR}/git.c ${git_SOURCES})\n target_link_libraries(git common-main)\n \n-add_executable(git-bugreport ${CMAKE_SOURCE_DIR}/bugreport.c)\n-target_link_libraries(git-bugreport common-main)\n-\n add_executable(git-daemon ${CMAKE_SOURCE_DIR}/daemon.c)\n target_link_libraries(git-daemon common-main)\n \ndiff --git a/git.c b/git.c\nindex 39a160fa52..bf790e7f4f 100644\n--- a/git.c\n+++ b/git.c\n@@ -479,6 +479,7 @@ static struct cmd_struct commands[] = {\n \t{ \"bisect--helper\", cmd_bisect__helper, RUN_SETUP },\n \t{ \"blame\", cmd_blame, RUN_SETUP },\n \t{ \"branch\", cmd_branch, RUN_SETUP | DELAY_PAGER_CONFIG },\n+\t{ \"bugreport\", cmd_bugreport, RUN_SETUP_GENTLY },\n \t{ \"bundle\", cmd_bundle, RUN_SETUP_GENTLY | NO_PARSEOPT },\n \t{ \"cat-file\", cmd_cat_file, RUN_SETUP },\n \t{ \"check-attr\", cmd_check_attr, RUN_SETUP },\n-- \n2.28.0.573.gec6564704b\n\n"},{"id":"403552","messageId":"20200813145945.GD891370@coredump.intra.peff.net","threadId":"54035","inReplyTo":"20200813145515.GA891139@coredump.intra.peff.net","subject":"[PATCH 4/5] make git-fast-import a builtin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T14:59:45Z","receivedAt":"2020-08-13T14:59:51Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"There's no reason that git-fast-import benefits from being a separate\nbinary. And as it links against libgit.a, it has a non-trivial disk\nfootprint. Let's make it a builtin, which reduces the size of a stripped\ninstallation from 22MB to 21MB.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Makefile                               | 3 +--\n builtin.h                              | 1 +\n fast-import.c => builtin/fast-import.c | 3 +--\n contrib/buildsystems/CMakeLists.txt    | 5 +----\n git.c                                  | 1 +\n 5 files changed, 5 insertions(+), 8 deletions(-)\n rename fast-import.c => builtin/fast-import.c (99%)\n\ndiff --git a/Makefile b/Makefile\nindex acaff6968b..2b821fc762 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -672,7 +672,6 @@ EXTRA_PROGRAMS =\n PROGRAMS += $(EXTRA_PROGRAMS)\n \n PROGRAM_OBJS += daemon.o\n-PROGRAM_OBJS += fast-import.o\n PROGRAM_OBJS += http-backend.o\n PROGRAM_OBJS += imap-send.o\n PROGRAM_OBJS += remote-testsvn.o\n@@ -1069,6 +1068,7 @@ BUILTIN_OBJS += builtin/diff.o\n BUILTIN_OBJS += builtin/difftool.o\n BUILTIN_OBJS += builtin/env--helper.o\n BUILTIN_OBJS += builtin/fast-export.o\n+BUILTIN_OBJS += builtin/fast-import.o\n BUILTIN_OBJS += builtin/fetch-pack.o\n BUILTIN_OBJS += builtin/fetch.o\n BUILTIN_OBJS += builtin/fmt-merge-msg.o\n@@ -2897,7 +2897,6 @@ ifdef MSVC\n \t$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n-\t$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\ndiff --git a/builtin.h b/builtin.h\nindex 1e78d6c142..ba954e180c 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -150,6 +150,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix);\n int cmd_difftool(int argc, const char **argv, const char *prefix);\n int cmd_env__helper(int argc, const char **argv, const char *prefix);\n int cmd_fast_export(int argc, const char **argv, const char *prefix);\n+int cmd_fast_import(int argc, const char **argv, const char *prefix);\n int cmd_fetch(int argc, const char **argv, const char *prefix);\n int cmd_fetch_pack(int argc, const char **argv, const char *prefix);\n int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix);\ndiff --git a/fast-import.c b/builtin/fast-import.c\nsimilarity index 99%\nrename from fast-import.c\nrename to builtin/fast-import.c\nindex ce47794db6..8cc5d09c64 100644\n--- a/fast-import.c\n+++ b/builtin/fast-import.c\n@@ -3519,14 +3519,13 @@ static void parse_argv(void)\n \tbuild_mark_map(&sub_marks_from, &sub_marks_to);\n }\n \n-int cmd_main(int argc, const char **argv)\n+int cmd_fast_import(int argc, const char **argv, const char *prefix)\n {\n \tunsigned int i;\n \n \tif (argc == 2 && !strcmp(argv[1], \"-h\"))\n \t\tusage(fast_import_usage);\n \n-\tsetup_git_directory();\n \treset_pack_idx_option(&pack_idx_opts);\n \tgit_pack_config();\n \ndiff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\nindex 3e211606fd..4a6f135b16 100644\n--- a/contrib/buildsystems/CMakeLists.txt\n+++ b/contrib/buildsystems/CMakeLists.txt\n@@ -501,7 +501,7 @@ unset(CMAKE_REQUIRED_INCLUDES)\n \n #programs\n set(PROGRAMS_BUILT\n-\tgit git-daemon git-fast-import git-http-backend git-sh-i18n--envsubst\n+\tgit git-daemon git-http-backend git-sh-i18n--envsubst\n \tgit-shell git-remote-testsvn)\n \n if(NOT CURL_FOUND)\n@@ -627,9 +627,6 @@ target_link_libraries(git common-main)\n add_executable(git-daemon ${CMAKE_SOURCE_DIR}/daemon.c)\n target_link_libraries(git-daemon common-main)\n \n-add_executable(git-fast-import ${CMAKE_SOURCE_DIR}/fast-import.c)\n-target_link_libraries(git-fast-import common-main)\n-\n add_executable(git-http-backend ${CMAKE_SOURCE_DIR}/http-backend.c)\n target_link_libraries(git-http-backend common-main)\n \ndiff --git a/git.c b/git.c\nindex bf790e7f4f..01c456edce 100644\n--- a/git.c\n+++ b/git.c\n@@ -511,6 +511,7 @@ static struct cmd_struct commands[] = {\n \t{ \"difftool\", cmd_difftool, RUN_SETUP_GENTLY },\n \t{ \"env--helper\", cmd_env__helper },\n \t{ \"fast-export\", cmd_fast_export, RUN_SETUP },\n+\t{ \"fast-import\", cmd_fast_import, RUN_SETUP | NO_PARSEOPT },\n \t{ \"fetch\", cmd_fetch, RUN_SETUP },\n \t{ \"fetch-pack\", cmd_fetch_pack, RUN_SETUP | NO_PARSEOPT },\n \t{ \"fmt-merge-msg\", cmd_fmt_merge_msg, RUN_SETUP },\n-- \n2.28.0.573.gec6564704b\n\n"},{"id":"403553","messageId":"20200813150017.GE891370@coredump.intra.peff.net","threadId":"54035","inReplyTo":"20200813145515.GA891139@coredump.intra.peff.net","subject":"[PATCH 5/5] drop vcs-svn experiment","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T15:00:17Z","receivedAt":"2020-08-13T15:00:26Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The code in vcs-svn was started in 2010 as an attempt to build a\nremote-helper for interacting with svn repositories (as opposed to\ngit-svn). However, we never got as far as shipping a mature remote\nhelper, and the last substantive commit was e99d012a6bc in 2012.\n\nWe do have a git-remote-testsvn, and it is even installed as part of\n\"make install\". But given the name, it seems unlikely to be used by\nanybody (you'd have to explicitly \"git clone testsvn::$url\", and there\nhave been zero mentions of that on the mailing list since 2013, and even\nthat includes the phrase \"you might need to hack a bit to get it working\nproperly\"[1]).\n\nWe also ship contrib/svn-fe, which builds on the vcs-svn work. However,\nit does not seem to build out of the box for me, as the link step misses\nsome required libraries for using libgit.a. Curiously, the original\nbuild breakage bisects for me to eff80a9fd9 (Allow custom \"comment\nchar\", 2013-01-16), which seems unrelated. There was an attempt to fix\nit in da011cb0e7 (contrib/svn-fe: fix Makefile, 2014-08-28), but on my\nsystem that only switches the error message.\n\nSo it seems like the result is not really usable by anybody in practice.\nIt would be wonderful if somebody wanted to pick up the topic again, and\npotentially it's worth carrying around for that reason. But the flip\nside is that people doing tree-wide operations have to deal with this\ncode.  And you can see the list with (replace \"HEAD\" with this commit as\nappropriate):\n\n  {\n    echo \"--\"\n    git diff-tree --diff-filter=D -r --name-only HEAD^ HEAD\n  } |\n  git log --no-merges --oneline e99d012a6bc.. --stdin\n\nwhich shows 58 times somebody had to deal with the code, generally due\nto a compile or test failure, or a tree-wide style fix or API change.\nLet's drop it and let anybody who wants to pick it up do so by\nresurrecting it from the git history.\n\nAs a bonus, this also reduces the size of a stripped installation of Git\nfrom 21MB to 19MB.\n\n[1] https://lore.kernel.org/git/CALkWK0mPHzKfzFKKpZkfAus3YVC9NFYDbFnt+5JQYVKipk3bQQ@mail.gmail.com/\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n .gitignore                          |    1 -\n Makefile                            |   26 +-\n contrib/buildsystems/CMakeLists.txt |   26 +-\n contrib/svn-fe/.gitignore           |    4 -\n contrib/svn-fe/Makefile             |  105 ---\n contrib/svn-fe/svn-fe.c             |   18 -\n contrib/svn-fe/svn-fe.txt           |   71 --\n contrib/svn-fe/svnrdump_sim.py      |   68 --\n remote-testsvn.c                    |  341 ---------\n t/helper/.gitignore                 |    2 -\n t/helper/test-line-buffer.c         |   81 --\n t/helper/test-svn-fe.c              |   52 --\n t/t0081-line-buffer.sh              |   90 ---\n t/t9010-svn-fe.sh                   | 1105 ---------------------------\n t/t9011-svn-da.sh                   |  248 ------\n t/t9020-remote-svn.sh               |   95 ---\n t/test-lib-functions.sh             |    2 +-\n vcs-svn/LICENSE                     |   32 -\n vcs-svn/fast_export.c               |  365 ---------\n vcs-svn/line_buffer.c               |  126 ---\n vcs-svn/line_buffer.txt             |   77 --\n vcs-svn/sliding_window.c            |   79 --\n vcs-svn/svndiff.c                   |  309 --------\n vcs-svn/svndump.c                   |  540 -------------\n 24 files changed, 7 insertions(+), 3856 deletions(-)\n delete mode 100644 contrib/svn-fe/.gitignore\n delete mode 100644 contrib/svn-fe/Makefile\n delete mode 100644 contrib/svn-fe/svn-fe.c\n delete mode 100644 contrib/svn-fe/svn-fe.txt\n delete mode 100755 contrib/svn-fe/svnrdump_sim.py\n delete mode 100644 remote-testsvn.c\n delete mode 100644 t/helper/test-line-buffer.c\n delete mode 100644 t/helper/test-svn-fe.c\n delete mode 100755 t/t0081-line-buffer.sh\n delete mode 100755 t/t9010-svn-fe.sh\n delete mode 100755 t/t9011-svn-da.sh\n delete mode 100755 t/t9020-remote-svn.sh\n delete mode 100644 vcs-svn/LICENSE\n delete mode 100644 vcs-svn/fast_export.c\n delete mode 100644 vcs-svn/line_buffer.c\n delete mode 100644 vcs-svn/line_buffer.txt\n delete mode 100644 vcs-svn/sliding_window.c\n delete mode 100644 vcs-svn/svndiff.c\n delete mode 100644 vcs-svn/svndump.c\n\ndiff --git a/.gitignore b/.gitignore\nindex ee509a2ad2..9673e792db 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -134,7 +134,6 @@\n /git-remote-fd\n /git-remote-ext\n /git-remote-testpy\n-/git-remote-testsvn\n /git-repack\n /git-replace\n /git-request-pull\ndiff --git a/Makefile b/Makefile\nindex 2b821fc762..314179d918 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -569,7 +569,6 @@ BUILT_INS =\n COMPAT_CFLAGS =\n COMPAT_OBJS =\n XDIFF_OBJS =\n-VCSSVN_OBJS =\n GENERATED_H =\n EXTRA_CPPFLAGS =\n FUZZ_OBJS =\n@@ -674,7 +673,6 @@ PROGRAMS += $(EXTRA_PROGRAMS)\n PROGRAM_OBJS += daemon.o\n PROGRAM_OBJS += http-backend.o\n PROGRAM_OBJS += imap-send.o\n-PROGRAM_OBJS += remote-testsvn.o\n PROGRAM_OBJS += sh-i18n--envsubst.o\n PROGRAM_OBJS += shell.o\n \n@@ -746,8 +744,6 @@ TEST_BUILTINS_OBJS += test-xml-encode.o\n # Do not add more tests here unless they have extra dependencies. Add\n # them in TEST_BUILTINS_OBJS above.\n TEST_PROGRAMS_NEED_X += test-fake-ssh\n-TEST_PROGRAMS_NEED_X += test-line-buffer\n-TEST_PROGRAMS_NEED_X += test-svn-fe\n TEST_PROGRAMS_NEED_X += test-tool\n \n TEST_PROGRAMS = $(patsubst %,t/helper/%$X,$(TEST_PROGRAMS_NEED_X))\n@@ -803,7 +799,6 @@ TEST_SHELL_PATH = $(SHELL_PATH)\n \n LIB_FILE = libgit.a\n XDIFF_LIB = xdiff/lib.a\n-VCSSVN_LIB = vcs-svn/lib.a\n \n GENERATED_H += config-list.h\n GENERATED_H += command-list.h\n@@ -2345,16 +2340,9 @@ XDIFF_OBJS += xdiff/xpatience.o\n XDIFF_OBJS += xdiff/xprepare.o\n XDIFF_OBJS += xdiff/xutils.o\n \n-VCSSVN_OBJS += vcs-svn/fast_export.o\n-VCSSVN_OBJS += vcs-svn/line_buffer.o\n-VCSSVN_OBJS += vcs-svn/sliding_window.o\n-VCSSVN_OBJS += vcs-svn/svndiff.o\n-VCSSVN_OBJS += vcs-svn/svndump.o\n-\n TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))\n OBJECTS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \\\n \t$(XDIFF_OBJS) \\\n-\t$(VCSSVN_OBJS) \\\n \t$(FUZZ_OBJS) \\\n \tcommon-main.o \\\n \tgit.o\n@@ -2469,10 +2457,6 @@ git-http-push$X: http.o http-push.o GIT-LDFLAGS $(GITLIBS)\n \t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n \t\t$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)\n \n-git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB)\n-\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) \\\n-\t$(VCSSVN_LIB)\n-\n $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)\n \t$(QUIET_LNCP)$(RM) $@ && \\\n \tln $< $@ 2>/dev/null || \\\n@@ -2489,9 +2473,6 @@ $(LIB_FILE): $(LIB_OBJS)\n $(XDIFF_LIB): $(XDIFF_OBJS)\n \t$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^\n \n-$(VCSSVN_LIB): $(VCSSVN_OBJS)\n-\t$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^\n-\n export DEFAULT_EDITOR DEFAULT_PAGER\n \n Documentation/GIT-EXCLUDED-PROGRAMS: FORCE\n@@ -2766,10 +2747,6 @@ perf: all\n \n .PHONY: test perf\n \n-t/helper/test-line-buffer$X: $(VCSSVN_LIB)\n-\n-t/helper/test-svn-fe$X: $(VCSSVN_LIB)\n-\n .PRECIOUS: $(TEST_OBJS)\n \n t/helper/test-tool$X: $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))\n@@ -2902,7 +2879,6 @@ ifdef MSVC\n \t$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n-\t$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \t$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n ifndef DEBUG\n \t$(INSTALL) $(vcpkg_rel_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'\n@@ -3103,7 +3079,7 @@ cocciclean:\n clean: profile-clean coverage-clean cocciclean\n \t$(RM) *.res\n \t$(RM) $(OBJECTS)\n-\t$(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)\n+\t$(RM) $(LIB_FILE) $(XDIFF_LIB)\n \t$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X\n \t$(RM) $(TEST_PROGRAMS)\n \t$(RM) $(FUZZ_PROGRAMS)\ndiff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\nindex 4a6f135b16..5007f173f1 100644\n--- a/contrib/buildsystems/CMakeLists.txt\n+++ b/contrib/buildsystems/CMakeLists.txt\n@@ -502,7 +502,7 @@ unset(CMAKE_REQUIRED_INCLUDES)\n #programs\n set(PROGRAMS_BUILT\n \tgit git-daemon git-http-backend git-sh-i18n--envsubst\n-\tgit-shell git-remote-testsvn)\n+\tgit-shell)\n \n if(NOT CURL_FOUND)\n \tlist(APPEND excluded_progs git-http-fetch git-http-push)\n@@ -568,12 +568,6 @@ parse_makefile_for_sources(libxdiff_SOURCES \"XDIFF_OBJS\")\n list(TRANSFORM libxdiff_SOURCES PREPEND \"${CMAKE_SOURCE_DIR}/\")\n add_library(xdiff STATIC ${libxdiff_SOURCES})\n \n-#libvcs-svn\n-parse_makefile_for_sources(libvcs-svn_SOURCES \"VCSSVN_OBJS\")\n-\n-list(TRANSFORM libvcs-svn_SOURCES PREPEND \"${CMAKE_SOURCE_DIR}/\")\n-add_library(vcs-svn STATIC ${libvcs-svn_SOURCES})\n-\n if(WIN32)\n \tif(NOT MSVC)#use windres when compiling with gcc and clang\n \t\tadd_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git.res\n@@ -654,9 +648,6 @@ if(CURL_FOUND)\n \tendif()\n endif()\n \n-add_executable(git-remote-testsvn ${CMAKE_SOURCE_DIR}/remote-testsvn.c)\n-target_link_libraries(git-remote-testsvn common-main vcs-svn)\n-\n set(git_builtin_extra\n \tcherry cherry-pick format-patch fsck-objects\n \tinit merge-subtree restore show\n@@ -832,26 +823,20 @@ if(BUILD_TESTING)\n add_executable(test-fake-ssh ${CMAKE_SOURCE_DIR}/t/helper/test-fake-ssh.c)\n target_link_libraries(test-fake-ssh common-main)\n \n-add_executable(test-line-buffer ${CMAKE_SOURCE_DIR}/t/helper/test-line-buffer.c)\n-target_link_libraries(test-line-buffer common-main vcs-svn)\n-\n-add_executable(test-svn-fe ${CMAKE_SOURCE_DIR}/t/helper/test-svn-fe.c)\n-target_link_libraries(test-svn-fe common-main vcs-svn)\n-\n #test-tool\n parse_makefile_for_sources(test-tool_SOURCES \"TEST_BUILTINS_OBJS\")\n \n list(TRANSFORM test-tool_SOURCES PREPEND \"${CMAKE_SOURCE_DIR}/t/helper/\")\n add_executable(test-tool ${CMAKE_SOURCE_DIR}/t/helper/test-tool.c ${test-tool_SOURCES})\n target_link_libraries(test-tool common-main)\n \n-set_target_properties(test-fake-ssh test-line-buffer test-svn-fe test-tool\n+set_target_properties(test-fake-ssh test-tool\n \t\t\tPROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/t/helper)\n \n if(MSVC)\n-\tset_target_properties(test-fake-ssh test-line-buffer test-svn-fe test-tool\n+\tset_target_properties(test-fake-ssh test-tool\n \t\t\t\tPROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/t/helper)\n-\tset_target_properties(test-fake-ssh test-line-buffer test-svn-fe test-tool\n+\tset_target_properties(test-fake-ssh test-tool\n \t\t\t\tPROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/t/helper)\n endif()\n \n@@ -860,7 +845,7 @@ set(wrapper_scripts\n \tgit git-upload-pack git-receive-pack git-upload-archive git-shell git-remote-ext)\n \n set(wrapper_test_scripts\n-\ttest-fake-ssh test-line-buffer test-svn-fe test-tool)\n+\ttest-fake-ssh test-tool)\n \n \n foreach(script ${wrapper_scripts})\n@@ -961,7 +946,6 @@ if(NOT ${CMAKE_BINARY_DIR}/CMakeCache.txt STREQUAL ${CACHE_PATH})\n \tfile(COPY ${CMAKE_SOURCE_DIR}/mergetools/tkdiff DESTINATION ${CMAKE_BINARY_DIR}/mergetools/)\n \tfile(COPY ${CMAKE_SOURCE_DIR}/contrib/completion/git-prompt.sh DESTINATION ${CMAKE_BINARY_DIR}/contrib/completion/)\n \tfile(COPY ${CMAKE_SOURCE_DIR}/contrib/completion/git-completion.bash DESTINATION ${CMAKE_BINARY_DIR}/contrib/completion/)\n-\tfile(COPY ${CMAKE_SOURCE_DIR}/contrib/svn-fe/svnrdump_sim.py DESTINATION ${CMAKE_BINARY_DIR}/contrib/svn-fe/)\n endif()\n \n file(GLOB test_scipts \"${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh\")\ndiff --git a/contrib/svn-fe/.gitignore b/contrib/svn-fe/.gitignore\ndeleted file mode 100644\nindex 02a7791585..0000000000\n--- a/contrib/svn-fe/.gitignore\n+++ /dev/null\n@@ -1,4 +0,0 @@\n-/*.xml\n-/*.1\n-/*.html\n-/svn-fe\ndiff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile\ndeleted file mode 100644\nindex e8651aaf4b..0000000000\n--- a/contrib/svn-fe/Makefile\n+++ /dev/null\n@@ -1,105 +0,0 @@\n-all:: svn-fe$X\n-\n-CC = cc\n-RM = rm -f\n-MV = mv\n-\n-CFLAGS = -g -O2 -Wall\n-LDFLAGS =\n-EXTLIBS = -lz\n-\n-include ../../config.mak.uname\n--include ../../config.mak.autogen\n--include ../../config.mak\n-\n-ifeq ($(uname_S),Darwin)\n-\tifndef NO_FINK\n-\t\tifeq ($(shell test -d /sw/lib && echo y),y)\n-\t\t\tCFLAGS += -I/sw/include\n-\t\t\tLDFLAGS += -L/sw/lib\n-\t\tendif\n-\tendif\n-\tifndef NO_DARWIN_PORTS\n-\t\tifeq ($(shell test -d /opt/local/lib && echo y),y)\n-\t\t\tCFLAGS += -I/opt/local/include\n-\t\t\tLDFLAGS += -L/opt/local/lib\n-\t\tendif\n-\tendif\n-endif\n-\n-ifndef NO_OPENSSL\n-\tEXTLIBS += -lssl\n-\tifdef NEEDS_CRYPTO_WITH_SSL\n-\t\tEXTLIBS += -lcrypto\n-\tendif\n-endif\n-\n-ifndef NO_PTHREADS\n-\tCFLAGS += $(PTHREADS_CFLAGS)\n-\tEXTLIBS += $(PTHREAD_LIBS)\n-endif\n-\n-ifdef HAVE_CLOCK_GETTIME\n-\tCFLAGS += -DHAVE_CLOCK_GETTIME\n-\tEXTLIBS += -lrt\n-endif\n-\n-ifdef NEEDS_LIBICONV\n-\tEXTLIBS += -liconv\n-endif\n-\n-GIT_LIB = ../../libgit.a\n-VCSSVN_LIB = ../../vcs-svn/lib.a\n-XDIFF_LIB = ../../xdiff/lib.a\n-\n-LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(XDIFF_LIB)\n-\n-QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir\n-QUIET_SUBDIR1 =\n-\n-ifneq ($(findstring $(MAKEFLAGS),w),w)\n-PRINT_DIR = --no-print-directory\n-else # \"make -w\"\n-NO_SUBDIR = :\n-endif\n-\n-ifneq ($(findstring $(MAKEFLAGS),s),s)\n-ifndef V\n-\tQUIET_CC      = @echo '   ' CC $@;\n-\tQUIET_LINK    = @echo '   ' LINK $@;\n-\tQUIET_SUBDIR0 = +@subdir=\n-\tQUIET_SUBDIR1 = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \\\n-\t                $(MAKE) $(PRINT_DIR) -C $$subdir\n-endif\n-endif\n-\n-svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)\n-\t$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)\n-\n-svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h\n-\t$(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<\n-\n-svn-fe.html: svn-fe.txt\n-\t$(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \\\n-\t\tMAN_TXT=../contrib/svn-fe/svn-fe.txt \\\n-\t\t../contrib/svn-fe/$@\n-\n-svn-fe.1: svn-fe.txt\n-\t$(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \\\n-\t\tMAN_TXT=../contrib/svn-fe/svn-fe.txt \\\n-\t\t../contrib/svn-fe/$@\n-\t$(MV) ../../Documentation/svn-fe.1 .\n-\n-../../vcs-svn/lib.a: FORCE\n-\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) vcs-svn/lib.a\n-\n-../../xdiff/lib.a: FORCE\n-\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) xdiff/lib.a\n-\n-../../libgit.a: FORCE\n-\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit.a\n-\n-clean:\n-\t$(RM) svn-fe$X svn-fe.o svn-fe.html svn-fe.xml svn-fe.1\n-\n-.PHONY: all clean FORCE\ndiff --git a/contrib/svn-fe/svn-fe.c b/contrib/svn-fe/svn-fe.c\ndeleted file mode 100644\nindex f363505abb..0000000000\n--- a/contrib/svn-fe/svn-fe.c\n+++ /dev/null\n@@ -1,18 +0,0 @@\n-/*\n- * This file is in the public domain.\n- * You may freely use, modify, distribute, and relicense it.\n- */\n-\n-#include <stdlib.h>\n-#include \"svndump.h\"\n-\n-int main(int argc, char **argv)\n-{\n-\tif (svndump_init(NULL))\n-\t\treturn 1;\n-\tsvndump_read((argc > 1) ? argv[1] : NULL, \"refs/heads/master\",\n-\t\t\t\"refs/notes/svn/revs\");\n-\tsvndump_deinit();\n-\tsvndump_reset();\n-\treturn 0;\n-}\ndiff --git a/contrib/svn-fe/svn-fe.txt b/contrib/svn-fe/svn-fe.txt\ndeleted file mode 100644\nindex 19333fc8df..0000000000\n--- a/contrib/svn-fe/svn-fe.txt\n+++ /dev/null\n@@ -1,71 +0,0 @@\n-svn-fe(1)\n-=========\n-\n-NAME\n-----\n-svn-fe - convert an SVN \"dumpfile\" to a fast-import stream\n-\n-SYNOPSIS\n---------\n-[verse]\n-mkfifo backchannel &&\n-svnadmin dump --deltas REPO |\n-\tsvn-fe [url] 3<backchannel |\n-\tgit fast-import --cat-blob-fd=3 3>backchannel\n-\n-DESCRIPTION\n------------\n-\n-Converts a Subversion dumpfile into input suitable for\n-git-fast-import(1) and similar importers. REPO is a path to a\n-Subversion repository mirrored on the local disk. Remote Subversion\n-repositories can be mirrored on local disk using the `svnsync`\n-command.\n-\n-Note: this tool is very young.  The details of its commandline\n-interface may change in backward incompatible ways.\n-\n-INPUT FORMAT\n-------------\n-Subversion's repository dump format is documented in full in\n-`notes/dump-load-format.txt` from the Subversion source tree.\n-Files in this format can be generated using the 'svnadmin dump' or\n-'svk admin dump' command.\n-\n-OUTPUT FORMAT\n--------------\n-The fast-import format is documented by the git-fast-import(1)\n-manual page.\n-\n-NOTES\n------\n-Subversion dumps do not record a separate author and committer for\n-each revision, nor do they record a separate display name and email\n-address for each author.  Like git-svn(1), 'svn-fe' will use the name\n-\n----------\n-user <user@UUID>\n----------\n-\n-as committer, where 'user' is the value of the `svn:author` property\n-and 'UUID' the repository's identifier.\n-\n-To support incremental imports, 'svn-fe' puts a `git-svn-id` line at\n-the end of each commit log message if passed a URL on the command\n-line.  This line has the form `git-svn-id: URL@REVNO UUID`.\n-\n-The resulting repository will generally require further processing\n-to put each project in its own repository and to separate the history\n-of each branch.  The 'git filter-repo --subdirectory-filter' command\n-may be useful for this purpose.\n-\n-BUGS\n-----\n-Empty directories and unknown properties are silently discarded.\n-\n-The exit status does not reflect whether an error was detected.\n-\n-SEE ALSO\n---------\n-git-svn(1), svn2git(1), svk(1), git-filter-repo(1), git-fast-import(1),\n-https://svn.apache.org/repos/asf/subversion/trunk/notes/dump-load-format.txt\ndiff --git a/contrib/svn-fe/svnrdump_sim.py b/contrib/svn-fe/svnrdump_sim.py\ndeleted file mode 100755\nindex 8a3cee6175..0000000000\n--- a/contrib/svn-fe/svnrdump_sim.py\n+++ /dev/null\n@@ -1,68 +0,0 @@\n-#!/usr/bin/env python\n-\"\"\"\n-Simulates svnrdump by replaying an existing dump from a file, taking care\n-of the specified revision range.\n-To simulate incremental imports the environment variable SVNRMAX can be set\n-to the highest revision that should be available.\n-\"\"\"\n-import sys\n-import os\n-\n-if sys.hexversion < 0x02040000:\n-    # The limiter is the ValueError() calls. This may be too conservative\n-    sys.stderr.write(\"svnrdump-sim.py: requires Python 2.4 or later.\\n\")\n-    sys.exit(1)\n-\n-\n-def getrevlimit():\n-    var = 'SVNRMAX'\n-    if var in os.environ:\n-        return os.environ[var]\n-    return None\n-\n-\n-def writedump(url, lower, upper):\n-    if url.startswith('sim://'):\n-        filename = url[6:]\n-        if filename[-1] == '/':\n-            filename = filename[:-1]  # remove terminating slash\n-    else:\n-        raise ValueError('sim:// url required')\n-    f = open(filename, 'r')\n-    state = 'header'\n-    wroterev = False\n-    while(True):\n-        l = f.readline()\n-        if l == '':\n-            break\n-        if state == 'header' and l.startswith('Revision-number: '):\n-            state = 'prefix'\n-        if state == 'prefix' and l == 'Revision-number: %s\\n' % lower:\n-            state = 'selection'\n-        if not upper == 'HEAD' and state == 'selection' and \\\n-                l == 'Revision-number: %s\\n' % upper:\n-            break\n-\n-        if state == 'header' or state == 'selection':\n-            if state == 'selection':\n-                wroterev = True\n-            sys.stdout.write(l)\n-    return wroterev\n-\n-if __name__ == \"__main__\":\n-    if not (len(sys.argv) in (3, 4, 5)):\n-        print(\"usage: %s dump URL -rLOWER:UPPER\")\n-        sys.exit(1)\n-    if not sys.argv[1] == 'dump':\n-        raise NotImplementedError('only \"dump\" is supported.')\n-    url = sys.argv[2]\n-    r = ('0', 'HEAD')\n-    if len(sys.argv) == 4 and sys.argv[3][0:2] == '-r':\n-        r = sys.argv[3][2:].lstrip().split(':')\n-    if not getrevlimit() is None:\n-        r[1] = getrevlimit()\n-    if writedump(url, r[0], r[1]):\n-        ret = 0\n-    else:\n-        ret = 1\n-    sys.exit(ret)\ndiff --git a/remote-testsvn.c b/remote-testsvn.c\ndeleted file mode 100644\nindex 636b2b62a6..0000000000\n--- a/remote-testsvn.c\n+++ /dev/null\n@@ -1,341 +0,0 @@\n-#include \"cache.h\"\n-#include \"refs.h\"\n-#include \"remote.h\"\n-#include \"object-store.h\"\n-#include \"strbuf.h\"\n-#include \"url.h\"\n-#include \"exec-cmd.h\"\n-#include \"run-command.h\"\n-#include \"vcs-svn/svndump.h\"\n-#include \"notes.h\"\n-#include \"strvec.h\"\n-\n-static const char *url;\n-static int dump_from_file;\n-static const char *private_ref;\n-static char *remote_ref;\n-static const char *marksfilename, *notes_ref;\n-struct rev_note { unsigned int rev_nr; };\n-\n-static int cmd_capabilities(const char *line);\n-static int cmd_import(const char *line);\n-static int cmd_list(const char *line);\n-\n-typedef int (*input_command_handler)(const char *);\n-struct input_command_entry {\n-\tconst char *name;\n-\tinput_command_handler fn;\n-\tunsigned char batchable;\t/* whether the command starts or is part of a batch */\n-};\n-\n-static const struct input_command_entry input_command_list[] = {\n-\t{ \"capabilities\", cmd_capabilities, 0 },\n-\t{ \"import\", cmd_import, 1 },\n-\t{ \"list\", cmd_list, 0 },\n-\t{ NULL, NULL }\n-};\n-\n-static int cmd_capabilities(const char *line)\n-{\n-\tprintf(\"import\\n\");\n-\tprintf(\"bidi-import\\n\");\n-\tprintf(\"refspec %s:%s\\n\\n\", remote_ref, private_ref);\n-\tfflush(stdout);\n-\treturn 0;\n-}\n-\n-static void terminate_batch(void)\n-{\n-\t/* terminate a current batch's fast-import stream */\n-\tprintf(\"done\\n\");\n-\tfflush(stdout);\n-}\n-\n-/* NOTE: 'ref' refers to a git reference, while 'rev' refers to a svn revision. */\n-static char *read_ref_note(const struct object_id *oid)\n-{\n-\tconst struct object_id *note_oid;\n-\tchar *msg = NULL;\n-\tunsigned long msglen;\n-\tenum object_type type;\n-\n-\tinit_notes(NULL, notes_ref, NULL, 0);\n-\tif (!(note_oid = get_note(NULL, oid)))\n-\t\treturn NULL;\t/* note tree not found */\n-\tif (!(msg = read_object_file(note_oid, &type, &msglen)))\n-\t\terror(\"Empty notes tree. %s\", notes_ref);\n-\telse if (!msglen || type != OBJ_BLOB) {\n-\t\terror(\"Note contains unusable content. \"\n-\t\t\t\"Is something else using this notes tree? %s\", notes_ref);\n-\t\tFREE_AND_NULL(msg);\n-\t}\n-\tfree_notes(NULL);\n-\treturn msg;\n-}\n-\n-static int parse_rev_note(const char *msg, struct rev_note *res)\n-{\n-\tconst char *key, *value, *end;\n-\tsize_t len;\n-\n-\twhile (*msg) {\n-\t\tend = strchrnul(msg, '\\n');\n-\t\tlen = end - msg;\n-\n-\t\tkey = \"Revision-number: \";\n-\t\tif (starts_with(msg, key)) {\n-\t\t\tlong i;\n-\t\t\tchar *end;\n-\t\t\tvalue = msg + strlen(key);\n-\t\t\ti = strtol(value, &end, 0);\n-\t\t\tif (end == value || i < 0 || i > UINT32_MAX)\n-\t\t\t\treturn -1;\n-\t\t\tres->rev_nr = i;\n-\t\t\treturn 0;\n-\t\t}\n-\t\tmsg += len + 1;\n-\t}\n-\t/* didn't find it */\n-\treturn -1;\n-}\n-\n-static int note2mark_cb(const struct object_id *object_oid,\n-\t\tconst struct object_id *note_oid, char *note_path,\n-\t\tvoid *cb_data)\n-{\n-\tFILE *file = (FILE *)cb_data;\n-\tchar *msg;\n-\tunsigned long msglen;\n-\tenum object_type type;\n-\tstruct rev_note note;\n-\n-\tif (!(msg = read_object_file(note_oid, &type, &msglen)) ||\n-\t\t\t!msglen || type != OBJ_BLOB) {\n-\t\tfree(msg);\n-\t\treturn 1;\n-\t}\n-\tif (parse_rev_note(msg, &note))\n-\t\treturn 2;\n-\tif (fprintf(file, \":%d %s\\n\", note.rev_nr, oid_to_hex(object_oid)) < 1)\n-\t\treturn 3;\n-\treturn 0;\n-}\n-\n-static void regenerate_marks(void)\n-{\n-\tint ret;\n-\tFILE *marksfile = xfopen(marksfilename, \"w+\");\n-\n-\tret = for_each_note(NULL, 0, note2mark_cb, marksfile);\n-\tif (ret)\n-\t\tdie(\"Regeneration of marks failed, returned %d.\", ret);\n-\tfclose(marksfile);\n-}\n-\n-static void check_or_regenerate_marks(int latestrev)\n-{\n-\tFILE *marksfile;\n-\tstruct strbuf sb = STRBUF_INIT;\n-\tstruct strbuf line = STRBUF_INIT;\n-\tint found = 0;\n-\n-\tif (latestrev < 1)\n-\t\treturn;\n-\n-\tinit_notes(NULL, notes_ref, NULL, 0);\n-\tmarksfile = fopen(marksfilename, \"r\");\n-\tif (!marksfile) {\n-\t\tregenerate_marks();\n-\t\tmarksfile = xfopen(marksfilename, \"r\");\n-\t\tfclose(marksfile);\n-\t} else {\n-\t\tstrbuf_addf(&sb, \":%d \", latestrev);\n-\t\twhile (strbuf_getline_lf(&line, marksfile) != EOF) {\n-\t\t\tif (starts_with(line.buf, sb.buf)) {\n-\t\t\t\tfound++;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t}\n-\t\tfclose(marksfile);\n-\t\tif (!found)\n-\t\t\tregenerate_marks();\n-\t}\n-\tfree_notes(NULL);\n-\tstrbuf_release(&sb);\n-\tstrbuf_release(&line);\n-}\n-\n-static int cmd_import(const char *line)\n-{\n-\tint code;\n-\tint dumpin_fd;\n-\tchar *note_msg;\n-\tstruct object_id head_oid;\n-\tunsigned int startrev;\n-\tstruct child_process svndump_proc = CHILD_PROCESS_INIT;\n-\tconst char *command = \"svnrdump\";\n-\n-\tif (read_ref(private_ref, &head_oid))\n-\t\tstartrev = 0;\n-\telse {\n-\t\tnote_msg = read_ref_note(&head_oid);\n-\t\tif(note_msg == NULL) {\n-\t\t\twarning(\"No note found for %s.\", private_ref);\n-\t\t\tstartrev = 0;\n-\t\t} else {\n-\t\t\tstruct rev_note note = { 0 };\n-\t\t\tif (parse_rev_note(note_msg, &note))\n-\t\t\t\tdie(\"Revision number couldn't be parsed from note.\");\n-\t\t\tstartrev = note.rev_nr + 1;\n-\t\t\tfree(note_msg);\n-\t\t}\n-\t}\n-\tcheck_or_regenerate_marks(startrev - 1);\n-\n-\tif (dump_from_file) {\n-\t\tdumpin_fd = open(url, O_RDONLY);\n-\t\tif(dumpin_fd < 0)\n-\t\t\tdie_errno(\"Couldn't open svn dump file %s.\", url);\n-\t} else {\n-\t\tsvndump_proc.out = -1;\n-\t\tstrvec_push(&svndump_proc.args, command);\n-\t\tstrvec_push(&svndump_proc.args, \"dump\");\n-\t\tstrvec_push(&svndump_proc.args, url);\n-\t\tstrvec_pushf(&svndump_proc.args, \"-r%u:HEAD\", startrev);\n-\n-\t\tcode = start_command(&svndump_proc);\n-\t\tif (code)\n-\t\t\tdie(\"Unable to start %s, code %d\", command, code);\n-\t\tdumpin_fd = svndump_proc.out;\n-\t}\n-\t/* setup marks file import/export */\n-\tprintf(\"feature import-marks-if-exists=%s\\n\"\n-\t\t\t\"feature export-marks=%s\\n\", marksfilename, marksfilename);\n-\n-\tsvndump_init_fd(dumpin_fd, STDIN_FILENO);\n-\tsvndump_read(url, private_ref, notes_ref);\n-\tsvndump_deinit();\n-\tsvndump_reset();\n-\n-\tclose(dumpin_fd);\n-\tif (!dump_from_file) {\n-\t\tcode = finish_command(&svndump_proc);\n-\t\tif (code)\n-\t\t\twarning(\"%s, returned %d\", command, code);\n-\t}\n-\n-\treturn 0;\n-}\n-\n-static int cmd_list(const char *line)\n-{\n-\tprintf(\"? %s\\n\\n\", remote_ref);\n-\tfflush(stdout);\n-\treturn 0;\n-}\n-\n-static int do_command(struct strbuf *line)\n-{\n-\tconst struct input_command_entry *p = input_command_list;\n-\tstatic struct string_list batchlines = STRING_LIST_INIT_DUP;\n-\tstatic const struct input_command_entry *batch_cmd;\n-\t/*\n-\t * commands can be grouped together in a batch.\n-\t * Batches are ended by \\n. If no batch is active the program ends.\n-\t * During a batch all lines are buffered and passed to the handler function\n-\t * when the batch is terminated.\n-\t */\n-\tif (line->len == 0) {\n-\t\tif (batch_cmd) {\n-\t\t\tstruct string_list_item *item;\n-\t\t\tfor_each_string_list_item(item, &batchlines)\n-\t\t\t\tbatch_cmd->fn(item->string);\n-\t\t\tterminate_batch();\n-\t\t\tbatch_cmd = NULL;\n-\t\t\tstring_list_clear(&batchlines, 0);\n-\t\t\treturn 0;\t/* end of the batch, continue reading other commands. */\n-\t\t}\n-\t\treturn 1;\t/* end of command stream, quit */\n-\t}\n-\tif (batch_cmd) {\n-\t\tif (!starts_with(batch_cmd->name, line->buf))\n-\t\t\tdie(\"Active %s batch interrupted by %s\", batch_cmd->name, line->buf);\n-\t\t/* buffer batch lines */\n-\t\tstring_list_append(&batchlines, line->buf);\n-\t\treturn 0;\n-\t}\n-\n-\tfor (p = input_command_list; p->name; p++) {\n-\t\tif (starts_with(line->buf, p->name) && (strlen(p->name) == line->len ||\n-\t\t\t\tline->buf[strlen(p->name)] == ' ')) {\n-\t\t\tif (p->batchable) {\n-\t\t\t\tbatch_cmd = p;\n-\t\t\t\tstring_list_append(&batchlines, line->buf);\n-\t\t\t\treturn 0;\n-\t\t\t}\n-\t\t\treturn p->fn(line->buf);\n-\t\t}\n-\t}\n-\tdie(\"Unknown command '%s'\\n\", line->buf);\n-\treturn 0;\n-}\n-\n-int cmd_main(int argc, const char **argv)\n-{\n-\tstruct strbuf buf = STRBUF_INIT, url_sb = STRBUF_INIT,\n-\t\t\tprivate_ref_sb = STRBUF_INIT, marksfilename_sb = STRBUF_INIT,\n-\t\t\tnotes_ref_sb = STRBUF_INIT;\n-\tstatic struct remote *remote;\n-\tconst char *url_in, *remote_ref_short;\n-\n-\tsetup_git_directory();\n-\tif (argc < 2 || argc > 3) {\n-\t\tusage(\"git-remote-svn <remote-name> [<url>]\");\n-\t\treturn 1;\n-\t}\n-\n-\tremote_ref_short = git_default_branch_name();\n-\tremote_ref = xstrfmt(\"refs/heads/%s\", remote_ref_short);\n-\n-\tremote = remote_get(argv[1]);\n-\turl_in = (argc == 3) ? argv[2] : remote->url[0];\n-\n-\tif (starts_with(url_in, \"file://\")) {\n-\t\tdump_from_file = 1;\n-\t\turl = url_decode(url_in + sizeof(\"file://\")-1);\n-\t} else {\n-\t\tdump_from_file = 0;\n-\t\tend_url_with_slash(&url_sb, url_in);\n-\t\turl = url_sb.buf;\n-\t}\n-\n-\tstrbuf_addf(&private_ref_sb, \"refs/svn/%s/%s\",\n-\t\t    remote->name, remote_ref_short);\n-\tprivate_ref = private_ref_sb.buf;\n-\n-\tstrbuf_addf(&notes_ref_sb, \"refs/notes/%s/revs\", remote->name);\n-\tnotes_ref = notes_ref_sb.buf;\n-\n-\tstrbuf_addf(&marksfilename_sb, \"%s/info/fast-import/remote-svn/%s.marks\",\n-\t\tget_git_dir(), remote->name);\n-\tmarksfilename = marksfilename_sb.buf;\n-\n-\twhile (1) {\n-\t\tif (strbuf_getline_lf(&buf, stdin) == EOF) {\n-\t\t\tif (ferror(stdin))\n-\t\t\t\tdie(\"Error reading command stream\");\n-\t\t\telse\n-\t\t\t\tdie(\"Unexpected end of command stream\");\n-\t\t}\n-\t\tif (do_command(&buf))\n-\t\t\tbreak;\n-\t\tstrbuf_reset(&buf);\n-\t}\n-\n-\tstrbuf_release(&buf);\n-\tstrbuf_release(&url_sb);\n-\tstrbuf_release(&private_ref_sb);\n-\tstrbuf_release(&notes_ref_sb);\n-\tstrbuf_release(&marksfilename_sb);\n-\treturn 0;\n-}\ndiff --git a/t/helper/.gitignore b/t/helper/.gitignore\nindex 48c7bb0bbb..8c2ddcce95 100644\n--- a/t/helper/.gitignore\n+++ b/t/helper/.gitignore\n@@ -1,4 +1,2 @@\n /test-tool\n /test-fake-ssh\n-/test-line-buffer\n-/test-svn-fe\ndiff --git a/t/helper/test-line-buffer.c b/t/helper/test-line-buffer.c\ndeleted file mode 100644\nindex 078dd7e29d..0000000000\n--- a/t/helper/test-line-buffer.c\n+++ /dev/null\n@@ -1,81 +0,0 @@\n-/*\n- * test-line-buffer.c: code to exercise the svn importer's input helper\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"strbuf.h\"\n-#include \"vcs-svn/line_buffer.h\"\n-\n-static uint32_t strtouint32(const char *s)\n-{\n-\tchar *end;\n-\tuintmax_t n = strtoumax(s, &end, 10);\n-\tif (*s == '\\0' || *end != '\\0')\n-\t\tdie(\"invalid count: %s\", s);\n-\treturn (uint32_t) n;\n-}\n-\n-static void handle_command(const char *command, const char *arg, struct line_buffer *buf)\n-{\n-\tif (starts_with(command, \"binary \")) {\n-\t\tstruct strbuf sb = STRBUF_INIT;\n-\t\tstrbuf_addch(&sb, '>');\n-\t\tbuffer_read_binary(buf, &sb, strtouint32(arg));\n-\t\tfwrite(sb.buf, 1, sb.len, stdout);\n-\t\tstrbuf_release(&sb);\n-\t} else if (starts_with(command, \"copy \")) {\n-\t\tbuffer_copy_bytes(buf, strtouint32(arg));\n-\t} else if (starts_with(command, \"skip \")) {\n-\t\tbuffer_skip_bytes(buf, strtouint32(arg));\n-\t} else {\n-\t\tdie(\"unrecognized command: %s\", command);\n-\t}\n-}\n-\n-static void handle_line(const char *line, struct line_buffer *stdin_buf)\n-{\n-\tconst char *arg = strchr(line, ' ');\n-\tif (!arg)\n-\t\tdie(\"no argument in line: %s\", line);\n-\thandle_command(line, arg + 1, stdin_buf);\n-}\n-\n-int cmd_main(int argc, const char **argv)\n-{\n-\tstruct line_buffer stdin_buf = LINE_BUFFER_INIT;\n-\tstruct line_buffer file_buf = LINE_BUFFER_INIT;\n-\tstruct line_buffer *input = &stdin_buf;\n-\tconst char *filename;\n-\tchar *s;\n-\n-\tif (argc == 1)\n-\t\tfilename = NULL;\n-\telse if (argc == 2)\n-\t\tfilename = argv[1];\n-\telse\n-\t\tusage(\"test-line-buffer [file | &fd] < script\");\n-\n-\tif (buffer_init(&stdin_buf, NULL))\n-\t\tdie_errno(\"open error\");\n-\tif (filename) {\n-\t\tif (*filename == '&') {\n-\t\t\tif (buffer_fdinit(&file_buf, strtouint32(filename + 1)))\n-\t\t\t\tdie_errno(\"error opening fd %s\", filename + 1);\n-\t\t} else {\n-\t\t\tif (buffer_init(&file_buf, filename))\n-\t\t\t\tdie_errno(\"error opening %s\", filename);\n-\t\t}\n-\t\tinput = &file_buf;\n-\t}\n-\n-\twhile ((s = buffer_read_line(&stdin_buf)))\n-\t\thandle_line(s, input);\n-\n-\tif (filename && buffer_deinit(&file_buf))\n-\t\tdie(\"error reading from %s\", filename);\n-\tif (buffer_deinit(&stdin_buf))\n-\t\tdie(\"input error\");\n-\tif (ferror(stdout))\n-\t\tdie(\"output error\");\n-\treturn 0;\n-}\ndiff --git a/t/helper/test-svn-fe.c b/t/helper/test-svn-fe.c\ndeleted file mode 100644\nindex 7667c0803f..0000000000\n--- a/t/helper/test-svn-fe.c\n+++ /dev/null\n@@ -1,52 +0,0 @@\n-/*\n- * test-svn-fe: Code to exercise the svn import lib\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"vcs-svn/svndump.h\"\n-#include \"vcs-svn/svndiff.h\"\n-#include \"vcs-svn/sliding_window.h\"\n-#include \"vcs-svn/line_buffer.h\"\n-\n-static const char test_svnfe_usage[] =\n-\t\"test-svn-fe (<dumpfile> | [-d] <preimage> <delta> <len>)\";\n-\n-static int apply_delta(int argc, const char **argv)\n-{\n-\tstruct line_buffer preimage = LINE_BUFFER_INIT;\n-\tstruct line_buffer delta = LINE_BUFFER_INIT;\n-\tstruct sliding_view preimage_view = SLIDING_VIEW_INIT(&preimage, -1);\n-\n-\tif (argc != 5)\n-\t\tusage(test_svnfe_usage);\n-\n-\tif (buffer_init(&preimage, argv[2]))\n-\t\tdie_errno(\"cannot open preimage\");\n-\tif (buffer_init(&delta, argv[3]))\n-\t\tdie_errno(\"cannot open delta\");\n-\tif (svndiff0_apply(&delta, (off_t) strtoumax(argv[4], NULL, 0),\n-\t\t\t\t\t&preimage_view, stdout))\n-\t\treturn 1;\n-\tif (buffer_deinit(&preimage))\n-\t\tdie_errno(\"cannot close preimage\");\n-\tif (buffer_deinit(&delta))\n-\t\tdie_errno(\"cannot close delta\");\n-\tstrbuf_release(&preimage_view.buf);\n-\treturn 0;\n-}\n-\n-int cmd_main(int argc, const char **argv)\n-{\n-\tif (argc == 2) {\n-\t\tif (svndump_init(argv[1]))\n-\t\t\treturn 1;\n-\t\tsvndump_read(NULL, \"refs/heads/master\", \"refs/notes/svn/revs\");\n-\t\tsvndump_deinit();\n-\t\tsvndump_reset();\n-\t\treturn 0;\n-\t}\n-\n-\tif (argc >= 2 && !strcmp(argv[1], \"-d\"))\n-\t\treturn apply_delta(argc, argv);\n-\tusage(test_svnfe_usage);\n-}\ndiff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh\ndeleted file mode 100755\nindex ce92e6acad..0000000000\n--- a/t/t0081-line-buffer.sh\n+++ /dev/null\n@@ -1,90 +0,0 @@\n-#!/bin/sh\n-\n-test_description=\"Test the svn importer's input handling routines.\n-\n-These tests provide some simple checks that the line_buffer API\n-behaves as advertised.\n-\n-While at it, check that input of newlines and null bytes are handled\n-correctly.\n-\"\n-. ./test-lib.sh\n-\n-test_expect_success 'hello world' '\n-\techo \">HELLO\" >expect &&\n-\ttest-line-buffer <<-\\EOF >actual &&\n-\tbinary 6\n-\tHELLO\n-\tEOF\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success '0-length read, send along greeting' '\n-\techo \">HELLO\" >expect &&\n-\ttest-line-buffer <<-\\EOF >actual &&\n-\tbinary 0\n-\tcopy 6\n-\tHELLO\n-\tEOF\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success !MINGW 'read from file descriptor' '\n-\trm -f input &&\n-\techo hello >expect &&\n-\techo hello >input &&\n-\techo copy 6 |\n-\ttest-line-buffer \"&4\" 4<input >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'skip, copy null byte' '\n-\techo Q | q_to_nul >expect &&\n-\tq_to_nul <<-\\EOF | test-line-buffer >actual &&\n-\tskip 2\n-\tQ\n-\tcopy 2\n-\tQ\n-\tEOF\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'read null byte' '\n-\techo \">QhelloQ\" | q_to_nul >expect &&\n-\tq_to_nul <<-\\EOF | test-line-buffer >actual &&\n-\tbinary 8\n-\tQhelloQ\n-\tEOF\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'long reads are truncated' '\n-\techo \">foo\" >expect &&\n-\ttest-line-buffer <<-\\EOF >actual &&\n-\tbinary 5\n-\tfoo\n-\tEOF\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'long copies are truncated' '\n-\tprintf \"%s\\n\" \">\" foo >expect &&\n-\ttest-line-buffer <<-\\EOF >actual &&\n-\tbinary 1\n-\n-\tcopy 5\n-\tfoo\n-\tEOF\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'long binary reads are truncated' '\n-\techo \">foo\" >expect &&\n-\ttest-line-buffer <<-\\EOF >actual &&\n-\tbinary 5\n-\tfoo\n-\tEOF\n-\ttest_cmp expect actual\n-'\n-\n-test_done\ndiff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh\ndeleted file mode 100755\nindex 83f8f5cacb..0000000000\n--- a/t/t9010-svn-fe.sh\n+++ /dev/null\n@@ -1,1105 +0,0 @@\n-#!/bin/sh\n-\n-test_description='check svn dumpfile importer'\n-\n-. ./test-lib.sh\n-\n-if test_have_prereq !PIPE\n-then\n-\tskip_all=\"svn dumpfile importer testing requires the PIPE prerequisite\"\n-\ttest_done\n-fi\n-\n-reinit_git () {\n-\trm -fr .git &&\n-\trm -f stream backflow &&\n-\tgit init &&\n-\tmkfifo stream backflow\n-}\n-\n-try_dump () {\n-\tinput=$1 &&\n-\tmaybe_fail_svnfe=${2:+test_$2} &&\n-\tmaybe_fail_fi=${3:+test_$3} &&\n-\n-\t{\n-\t\t$maybe_fail_svnfe test-svn-fe \"$input\" >stream 3<backflow &\n-\t} &&\n-\t$maybe_fail_fi git fast-import --cat-blob-fd=3 <stream 3>backflow &&\n-\twait $!\n-}\n-\n-properties () {\n-\twhile test \"$#\" -ne 0\n-\tdo\n-\t\tproperty=\"$1\" &&\n-\t\tvalue=\"$2\" &&\n-\t\tprintf \"%s\\n\" \"K ${#property}\" &&\n-\t\tprintf \"%s\\n\" \"$property\" &&\n-\t\tprintf \"%s\\n\" \"V ${#value}\" &&\n-\t\tprintf \"%s\\n\" \"$value\" &&\n-\t\tshift 2 ||\n-\t\treturn 1\n-\tdone\n-}\n-\n-text_no_props () {\n-\ttext=\"$1\n-\" &&\n-\tprintf \"%s\\n\" \"Prop-content-length: 10\" &&\n-\tprintf \"%s\\n\" \"Text-content-length: ${#text}\" &&\n-\tprintf \"%s\\n\" \"Content-length: $((${#text} + 10))\" &&\n-\tprintf \"%s\\n\" \"\" \"PROPS-END\" &&\n-\tprintf \"%s\\n\" \"$text\"\n-}\n-\n-test_expect_success 'empty dump' '\n-\treinit_git &&\n-\techo \"SVN-fs-dump-format-version: 2\" >input &&\n-\ttry_dump input\n-'\n-\n-test_expect_success 'v4 dumps not supported' '\n-\treinit_git &&\n-\techo \"SVN-fs-dump-format-version: 4\" >v4.dump &&\n-\ttry_dump v4.dump must_fail\n-'\n-\n-test_expect_failure 'empty revision' '\n-\treinit_git &&\n-\tprintf \"rev <nobody, nobody@local>: %s\\n\" \"\" \"\" >expect &&\n-\tcat >emptyrev.dump <<-\\EOF &&\n-\tSVN-fs-dump-format-version: 3\n-\n-\tRevision-number: 1\n-\tProp-content-length: 0\n-\tContent-length: 0\n-\n-\tRevision-number: 2\n-\tProp-content-length: 0\n-\tContent-length: 0\n-\n-\tEOF\n-\ttry_dump emptyrev.dump &&\n-\tgit log -p --format=\"rev <%an, %ae>: %s\" HEAD >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'empty properties' '\n-\treinit_git &&\n-\tprintf \"rev <nobody, nobody@local>: %s\\n\" \"\" \"\" >expect &&\n-\tcat >emptyprop.dump <<-\\EOF &&\n-\tSVN-fs-dump-format-version: 3\n-\n-\tRevision-number: 1\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tRevision-number: 2\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\tEOF\n-\ttry_dump emptyprop.dump &&\n-\tgit log -p --format=\"rev <%an, %ae>: %s\" HEAD >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'author name and commit message' '\n-\treinit_git &&\n-\techo \"<author@example.com, author@example.com@local>\" >expect.author &&\n-\tcat >message <<-\\EOF &&\n-\tA concise summary of the change\n-\n-\tA detailed description of the change, why it is needed, what\n-\twas broken and why applying this is the best course of action.\n-\n-\t* file.c\n-\t    Details pertaining to an individual file.\n-\tEOF\n-\t{\n-\t\tproperties \\\n-\t\t\tsvn:author author@example.com \\\n-\t\t\tsvn:log \"$(cat message)\" &&\n-\t\techo PROPS-END\n-\t} >props &&\n-\t{\n-\t\techo \"SVN-fs-dump-format-version: 3\" &&\n-\t\techo &&\n-\t\techo \"Revision-number: 1\" &&\n-\t\techo Prop-content-length: $(wc -c <props) &&\n-\t\techo Content-length: $(wc -c <props) &&\n-\t\techo &&\n-\t\tcat props\n-\t} >log.dump &&\n-\ttry_dump log.dump &&\n-\tgit log -p --format=\"%B\" HEAD >actual.log &&\n-\tgit log --format=\"<%an, %ae>\" >actual.author &&\n-\ttest_cmp message actual.log &&\n-\ttest_cmp expect.author actual.author\n-'\n-\n-test_expect_success 'unsupported properties are ignored' '\n-\treinit_git &&\n-\techo author >expect &&\n-\tcat >extraprop.dump <<-\\EOF &&\n-\tSVN-fs-dump-format-version: 3\n-\n-\tRevision-number: 1\n-\tProp-content-length: 56\n-\tContent-length: 56\n-\n-\tK 8\n-\tnonsense\n-\tV 1\n-\ty\n-\tK 10\n-\tsvn:author\n-\tV 6\n-\tauthor\n-\tPROPS-END\n-\tEOF\n-\ttry_dump extraprop.dump &&\n-\tgit log -p --format=%an HEAD >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_failure 'timestamp and empty file' '\n-\techo author@example.com >expect.author &&\n-\techo 1999-01-01 >expect.date &&\n-\techo file >expect.files &&\n-\treinit_git &&\n-\t{\n-\t\tproperties \\\n-\t\t\tsvn:author author@example.com \\\n-\t\t\tsvn:date \"1999-01-01T00:01:002.000000Z\" \\\n-\t\t\tsvn:log \"add empty file\" &&\n-\t\techo PROPS-END\n-\t} >props &&\n-\t{\n-\t\tcat <<-EOF &&\n-\t\tSVN-fs-dump-format-version: 3\n-\n-\t\tRevision-number: 1\n-\t\tEOF\n-\t\techo Prop-content-length: $(wc -c <props) &&\n-\t\techo Content-length: $(wc -c <props) &&\n-\t\techo &&\n-\t\tcat props &&\n-\t\tcat <<-\\EOF\n-\n-\t\tNode-path: empty-file\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tContent-length: 0\n-\n-\t\tEOF\n-\t} >emptyfile.dump &&\n-\ttry_dump emptyfile.dump &&\n-\tgit log --format=%an HEAD >actual.author &&\n-\tgit log --date=short --format=%ad HEAD >actual.date &&\n-\tgit ls-tree -r --name-only HEAD >actual.files &&\n-\ttest_cmp expect.author actual.author &&\n-\ttest_cmp expect.date actual.date &&\n-\ttest_cmp expect.files actual.files &&\n-\tgit checkout HEAD empty-file &&\n-\ttest_must_be_empty file\n-'\n-\n-test_expect_success 'directory with files' '\n-\treinit_git &&\n-\tprintf \"%s\\n\" directory/file1 directory/file2 >expect.files &&\n-\techo hi >hi &&\n-\techo hello >hello &&\n-\t{\n-\t\tproperties \\\n-\t\t\tsvn:author author@example.com \\\n-\t\t\tsvn:date \"1999-02-01T00:01:002.000000Z\" \\\n-\t\t\tsvn:log \"add directory with some files in it\" &&\n-\t\techo PROPS-END\n-\t} >props &&\n-\t{\n-\t\tcat <<-EOF &&\n-\t\tSVN-fs-dump-format-version: 3\n-\n-\t\tRevision-number: 1\n-\t\tEOF\n-\t\techo Prop-content-length: $(wc -c <props) &&\n-\t\techo Content-length: $(wc -c <props) &&\n-\t\techo &&\n-\t\tcat props &&\n-\t\tcat <<-\\EOF &&\n-\n-\t\tNode-path: directory\n-\t\tNode-kind: dir\n-\t\tNode-action: add\n-\t\tProp-content-length: 10\n-\t\tContent-length: 10\n-\n-\t\tPROPS-END\n-\n-\t\tNode-path: directory/file1\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tEOF\n-\t\ttext_no_props hello &&\n-\t\tcat <<-\\EOF &&\n-\t\tNode-path: directory/file2\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tEOF\n-\t\ttext_no_props hi\n-\t} >directory.dump &&\n-\ttry_dump directory.dump &&\n-\n-\tgit ls-tree -r --name-only HEAD >actual.files &&\n-\tgit checkout HEAD directory &&\n-\ttest_cmp expect.files actual.files &&\n-\ttest_cmp hello directory/file1 &&\n-\ttest_cmp hi directory/file2\n-'\n-\n-test_expect_success 'branch name with backslash' '\n-\treinit_git &&\n-\tsort <<-\\EOF >expect.branch-files &&\n-\ttrunk/file1\n-\ttrunk/file2\n-\t\"branches/UpdateFOPto094\\\\/file1\"\n-\t\"branches/UpdateFOPto094\\\\/file2\"\n-\tEOF\n-\n-\techo hi >hi &&\n-\techo hello >hello &&\n-\t{\n-\t\tproperties \\\n-\t\t\tsvn:author author@example.com \\\n-\t\t\tsvn:date \"1999-02-02T00:01:02.000000Z\" \\\n-\t\t\tsvn:log \"add directory with some files in it\" &&\n-\t\techo PROPS-END\n-\t} >props.setup &&\n-\t{\n-\t\tproperties \\\n-\t\t\tsvn:author brancher@example.com \\\n-\t\t\tsvn:date \"2007-12-06T21:38:34.000000Z\" \\\n-\t\t\tsvn:log \"Updating fop to .94 and adjust fo-stylesheets\" &&\n-\t\techo PROPS-END\n-\t} >props.branch &&\n-\t{\n-\t\tcat <<-EOF &&\n-\t\tSVN-fs-dump-format-version: 3\n-\n-\t\tRevision-number: 1\n-\t\tEOF\n-\t\techo Prop-content-length: $(wc -c <props.setup) &&\n-\t\techo Content-length: $(wc -c <props.setup) &&\n-\t\techo &&\n-\t\tcat props.setup &&\n-\t\tcat <<-\\EOF &&\n-\n-\t\tNode-path: trunk\n-\t\tNode-kind: dir\n-\t\tNode-action: add\n-\t\tProp-content-length: 10\n-\t\tContent-length: 10\n-\n-\t\tPROPS-END\n-\n-\t\tNode-path: branches\n-\t\tNode-kind: dir\n-\t\tNode-action: add\n-\t\tProp-content-length: 10\n-\t\tContent-length: 10\n-\n-\t\tPROPS-END\n-\n-\t\tNode-path: trunk/file1\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tEOF\n-\t\ttext_no_props hello &&\n-\t\tcat <<-\\EOF &&\n-\t\tNode-path: trunk/file2\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tEOF\n-\t\ttext_no_props hi &&\n-\t\tcat <<-\\EOF &&\n-\n-\t\tRevision-number: 2\n-\t\tEOF\n-\t\techo Prop-content-length: $(wc -c <props.branch) &&\n-\t\techo Content-length: $(wc -c <props.branch) &&\n-\t\techo &&\n-\t\tcat props.branch &&\n-\t\tcat <<-\\EOF\n-\n-\t\tNode-path: branches/UpdateFOPto094\\\n-\t\tNode-kind: dir\n-\t\tNode-action: add\n-\t\tNode-copyfrom-rev: 1\n-\t\tNode-copyfrom-path: trunk\n-\n-\t\tNode-kind: dir\n-\t\tNode-action: add\n-\t\tProp-content-length: 34\n-\t\tContent-length: 34\n-\n-\t\tK 13\n-\t\tsvn:mergeinfo\n-\t\tV 0\n-\n-\t\tPROPS-END\n-\t\tEOF\n-\t} >branch.dump &&\n-\ttry_dump branch.dump &&\n-\n-\tgit ls-tree -r --name-only HEAD |\n-\tsort >actual.branch-files &&\n-\ttest_cmp expect.branch-files actual.branch-files\n-'\n-\n-test_expect_success 'node without action' '\n-\treinit_git &&\n-\tcat >inaction.dump <<-\\EOF &&\n-\tSVN-fs-dump-format-version: 3\n-\n-\tRevision-number: 1\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: directory\n-\tNode-kind: dir\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\tEOF\n-\ttry_dump inaction.dump must_fail\n-'\n-\n-test_expect_success 'action: add node without text' '\n-\treinit_git &&\n-\tcat >textless.dump <<-\\EOF &&\n-\tSVN-fs-dump-format-version: 3\n-\n-\tRevision-number: 1\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: textless\n-\tNode-kind: file\n-\tNode-action: add\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\tEOF\n-\ttry_dump textless.dump must_fail\n-'\n-\n-test_expect_failure 'change file mode but keep old content' '\n-\treinit_git &&\n-\tcat >expect <<-\\EOF &&\n-\tOBJID\n-\t:120000 100644 OBJID OBJID T\tgreeting\n-\tOBJID\n-\t:100644 120000 OBJID OBJID T\tgreeting\n-\tOBJID\n-\t:000000 100644 OBJID OBJID A\tgreeting\n-\tEOF\n-\techo \"link hello\" >expect.blob &&\n-\techo hello >hello &&\n-\tcat >filemode.dump <<-\\EOF &&\n-\tSVN-fs-dump-format-version: 3\n-\n-\tRevision-number: 1\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: greeting\n-\tNode-kind: file\n-\tNode-action: add\n-\tProp-content-length: 10\n-\tText-content-length: 11\n-\tContent-length: 21\n-\n-\tPROPS-END\n-\tlink hello\n-\n-\tRevision-number: 2\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: greeting\n-\tNode-kind: file\n-\tNode-action: change\n-\tProp-content-length: 33\n-\tContent-length: 33\n-\n-\tK 11\n-\tsvn:special\n-\tV 1\n-\t*\n-\tPROPS-END\n-\n-\tRevision-number: 3\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: greeting\n-\tNode-kind: file\n-\tNode-action: change\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\tEOF\n-\ttry_dump filemode.dump &&\n-\t{\n-\t\tgit rev-list HEAD |\n-\t\tgit diff-tree --root --stdin |\n-\t\tsed \"s/$OID_REGEX/OBJID/g\"\n-\t} >actual &&\n-\tgit show HEAD:greeting >actual.blob &&\n-\tgit show HEAD^:greeting >actual.target &&\n-\ttest_cmp expect actual &&\n-\ttest_cmp expect.blob actual.blob &&\n-\ttest_cmp hello actual.target\n-'\n-\n-test_expect_success 'NUL in property value' '\n-\treinit_git &&\n-\techo \"commit message\" >expect.message &&\n-\t{\n-\t\tproperties \\\n-\t\t\tunimportant \"something with a NUL (Q)\" \\\n-\t\t\tsvn:log \"commit message\" &&\n-\t\techo PROPS-END\n-\t} |\n-\tq_to_nul >props &&\n-\t{\n-\t\tcat <<-\\EOF &&\n-\t\tSVN-fs-dump-format-version: 3\n-\n-\t\tRevision-number: 1\n-\t\tEOF\n-\t\techo Prop-content-length: $(wc -c <props) &&\n-\t\techo Content-length: $(wc -c <props) &&\n-\t\techo &&\n-\t\tcat props\n-\t} >nulprop.dump &&\n-\ttry_dump nulprop.dump &&\n-\tgit diff-tree --always -s --format=%s HEAD >actual.message &&\n-\ttest_cmp expect.message actual.message\n-'\n-\n-test_expect_success 'NUL in log message, file content, and property name' '\n-\t# Caveat: svnadmin 1.6.16 (r1073529) truncates at \\0 in the\n-\t# svn:specialQnotreally example.\n-\treinit_git &&\n-\tcat >expect <<-\\EOF &&\n-\tOBJID\n-\t:100644 100644 OBJID OBJID M\tgreeting\n-\tOBJID\n-\t:000000 100644 OBJID OBJID A\tgreeting\n-\tEOF\n-\tprintf \"\\n%s\\n\" \"something with an ASCII NUL (Q)\" >expect.message &&\n-\tprintf \"%s\\n\" \"helQo\" >expect.hello1 &&\n-\tprintf \"%s\\n\" \"link hello\" >expect.hello2 &&\n-\t{\n-\t\tproperties svn:log \"something with an ASCII NUL (Q)\" &&\n-\t\techo PROPS-END\n-\t} |\n-\tq_to_nul >props &&\n-\t{\n-\t\tq_to_nul <<-\\EOF &&\n-\t\tSVN-fs-dump-format-version: 3\n-\n-\t\tRevision-number: 1\n-\t\tProp-content-length: 10\n-\t\tContent-length: 10\n-\n-\t\tPROPS-END\n-\n-\t\tNode-path: greeting\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tProp-content-length: 10\n-\t\tText-content-length: 6\n-\t\tContent-length: 16\n-\n-\t\tPROPS-END\n-\t\thelQo\n-\n-\t\tRevision-number: 2\n-\t\tEOF\n-\t\techo Prop-content-length: $(wc -c <props) &&\n-\t\techo Content-length: $(wc -c <props) &&\n-\t\techo &&\n-\t\tcat props &&\n-\t\tq_to_nul <<-\\EOF\n-\n-\t\tNode-path: greeting\n-\t\tNode-kind: file\n-\t\tNode-action: change\n-\t\tProp-content-length: 43\n-\t\tText-content-length: 11\n-\t\tContent-length: 54\n-\n-\t\tK 21\n-\t\tsvn:specialQnotreally\n-\t\tV 1\n-\t\t*\n-\t\tPROPS-END\n-\t\tlink hello\n-\t\tEOF\n-\t} >8bitclean.dump &&\n-\ttry_dump 8bitclean.dump &&\n-\t{\n-\t\tgit rev-list HEAD |\n-\t\tgit diff-tree --root --stdin |\n-\t\tsed \"s/$OID_REGEX/OBJID/g\"\n-\t} >actual &&\n-\t{\n-\t\tgit cat-file commit HEAD | nul_to_q &&\n-\t\techo\n-\t} |\n-\tsed -ne \"/^\\$/,\\$ p\" >actual.message &&\n-\tgit cat-file blob HEAD^:greeting | nul_to_q >actual.hello1 &&\n-\tgit cat-file blob HEAD:greeting | nul_to_q >actual.hello2 &&\n-\ttest_cmp expect actual &&\n-\ttest_cmp expect.message actual.message &&\n-\ttest_cmp expect.hello1 actual.hello1 &&\n-\ttest_cmp expect.hello2 actual.hello2\n-'\n-\n-test_expect_success 'change file mode and reiterate content' '\n-\treinit_git &&\n-\tcat >expect <<-\\EOF &&\n-\tOBJID\n-\t:120000 100644 OBJID OBJID T\tgreeting\n-\tOBJID\n-\t:100644 120000 OBJID OBJID T\tgreeting\n-\tOBJID\n-\t:000000 100644 OBJID OBJID A\tgreeting\n-\tEOF\n-\techo \"link hello\" >expect.blob &&\n-\techo hello >hello &&\n-\tcat >filemode2.dump <<-\\EOF &&\n-\tSVN-fs-dump-format-version: 3\n-\n-\tRevision-number: 1\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: greeting\n-\tNode-kind: file\n-\tNode-action: add\n-\tProp-content-length: 10\n-\tText-content-length: 11\n-\tContent-length: 21\n-\n-\tPROPS-END\n-\tlink hello\n-\n-\tRevision-number: 2\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: greeting\n-\tNode-kind: file\n-\tNode-action: change\n-\tProp-content-length: 33\n-\tText-content-length: 11\n-\tContent-length: 44\n-\n-\tK 11\n-\tsvn:special\n-\tV 1\n-\t*\n-\tPROPS-END\n-\tlink hello\n-\n-\tRevision-number: 3\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: greeting\n-\tNode-kind: file\n-\tNode-action: change\n-\tProp-content-length: 10\n-\tText-content-length: 11\n-\tContent-length: 21\n-\n-\tPROPS-END\n-\tlink hello\n-\tEOF\n-\ttry_dump filemode2.dump &&\n-\t{\n-\t\tgit rev-list HEAD |\n-\t\tgit diff-tree --root --stdin |\n-\t\tsed \"s/$OID_REGEX/OBJID/g\"\n-\t} >actual &&\n-\tgit show HEAD:greeting >actual.blob &&\n-\tgit show HEAD^:greeting >actual.target &&\n-\ttest_cmp expect actual &&\n-\ttest_cmp expect.blob actual.blob &&\n-\ttest_cmp hello actual.target\n-'\n-\n-test_expect_success 'deltas supported' '\n-\treinit_git &&\n-\t{\n-\t\t# (old) h + (inline) ello + (old) \\n\n-\t\tprintf \"SVNQ%b%b%s\" \"Q\\003\\006\\005\\004\" \"\\001Q\\0204\\001\\002\" \"ello\" |\n-\t\tq_to_nul\n-\t} >delta &&\n-\t{\n-\t\tproperties \\\n-\t\t\tsvn:author author@example.com \\\n-\t\t\tsvn:date \"1999-01-05T00:01:002.000000Z\" \\\n-\t\t\tsvn:log \"add greeting\" &&\n-\t\techo PROPS-END\n-\t} >props &&\n-\t{\n-\t\tproperties \\\n-\t\t\tsvn:author author@example.com \\\n-\t\t\tsvn:date \"1999-01-06T00:01:002.000000Z\" \\\n-\t\t\tsvn:log \"change it\" &&\n-\t\techo PROPS-END\n-\t} >props2 &&\n-\t{\n-\t\techo SVN-fs-dump-format-version: 3 &&\n-\t\techo &&\n-\t\techo Revision-number: 1 &&\n-\t\techo Prop-content-length: $(wc -c <props) &&\n-\t\techo Content-length: $(wc -c <props) &&\n-\t\techo &&\n-\t\tcat props &&\n-\t\tcat <<-\\EOF &&\n-\n-\t\tNode-path: hello\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tProp-content-length: 10\n-\t\tText-content-length: 3\n-\t\tContent-length: 13\n-\n-\t\tPROPS-END\n-\t\thi\n-\n-\t\tEOF\n-\t\techo Revision-number: 2 &&\n-\t\techo Prop-content-length: $(wc -c <props2) &&\n-\t\techo Content-length: $(wc -c <props2) &&\n-\t\techo &&\n-\t\tcat props2 &&\n-\t\tcat <<-\\EOF &&\n-\n-\t\tNode-path: hello\n-\t\tNode-kind: file\n-\t\tNode-action: change\n-\t\tText-delta: true\n-\t\tProp-content-length: 10\n-\t\tEOF\n-\t\techo Text-content-length: $(wc -c <delta) &&\n-\t\techo Content-length: $((10 + $(wc -c <delta))) &&\n-\t\techo &&\n-\t\techo PROPS-END &&\n-\t\tcat delta\n-\t} >delta.dump &&\n-\ttry_dump delta.dump\n-'\n-\n-test_expect_success 'property deltas supported' '\n-\treinit_git &&\n-\tcat >expect <<-\\EOF &&\n-\tOBJID\n-\t:100755 100644 OBJID OBJID M\tscript.sh\n-\tEOF\n-\t{\n-\t\tproperties \\\n-\t\t\tsvn:author author@example.com \\\n-\t\t\tsvn:date \"1999-03-06T00:01:002.000000Z\" \\\n-\t\t\tsvn:log \"make an executable, or chmod -x it\" &&\n-\t\techo PROPS-END\n-\t} >revprops &&\n-\t{\n-\t\techo SVN-fs-dump-format-version: 3 &&\n-\t\techo &&\n-\t\techo Revision-number: 1 &&\n-\t\techo Prop-content-length: $(wc -c <revprops) &&\n-\t\techo Content-length: $(wc -c <revprops) &&\n-\t\techo &&\n-\t\tcat revprops &&\n-\t\techo &&\n-\t\tcat <<-\\EOF &&\n-\t\tNode-path: script.sh\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tText-content-length: 0\n-\t\tProp-content-length: 39\n-\t\tContent-length: 39\n-\n-\t\tK 14\n-\t\tsvn:executable\n-\t\tV 4\n-\t\ttrue\n-\t\tPROPS-END\n-\n-\t\tEOF\n-\t\techo Revision-number: 2 &&\n-\t\techo Prop-content-length: $(wc -c <revprops) &&\n-\t\techo Content-length: $(wc -c <revprops) &&\n-\t\techo &&\n-\t\tcat revprops &&\n-\t\techo &&\n-\t\tcat <<-\\EOF\n-\t\tNode-path: script.sh\n-\t\tNode-kind: file\n-\t\tNode-action: change\n-\t\tProp-delta: true\n-\t\tProp-content-length: 30\n-\t\tContent-length: 30\n-\n-\t\tD 14\n-\t\tsvn:executable\n-\t\tPROPS-END\n-\t\tEOF\n-\t} >propdelta.dump &&\n-\ttry_dump propdelta.dump &&\n-\t{\n-\t\tgit rev-list HEAD |\n-\t\tgit diff-tree --stdin |\n-\t\tsed \"s/$OID_REGEX/OBJID/g\"\n-\t} >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'properties on /' '\n-\treinit_git &&\n-\tcat <<-\\EOF >expect &&\n-\tOBJID\n-\tOBJID\n-\t:000000 100644 OBJID OBJID A\tgreeting\n-\tEOF\n-\tsed -e \"s/X$//\" <<-\\EOF >changeroot.dump &&\n-\tSVN-fs-dump-format-version: 3\n-\n-\tRevision-number: 1\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: greeting\n-\tNode-kind: file\n-\tNode-action: add\n-\tText-content-length: 0\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tRevision-number: 2\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: X\n-\tNode-kind: dir\n-\tNode-action: change\n-\tProp-delta: true\n-\tProp-content-length: 43\n-\tContent-length: 43\n-\n-\tK 10\n-\tsvn:ignore\n-\tV 11\n-\tbuild-area\n-\n-\tPROPS-END\n-\tEOF\n-\ttry_dump changeroot.dump &&\n-\t{\n-\t\tgit rev-list HEAD |\n-\t\tgit diff-tree --root --always --stdin |\n-\t\tsed \"s/$OID_REGEX/OBJID/g\"\n-\t} >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'deltas for typechange' '\n-\treinit_git &&\n-\tcat >expect <<-\\EOF &&\n-\tOBJID\n-\t:120000 100644 OBJID OBJID T\ttest-file\n-\tOBJID\n-\t:100755 120000 OBJID OBJID T\ttest-file\n-\tOBJID\n-\t:000000 100755 OBJID OBJID A\ttest-file\n-\tEOF\n-\tcat >deleteprop.dump <<-\\EOF &&\n-\tSVN-fs-dump-format-version: 3\n-\n-\tRevision-number: 1\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: test-file\n-\tNode-kind: file\n-\tNode-action: add\n-\tProp-delta: true\n-\tProp-content-length: 35\n-\tText-content-length: 17\n-\tContent-length: 52\n-\n-\tK 14\n-\tsvn:executable\n-\tV 0\n-\n-\tPROPS-END\n-\tlink testing 123\n-\n-\tRevision-number: 2\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: test-file\n-\tNode-kind: file\n-\tNode-action: change\n-\tProp-delta: true\n-\tProp-content-length: 53\n-\tText-content-length: 17\n-\tContent-length: 70\n-\n-\tK 11\n-\tsvn:special\n-\tV 1\n-\t*\n-\tD 14\n-\tsvn:executable\n-\tPROPS-END\n-\tlink testing 231\n-\n-\tRevision-number: 3\n-\tProp-content-length: 10\n-\tContent-length: 10\n-\n-\tPROPS-END\n-\n-\tNode-path: test-file\n-\tNode-kind: file\n-\tNode-action: change\n-\tProp-delta: true\n-\tProp-content-length: 27\n-\tText-content-length: 17\n-\tContent-length: 44\n-\n-\tD 11\n-\tsvn:special\n-\tPROPS-END\n-\tlink testing 321\n-\tEOF\n-\ttry_dump deleteprop.dump &&\n-\t{\n-\t\tgit rev-list HEAD |\n-\t\tgit diff-tree --root --stdin |\n-\t\tsed \"s/$OID_REGEX/OBJID/g\"\n-\t} >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'deltas need not consume the whole preimage' '\n-\treinit_git &&\n-\tcat >expect <<-\\EOF &&\n-\tOBJID\n-\t:120000 100644 OBJID OBJID T\tpostimage\n-\tOBJID\n-\t:100644 120000 OBJID OBJID T\tpostimage\n-\tOBJID\n-\t:000000 100644 OBJID OBJID A\tpostimage\n-\tEOF\n-\techo \"first preimage\" >expect.1 &&\n-\tprintf target >expect.2 &&\n-\tprintf lnk >expect.3 &&\n-\t{\n-\t\tprintf \"SVNQ%b%b%b\" \"QQ\\017\\001\\017\" \"\\0217\" \"first preimage\\n\" |\n-\t\tq_to_nul\n-\t} >delta.1 &&\n-\t{\n-\t\tproperties svn:special \"*\" &&\n-\t\techo PROPS-END\n-\t} >symlink.props &&\n-\t{\n-\t\tprintf \"SVNQ%b%b%b\" \"Q\\002\\013\\004\\012\" \"\\0201\\001\\001\\0211\" \"lnk target\" |\n-\t\tq_to_nul\n-\t} >delta.2 &&\n-\t{\n-\t\tprintf \"SVNQ%b%b\" \"Q\\004\\003\\004Q\" \"\\001Q\\002\\002\" |\n-\t\tq_to_nul\n-\t} >delta.3 &&\n-\t{\n-\t\tcat <<-\\EOF &&\n-\t\tSVN-fs-dump-format-version: 3\n-\n-\t\tRevision-number: 1\n-\t\tProp-content-length: 10\n-\t\tContent-length: 10\n-\n-\t\tPROPS-END\n-\n-\t\tNode-path: postimage\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tText-delta: true\n-\t\tProp-content-length: 10\n-\t\tEOF\n-\t\techo Text-content-length: $(wc -c <delta.1) &&\n-\t\techo Content-length: $((10 + $(wc -c <delta.1))) &&\n-\t\techo &&\n-\t\techo PROPS-END &&\n-\t\tcat delta.1 &&\n-\t\tcat <<-\\EOF &&\n-\n-\t\tRevision-number: 2\n-\t\tProp-content-length: 10\n-\t\tContent-length: 10\n-\n-\t\tPROPS-END\n-\n-\t\tNode-path: postimage\n-\t\tNode-kind: file\n-\t\tNode-action: change\n-\t\tText-delta: true\n-\t\tEOF\n-\t\techo Prop-content-length: $(wc -c <symlink.props) &&\n-\t\techo Text-content-length: $(wc -c <delta.2) &&\n-\t\techo Content-length: $(($(wc -c <symlink.props) + $(wc -c <delta.2))) &&\n-\t\techo &&\n-\t\tcat symlink.props &&\n-\t\tcat delta.2 &&\n-\t\tcat <<-\\EOF &&\n-\n-\t\tRevision-number: 3\n-\t\tProp-content-length: 10\n-\t\tContent-length: 10\n-\n-\t\tPROPS-END\n-\n-\t\tNode-path: postimage\n-\t\tNode-kind: file\n-\t\tNode-action: change\n-\t\tText-delta: true\n-\t\tProp-content-length: 10\n-\t\tEOF\n-\t\techo Text-content-length: $(wc -c <delta.3) &&\n-\t\techo Content-length: $((10 + $(wc -c <delta.3))) &&\n-\t\techo &&\n-\t\techo PROPS-END &&\n-\t\tcat delta.3 &&\n-\t\techo\n-\t} >deltapartial.dump &&\n-\ttry_dump deltapartial.dump &&\n-\t{\n-\t\tgit rev-list HEAD |\n-\t\tgit diff-tree --root --stdin |\n-\t\tsed \"s/$OID_REGEX/OBJID/g\"\n-\t} >actual &&\n-\ttest_cmp expect actual &&\n-\tgit show HEAD:postimage >actual.3 &&\n-\tgit show HEAD^:postimage >actual.2 &&\n-\tgit show HEAD^^:postimage >actual.1 &&\n-\ttest_cmp expect.1 actual.1 &&\n-\ttest_cmp expect.2 actual.2 &&\n-\ttest_cmp expect.3 actual.3\n-'\n-\n-test_expect_success 'no hang for delta trying to read past end of preimage' '\n-\treinit_git &&\n-\t{\n-\t\t# COPY 1\n-\t\tprintf \"SVNQ%b%b\" \"Q\\001\\001\\002Q\" \"\\001Q\" |\n-\t\tq_to_nul\n-\t} >greedy.delta &&\n-\t{\n-\t\tcat <<-\\EOF &&\n-\t\tSVN-fs-dump-format-version: 3\n-\n-\t\tRevision-number: 1\n-\t\tProp-content-length: 10\n-\t\tContent-length: 10\n-\n-\t\tPROPS-END\n-\n-\t\tNode-path: bootstrap\n-\t\tNode-kind: file\n-\t\tNode-action: add\n-\t\tText-delta: true\n-\t\tProp-content-length: 10\n-\t\tEOF\n-\t\techo Text-content-length: $(wc -c <greedy.delta) &&\n-\t\techo Content-length: $((10 + $(wc -c <greedy.delta))) &&\n-\t\techo &&\n-\t\techo PROPS-END &&\n-\t\tcat greedy.delta &&\n-\t\techo\n-\t} >greedydelta.dump &&\n-\ttry_dump greedydelta.dump must_fail might_fail\n-'\n-\n-test_expect_success 'set up svn repo' '\n-\tsvnconf=$PWD/svnconf &&\n-\tmkdir -p \"$svnconf\" &&\n-\n-\tif\n-\t\tsvnadmin -h >/dev/null 2>&1 &&\n-\t\tsvnadmin create simple-svn &&\n-\t\tsvnadmin load simple-svn <\"$TEST_DIRECTORY/t9135/svn.dump\" &&\n-\t\tsvn export --config-dir \"$svnconf\" \"file://$PWD/simple-svn\" simple-svnco\n-\tthen\n-\t\ttest_set_prereq SVNREPO\n-\tfi\n-'\n-\n-test_expect_success SVNREPO 't9135/svn.dump' '\n-\tmkdir -p simple-git &&\n-\t(\n-\t\tcd simple-git &&\n-\t\treinit_git &&\n-\t\ttry_dump \"$TEST_DIRECTORY/t9135/svn.dump\"\n-\t) &&\n-\t(\n-\t\tcd simple-svnco &&\n-\t\tgit init &&\n-\t\tgit add . &&\n-\t\tgit fetch ../simple-git master &&\n-\t\tgit diff --exit-code FETCH_HEAD\n-\t)\n-'\n-\n-test_done\ndiff --git a/t/t9011-svn-da.sh b/t/t9011-svn-da.sh\ndeleted file mode 100755\nindex ab1ef28fd9..0000000000\n--- a/t/t9011-svn-da.sh\n+++ /dev/null\n@@ -1,248 +0,0 @@\n-#!/bin/sh\n-\n-test_description='test parsing of svndiff0 files\n-\n-Using the \"test-svn-fe -d\" helper, check that svn-fe correctly\n-interprets deltas using various facilities (some from the spec,\n-some only learned from practice).\n-'\n-. ./test-lib.sh\n-\n->empty\n-printf foo >preimage\n-\n-test_expect_success 'reject empty delta' '\n-\ttest_must_fail test-svn-fe -d preimage empty 0\n-'\n-\n-test_expect_success 'delta can empty file' '\n-\tprintf \"SVNQ\" | q_to_nul >clear.delta &&\n-\ttest-svn-fe -d preimage clear.delta 4 >actual &&\n-\ttest_must_be_empty actual\n-'\n-\n-test_expect_success 'reject svndiff2' '\n-\tprintf \"SVN\\002\" >bad.filetype &&\n-\ttest_must_fail test-svn-fe -d preimage bad.filetype 4\n-'\n-\n-test_expect_success 'one-window empty delta' '\n-\tprintf \"SVNQ%s\" \"QQQQQ\" | q_to_nul >clear.onewindow &&\n-\ttest-svn-fe -d preimage clear.onewindow 9 >actual &&\n-\ttest_must_be_empty actual\n-'\n-\n-test_expect_success 'reject incomplete window header' '\n-\tprintf \"SVNQ%s\" \"QQQQQ\" | q_to_nul >clear.onewindow &&\n-\tprintf \"SVNQ%s\" \"QQ\" | q_to_nul >clear.partialwindow &&\n-\ttest_must_fail test-svn-fe -d preimage clear.onewindow 6 &&\n-\ttest_must_fail test-svn-fe -d preimage clear.partialwindow 6\n-'\n-\n-test_expect_success 'reject declared delta longer than actual delta' '\n-\tprintf \"SVNQ%s\" \"QQQQQ\" | q_to_nul >clear.onewindow &&\n-\tprintf \"SVNQ%s\" \"QQ\" | q_to_nul >clear.partialwindow &&\n-\ttest_must_fail test-svn-fe -d preimage clear.onewindow 14 &&\n-\ttest_must_fail test-svn-fe -d preimage clear.partialwindow 9\n-'\n-\n-test_expect_success 'two-window empty delta' '\n-\tprintf \"SVNQ%s%s\" \"QQQQQ\" \"QQQQQ\" | q_to_nul >clear.twowindow &&\n-\ttest-svn-fe -d preimage clear.twowindow 14 >actual &&\n-\ttest_must_fail test-svn-fe -d preimage clear.twowindow 13 &&\n-\ttest_must_be_empty actual\n-'\n-\n-test_expect_success 'noisy zeroes' '\n-\tprintf \"SVNQ%s\" \\\n-\t\t\"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRQQQQQ\" |\n-\t\ttr R \"\\200\" |\n-\t\tq_to_nul >clear.noisy &&\n-\tlen=$(wc -c <clear.noisy) &&\n-\ttest-svn-fe -d preimage clear.noisy $len &&\n-\ttest_must_be_empty actual\n-'\n-\n-test_expect_success 'reject variable-length int in magic' '\n-\tprintf \"SVNRQ\" | tr R \"\\200\" | q_to_nul >clear.badmagic &&\n-\ttest_must_fail test-svn-fe -d preimage clear.badmagic 5\n-'\n-\n-test_expect_success 'reject truncated integer' '\n-\tprintf \"SVNQ%s%s\" \"QQQQQ\" \"QQQQRRQ\" |\n-\t\ttr R \"\\200\" |\n-\t\tq_to_nul >clear.fullint &&\n-\tprintf \"SVNQ%s%s\" \"QQQQQ\" \"QQQQRR\" |\n-\t\ttr RT \"\\201\" |\n-\t\tq_to_nul >clear.partialint &&\n-\ttest_must_fail test-svn-fe -d preimage clear.fullint 15 &&\n-\ttest-svn-fe -d preimage clear.fullint 16 &&\n-\ttest_must_fail test-svn-fe -d preimage clear.partialint 15\n-'\n-\n-test_expect_success 'nonempty (but unused) preimage view' '\n-\tprintf \"SVNQ%b\" \"Q\\003QQQ\" | q_to_nul >clear.readpreimage &&\n-\ttest-svn-fe -d preimage clear.readpreimage 9 >actual &&\n-\ttest_must_be_empty actual\n-'\n-\n-test_expect_success 'preimage view: right endpoint cannot backtrack' '\n-\tprintf \"SVNQ%b%b\" \"Q\\003QQQ\" \"Q\\002QQQ\" |\n-\t\tq_to_nul >clear.backtrack &&\n-\ttest_must_fail test-svn-fe -d preimage clear.backtrack 14\n-'\n-\n-test_expect_success 'preimage view: left endpoint can advance' '\n-\tprintf \"SVNQ%b%b\" \"Q\\003QQQ\" \"\\001\\002QQQ\" |\n-\t\tq_to_nul >clear.preshrink &&\n-\tprintf \"SVNQ%b%b\" \"Q\\003QQQ\" \"\\001\\001QQQ\" |\n-\t\tq_to_nul >clear.shrinkbacktrack &&\n-\ttest-svn-fe -d preimage clear.preshrink 14 >actual &&\n-\ttest_must_fail test-svn-fe -d preimage clear.shrinkbacktrack 14 &&\n-\ttest_must_be_empty actual\n-'\n-\n-test_expect_success 'preimage view: offsets compared by value' '\n-\tprintf \"SVNQ%b%b\" \"\\001\\001QQQ\" \"\\0200Q\\003QQQ\" |\n-\t\tq_to_nul >clear.noisybacktrack &&\n-\tprintf \"SVNQ%b%b\" \"\\001\\001QQQ\" \"\\0200\\001\\002QQQ\" |\n-\t\tq_to_nul >clear.noisyadvance &&\n-\ttest_must_fail test-svn-fe -d preimage clear.noisybacktrack 15 &&\n-\ttest-svn-fe -d preimage clear.noisyadvance 15 &&\n-\ttest_must_be_empty actual\n-'\n-\n-test_expect_success 'preimage view: reject truncated preimage' '\n-\tprintf \"SVNQ%b\" \"\\010QQQQ\" | q_to_nul >clear.lateemptyread &&\n-\tprintf \"SVNQ%b\" \"\\010\\001QQQ\" | q_to_nul >clear.latenonemptyread &&\n-\tprintf \"SVNQ%b\" \"\\001\\010QQQ\" | q_to_nul >clear.longread &&\n-\ttest_must_fail test-svn-fe -d preimage clear.lateemptyread 9 &&\n-\ttest_must_fail test-svn-fe -d preimage clear.latenonemptyread 9 &&\n-\ttest_must_fail test-svn-fe -d preimage clear.longread 9\n-'\n-\n-test_expect_success 'forbid unconsumed inline data' '\n-\tprintf \"SVNQ%b%s%b%s\" \"QQQQ\\003\" \"bar\" \"QQQQ\\001\" \"x\" |\n-\t\tq_to_nul >inline.clear &&\n-\ttest_must_fail test-svn-fe -d preimage inline.clear 18 >actual\n-'\n-\n-test_expect_success 'reject truncated inline data' '\n-\tprintf \"SVNQ%b%s\" \"QQQQ\\003\" \"b\" | q_to_nul >inline.trunc &&\n-\ttest_must_fail test-svn-fe -d preimage inline.trunc 10\n-'\n-\n-test_expect_success 'reject truncated inline data (after instruction section)' '\n-\tprintf \"SVNQ%b%b%s\" \"QQ\\001\\001\\003\" \"\\0201\" \"b\" | q_to_nul >insn.trunc &&\n-\ttest_must_fail test-svn-fe -d preimage insn.trunc 11\n-'\n-\n-test_expect_success 'copyfrom_data' '\n-\techo hi >expect &&\n-\tprintf \"SVNQ%b%b%b\" \"QQ\\003\\001\\003\" \"\\0203\" \"hi\\n\" | q_to_nul >copydat &&\n-\ttest-svn-fe -d preimage copydat 13 >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'multiple copyfrom_data' '\n-\techo hi >expect &&\n-\tprintf \"SVNQ%b%b%b%b%b\" \"QQ\\003\\002\\003\" \"\\0201\\0202\" \"hi\\n\" \\\n-\t\t\"QQQ\\002Q\" \"\\0200Q\" | q_to_nul >copy.multi &&\n-\tlen=$(wc -c <copy.multi) &&\n-\ttest-svn-fe -d preimage copy.multi $len >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'incomplete multiple insn' '\n-\tprintf \"SVNQ%b%b%b\" \"QQ\\003\\002\\003\" \"\\0203\\0200\" \"hi\\n\" |\n-\t\tq_to_nul >copy.partial &&\n-\tlen=$(wc -c <copy.partial) &&\n-\ttest_must_fail test-svn-fe -d preimage copy.partial $len\n-'\n-\n-test_expect_success 'catch attempt to copy missing data' '\n-\tprintf \"SVNQ%b%b%s%b%s\" \"QQ\\002\\002\\001\" \"\\0201\\0201\" \"X\" \\\n-\t\t\t\"QQQQ\\002\" \"YZ\" |\n-\t\tq_to_nul >copy.incomplete &&\n-\tlen=$(wc -c <copy.incomplete) &&\n-\ttest_must_fail test-svn-fe -d preimage copy.incomplete $len\n-'\n-\n-test_expect_success 'copyfrom target to repeat data' '\n-\tprintf foofoo >expect &&\n-\tprintf \"SVNQ%b%b%s\" \"QQ\\006\\004\\003\" \"\\0203\\0100\\003Q\" \"foo\" |\n-\t\tq_to_nul >copytarget.repeat &&\n-\tlen=$(wc -c <copytarget.repeat) &&\n-\ttest-svn-fe -d preimage copytarget.repeat $len >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'copyfrom target out of order' '\n-\tprintf foooof >expect &&\n-\tprintf \"SVNQ%b%b%s\" \\\n-\t\t\"QQ\\006\\007\\003\" \"\\0203\\0101\\002\\0101\\001\\0101Q\" \"foo\" |\n-\t\tq_to_nul >copytarget.reverse &&\n-\tlen=$(wc -c <copytarget.reverse) &&\n-\ttest-svn-fe -d preimage copytarget.reverse $len >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'catch copyfrom future' '\n-\tprintf \"SVNQ%b%b%s\" \"QQ\\004\\004\\003\" \"\\0202\\0101\\002\\0201\" \"XYZ\" |\n-\t\tq_to_nul >copytarget.infuture &&\n-\tlen=$(wc -c <copytarget.infuture) &&\n-\ttest_must_fail test-svn-fe -d preimage copytarget.infuture $len\n-'\n-\n-test_expect_success 'copy to sustain' '\n-\tprintf XYXYXYXYXYXZ >expect &&\n-\tprintf \"SVNQ%b%b%s\" \"QQ\\014\\004\\003\" \"\\0202\\0111Q\\0201\" \"XYZ\" |\n-\t\tq_to_nul >copytarget.sustain &&\n-\tlen=$(wc -c <copytarget.sustain) &&\n-\ttest-svn-fe -d preimage copytarget.sustain $len >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'catch copy that overflows' '\n-\tprintf \"SVNQ%b%b%s\" \"QQ\\003\\003\\001\" \"\\0201\\0177Q\" X |\n-\t\tq_to_nul >copytarget.overflow &&\n-\tlen=$(wc -c <copytarget.overflow) &&\n-\ttest_must_fail test-svn-fe -d preimage copytarget.overflow $len\n-'\n-\n-test_expect_success 'copyfrom source' '\n-\tprintf foo >expect &&\n-\tprintf \"SVNQ%b%b\" \"Q\\003\\003\\002Q\" \"\\003Q\" | q_to_nul >copysource.all &&\n-\ttest-svn-fe -d preimage copysource.all 11 >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'copy backwards' '\n-\tprintf oof >expect &&\n-\tprintf \"SVNQ%b%b\" \"Q\\003\\003\\006Q\" \"\\001\\002\\001\\001\\001Q\" |\n-\t\tq_to_nul >copysource.rev &&\n-\ttest-svn-fe -d preimage copysource.rev 15 >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'offsets are relative to window' '\n-\tprintf fo >expect &&\n-\tprintf \"SVNQ%b%b%b%b\" \"Q\\003\\001\\002Q\" \"\\001Q\" \\\n-\t\t\"\\002\\001\\001\\002Q\" \"\\001Q\" |\n-\t\tq_to_nul >copysource.two &&\n-\ttest-svn-fe -d preimage copysource.two 18 >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_expect_success 'example from notes/svndiff' '\n-\tprintf aaaaccccdddddddd >expect &&\n-\tprintf aaaabbbbcccc >source &&\n-\tprintf \"SVNQ%b%b%s\" \"Q\\014\\020\\007\\001\" \\\n-\t\t\"\\004Q\\004\\010\\0201\\0107\\010\" d |\n-\t\tq_to_nul >delta.example &&\n-\tlen=$(wc -c <delta.example) &&\n-\ttest-svn-fe -d source delta.example $len >actual &&\n-\ttest_cmp expect actual\n-'\n-\n-test_done\ndiff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh\ndeleted file mode 100755\nindex 754c4a3284..0000000000\n--- a/t/t9020-remote-svn.sh\n+++ /dev/null\n@@ -1,95 +0,0 @@\n-#!/bin/sh\n-\n-test_description='tests remote-svn'\n-\n-. ./test-lib.sh\n-\n-MARKSPATH=.git/info/fast-import/remote-svn\n-\n-if ! test_have_prereq PYTHON\n-then\n-\tskip_all='skipping remote-svn tests, python not available'\n-\ttest_done\n-fi\n-\n-# Override svnrdump with our simulator\n-PATH=\"$HOME:$PATH\"\n-export PATH PYTHON_PATH GIT_BUILD_DIR\n-\n-write_script \"$HOME/svnrdump\" <<\\EOF\n-exec \"$PYTHON_PATH\" \"$GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py\" \"$@\"\n-EOF\n-\n-init_git () {\n-\trm -fr .git &&\n-\tgit init &&\n-\t#git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump\n-\t# let's reuse an existing dump file!?\n-\tgit remote add svnsim \"testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump\"\n-\tgit remote add svnfile \"testsvn::file://$TEST_DIRECTORY/t9154/svn.dump\"\n-}\n-\n-if test -e \"$GIT_BUILD_DIR/git-remote-testsvn\"\n-then\n-\ttest_set_prereq REMOTE_SVN\n-fi\n-\n-test_debug '\n-\tgit --version\n-\ttype git\n-\ttype svnrdump\n-'\n-\n-test_expect_success REMOTE_SVN 'simple fetch' '\n-\tinit_git &&\n-\tgit fetch svnsim &&\n-\ttest_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master  &&\n-\tcp .git/refs/remotes/svnsim/master master.good\n-'\n-\n-test_debug '\n-\tgit show-ref -s refs/svn/svnsim/master\n-\tgit show-ref -s refs/remotes/svnsim/master\n-'\n-\n-test_expect_success REMOTE_SVN 'repeated fetch, nothing shall change' '\n-\tgit fetch svnsim &&\n-\ttest_cmp master.good .git/refs/remotes/svnsim/master\n-'\n-\n-test_expect_success REMOTE_SVN 'fetch from a file:// url gives the same result' '\n-\tgit fetch svnfile\n-'\n-\n-test_expect_failure REMOTE_SVN 'the sha1 differ because the git-svn-id line in the commit msg contains the url' '\n-\ttest_cmp .git/refs/remotes/svnfile/master .git/refs/remotes/svnsim/master\n-'\n-\n-test_expect_success REMOTE_SVN 'mark-file regeneration' '\n-\t# filter out any other marks, that can not be regenerated. Only up to 3 digit revisions are allowed here\n-\tgrep \":[0-9]\\{1,3\\} \" $MARKSPATH/svnsim.marks > $MARKSPATH/svnsim.marks.old &&\n-\trm $MARKSPATH/svnsim.marks &&\n-\tgit fetch svnsim &&\n-\ttest_cmp $MARKSPATH/svnsim.marks.old $MARKSPATH/svnsim.marks\n-'\n-\n-test_expect_success REMOTE_SVN 'incremental imports must lead to the same head' '\n-\tSVNRMAX=3 &&\n-\texport SVNRMAX &&\n-\tinit_git &&\n-\tgit fetch svnsim &&\n-\ttest_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master  &&\n-\tunset SVNRMAX &&\n-\tgit fetch svnsim &&\n-\ttest_cmp master.good .git/refs/remotes/svnsim/master\n-'\n-\n-test_expect_success REMOTE_SVN 'respects configured default initial branch' '\n-\tgit -c init.defaultBranch=trunk remote add -f trunk \\\n-\t\t\"testsvn::file://$TEST_DIRECTORY/t9154/svn.dump\" &&\n-\tgit rev-parse --verify refs/remotes/trunk/trunk\n-'\n-\n-test_debug 'git branch -a'\n-\n-test_done\ndiff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\nindex 596c549cdd..6d9ea1bb67 100644\n--- a/t/test-lib-functions.sh\n+++ b/t/test-lib-functions.sh\n@@ -820,7 +820,7 @@ test_must_fail_acceptable () {\n \tfi\n \n \tcase \"$1\" in\n-\tgit|__git*|test-tool|test-svn-fe|test_terminal)\n+\tgit|__git*|test-tool|test_terminal)\n \t\treturn 0\n \t\t;;\n \t*)\ndiff --git a/vcs-svn/LICENSE b/vcs-svn/LICENSE\ndeleted file mode 100644\nindex eb91858b82..0000000000\n--- a/vcs-svn/LICENSE\n+++ /dev/null\n@@ -1,32 +0,0 @@\n-Copyright (C) 2010 David Barr <david.barr@cordelta.com>.\n-All rights reserved.\n-\n-Copyright (C) 2010 Jonathan Nieder <jrnieder@gmail.com>.\n-\n-Copyright (C) 2005 Stefan Hegny, hydrografix Consulting GmbH,\n-Frankfurt/Main, Germany\n-and others, see http://svn2cc.sarovar.org\n-\n-Redistribution and use in source and binary forms, with or without\n-modification, are permitted provided that the following conditions\n-are met:\n-1. Redistributions of source code must retain the above copyright\n-   notice(s), this list of conditions and the following disclaimer\n-   unmodified other than the allowable addition of one or more\n-   copyright notices.\n-2. Redistributions in binary form must reproduce the above copyright\n-   notice(s), this list of conditions and the following disclaimer in\n-   the documentation and/or other materials provided with the\n-   distribution.\n-\n-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY\n-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n-PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE\n-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ndiff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c\ndeleted file mode 100644\nindex b5b8913cb0..0000000000\n--- a/vcs-svn/fast_export.c\n+++ /dev/null\n@@ -1,365 +0,0 @@\n-/*\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"cache.h\"\n-#include \"quote.h\"\n-#include \"fast_export.h\"\n-#include \"strbuf.h\"\n-#include \"svndiff.h\"\n-#include \"sliding_window.h\"\n-#include \"line_buffer.h\"\n-\n-#define MAX_GITSVN_LINE_LEN 4096\n-\n-static uint32_t first_commit_done;\n-static struct line_buffer postimage = LINE_BUFFER_INIT;\n-static struct line_buffer report_buffer = LINE_BUFFER_INIT;\n-\n-/* NEEDSWORK: move to fast_export_init() */\n-static int init_postimage(void)\n-{\n-\tstatic int postimage_initialized;\n-\tif (postimage_initialized)\n-\t\treturn 0;\n-\tpostimage_initialized = 1;\n-\treturn buffer_tmpfile_init(&postimage);\n-}\n-\n-void fast_export_init(int fd)\n-{\n-\tfirst_commit_done = 0;\n-\tif (buffer_fdinit(&report_buffer, fd))\n-\t\tdie_errno(\"cannot read from file descriptor %d\", fd);\n-}\n-\n-void fast_export_deinit(void)\n-{\n-\tif (buffer_deinit(&report_buffer))\n-\t\tdie_errno(\"error closing fast-import feedback stream\");\n-}\n-\n-void fast_export_delete(const char *path)\n-{\n-\tputchar('D');\n-\tputchar(' ');\n-\tquote_c_style(path, NULL, stdout, 0);\n-\tputchar('\\n');\n-}\n-\n-static void fast_export_truncate(const char *path, uint32_t mode)\n-{\n-\tfast_export_modify(path, mode, \"inline\");\n-\tprintf(\"data 0\\n\\n\");\n-}\n-\n-void fast_export_modify(const char *path, uint32_t mode, const char *dataref)\n-{\n-\t/* Mode must be 100644, 100755, 120000, or 160000. */\n-\tif (!dataref) {\n-\t\tfast_export_truncate(path, mode);\n-\t\treturn;\n-\t}\n-\tprintf(\"M %06\"PRIo32\" %s \", mode, dataref);\n-\tquote_c_style(path, NULL, stdout, 0);\n-\tputchar('\\n');\n-}\n-\n-void fast_export_begin_note(uint32_t revision, const char *author,\n-\t\tconst char *log, timestamp_t timestamp, const char *note_ref)\n-{\n-\tstatic int firstnote = 1;\n-\tsize_t loglen = strlen(log);\n-\tprintf(\"commit %s\\n\", note_ref);\n-\tprintf(\"committer %s <%s@%s> %\"PRItime\" +0000\\n\", author, author, \"local\", timestamp);\n-\tprintf(\"data %\"PRIuMAX\"\\n\", (uintmax_t)loglen);\n-\tfwrite(log, loglen, 1, stdout);\n-\tif (firstnote) {\n-\t\tif (revision > 1)\n-\t\t\tprintf(\"from %s^0\", note_ref);\n-\t\tfirstnote = 0;\n-\t}\n-\tfputc('\\n', stdout);\n-}\n-\n-void fast_export_note(const char *committish, const char *dataref)\n-{\n-\tprintf(\"N %s %s\\n\", dataref, committish);\n-}\n-\n-static char gitsvnline[MAX_GITSVN_LINE_LEN];\n-void fast_export_begin_commit(uint32_t revision, const char *author,\n-\t\t\tconst struct strbuf *log,\n-\t\t\tconst char *uuid, const char *url,\n-\t\t\ttimestamp_t timestamp, const char *local_ref)\n-{\n-\tstatic const struct strbuf empty = STRBUF_INIT;\n-\tif (!log)\n-\t\tlog = &empty;\n-\tif (*uuid && *url) {\n-\t\tsnprintf(gitsvnline, MAX_GITSVN_LINE_LEN,\n-\t\t\t\t\"\\n\\ngit-svn-id: %s@%\"PRIu32\" %s\\n\",\n-\t\t\t\t url, revision, uuid);\n-\t} else {\n-\t\t*gitsvnline = '\\0';\n-\t}\n-\tprintf(\"commit %s\\n\", local_ref);\n-\tprintf(\"mark :%\"PRIu32\"\\n\", revision);\n-\tprintf(\"committer %s <%s@%s> %\"PRItime\" +0000\\n\",\n-\t\t   *author ? author : \"nobody\",\n-\t\t   *author ? author : \"nobody\",\n-\t\t   *uuid ? uuid : \"local\", timestamp);\n-\tprintf(\"data %\"PRIuMAX\"\\n\",\n-\t\t(uintmax_t) (log->len + strlen(gitsvnline)));\n-\tfwrite(log->buf, log->len, 1, stdout);\n-\tprintf(\"%s\\n\", gitsvnline);\n-\tif (!first_commit_done) {\n-\t\tif (revision > 1)\n-\t\t\tprintf(\"from :%\"PRIu32\"\\n\", revision - 1);\n-\t\tfirst_commit_done = 1;\n-\t}\n-}\n-\n-void fast_export_end_commit(uint32_t revision)\n-{\n-\tprintf(\"progress Imported commit %\"PRIu32\".\\n\\n\", revision);\n-}\n-\n-static void ls_from_rev(uint32_t rev, const char *path)\n-{\n-\t/* ls :5 path/to/old/file */\n-\tprintf(\"ls :%\"PRIu32\" \", rev);\n-\tquote_c_style(path, NULL, stdout, 0);\n-\tputchar('\\n');\n-\tfflush(stdout);\n-}\n-\n-static void ls_from_active_commit(const char *path)\n-{\n-\t/* ls \"path/to/file\" */\n-\tprintf(\"ls \\\"\");\n-\tquote_c_style(path, NULL, stdout, 1);\n-\tprintf(\"\\\"\\n\");\n-\tfflush(stdout);\n-}\n-\n-static const char *get_response_line(void)\n-{\n-\tconst char *line = buffer_read_line(&report_buffer);\n-\tif (line)\n-\t\treturn line;\n-\tif (buffer_ferror(&report_buffer))\n-\t\tdie_errno(\"error reading from fast-import\");\n-\tdie(\"unexpected end of fast-import feedback\");\n-}\n-\n-static void die_short_read(struct line_buffer *input)\n-{\n-\tif (buffer_ferror(input))\n-\t\tdie_errno(\"error reading dump file\");\n-\tdie(\"invalid dump: unexpected end of file\");\n-}\n-\n-static int parse_cat_response_line(const char *header, off_t *len)\n-{\n-\tuintmax_t n;\n-\tconst char *type;\n-\tconst char *end;\n-\n-\tif (ends_with(header, \" missing\"))\n-\t\treturn error(\"cat-blob reports missing blob: %s\", header);\n-\ttype = strstr(header, \" blob \");\n-\tif (!type)\n-\t\treturn error(\"cat-blob header has wrong object type: %s\", header);\n-\tn = strtoumax(type + strlen(\" blob \"), (char **) &end, 10);\n-\tif (end == type + strlen(\" blob \"))\n-\t\treturn error(\"cat-blob header does not contain length: %s\", header);\n-\tif (memchr(type + strlen(\" blob \"), '-', end - type - strlen(\" blob \")))\n-\t\treturn error(\"cat-blob header contains negative length: %s\", header);\n-\tif (n == UINTMAX_MAX || n > maximum_signed_value_of_type(off_t))\n-\t\treturn error(\"blob too large for current definition of off_t\");\n-\t*len = n;\n-\tif (*end)\n-\t\treturn error(\"cat-blob header contains garbage after length: %s\", header);\n-\treturn 0;\n-}\n-\n-static void check_preimage_overflow(off_t a, off_t b)\n-{\n-\tif (signed_add_overflows(a, b))\n-\t\tdie(\"blob too large for current definition of off_t\");\n-}\n-\n-static long apply_delta(off_t len, struct line_buffer *input,\n-\t\t\tconst char *old_data, uint32_t old_mode)\n-{\n-\tlong ret;\n-\tstruct sliding_view preimage = SLIDING_VIEW_INIT(&report_buffer, 0);\n-\tFILE *out;\n-\n-\tif (init_postimage() || !(out = buffer_tmpfile_rewind(&postimage)))\n-\t\tdie(\"cannot open temporary file for blob retrieval\");\n-\tif (old_data) {\n-\t\tconst char *response;\n-\t\tprintf(\"cat-blob %s\\n\", old_data);\n-\t\tfflush(stdout);\n-\t\tresponse = get_response_line();\n-\t\tif (parse_cat_response_line(response, &preimage.max_off))\n-\t\t\tdie(\"invalid cat-blob response: %s\", response);\n-\t\tcheck_preimage_overflow(preimage.max_off, 1);\n-\t}\n-\tif (old_mode == S_IFLNK) {\n-\t\tstrbuf_addstr(&preimage.buf, \"link \");\n-\t\tcheck_preimage_overflow(preimage.max_off, strlen(\"link \"));\n-\t\tpreimage.max_off += strlen(\"link \");\n-\t\tcheck_preimage_overflow(preimage.max_off, 1);\n-\t}\n-\tif (svndiff0_apply(input, len, &preimage, out))\n-\t\tdie(\"cannot apply delta\");\n-\tif (old_data) {\n-\t\t/* Read the remainder of preimage and trailing newline. */\n-\t\tassert(!signed_add_overflows(preimage.max_off, 1));\n-\t\tpreimage.max_off++;\t/* room for newline */\n-\t\tif (move_window(&preimage, preimage.max_off - 1, 1))\n-\t\t\tdie(\"cannot seek to end of input\");\n-\t\tif (preimage.buf.buf[0] != '\\n')\n-\t\t\tdie(\"missing newline after cat-blob response\");\n-\t}\n-\tret = buffer_tmpfile_prepare_to_read(&postimage);\n-\tif (ret < 0)\n-\t\tdie(\"cannot read temporary file for blob retrieval\");\n-\tstrbuf_release(&preimage.buf);\n-\treturn ret;\n-}\n-\n-void fast_export_buf_to_data(const struct strbuf *data)\n-{\n-\tprintf(\"data %\"PRIuMAX\"\\n\", (uintmax_t)data->len);\n-\tfwrite(data->buf, data->len, 1, stdout);\n-\tfputc('\\n', stdout);\n-}\n-\n-void fast_export_data(uint32_t mode, off_t len, struct line_buffer *input)\n-{\n-\tassert(len >= 0);\n-\tif (mode == S_IFLNK) {\n-\t\t/* svn symlink blobs start with \"link \" */\n-\t\tif (len < 5)\n-\t\t\tdie(\"invalid dump: symlink too short for \\\"link\\\" prefix\");\n-\t\tlen -= 5;\n-\t\tif (buffer_skip_bytes(input, 5) != 5)\n-\t\t\tdie_short_read(input);\n-\t}\n-\tprintf(\"data %\"PRIuMAX\"\\n\", (uintmax_t) len);\n-\tif (buffer_copy_bytes(input, len) != len)\n-\t\tdie_short_read(input);\n-\tfputc('\\n', stdout);\n-}\n-\n-static int parse_ls_response(const char *response, uint32_t *mode,\n-\t\t\t\t\tstruct strbuf *dataref)\n-{\n-\tconst char *tab;\n-\tconst char *response_end;\n-\n-\tassert(response);\n-\tresponse_end = response + strlen(response);\n-\n-\tif (*response == 'm') {\t/* Missing. */\n-\t\terrno = ENOENT;\n-\t\treturn -1;\n-\t}\n-\n-\t/* Mode. */\n-\tif (response_end - response < (signed) strlen(\"100644\") ||\n-\t    response[strlen(\"100644\")] != ' ')\n-\t\tdie(\"invalid ls response: missing mode: %s\", response);\n-\t*mode = 0;\n-\tfor (; *response != ' '; response++) {\n-\t\tchar ch = *response;\n-\t\tif (ch < '0' || ch > '7')\n-\t\t\tdie(\"invalid ls response: mode is not octal: %s\", response);\n-\t\t*mode *= 8;\n-\t\t*mode += ch - '0';\n-\t}\n-\n-\t/* ' blob ' or ' tree ' */\n-\tif (response_end - response < (signed) strlen(\" blob \") ||\n-\t    (response[1] != 'b' && response[1] != 't'))\n-\t\tdie(\"unexpected ls response: not a tree or blob: %s\", response);\n-\tresponse += strlen(\" blob \");\n-\n-\t/* Dataref. */\n-\ttab = memchr(response, '\\t', response_end - response);\n-\tif (!tab)\n-\t\tdie(\"invalid ls response: missing tab: %s\", response);\n-\tstrbuf_add(dataref, response, tab - response);\n-\treturn 0;\n-}\n-\n-int fast_export_ls_rev(uint32_t rev, const char *path,\n-\t\t\t\tuint32_t *mode, struct strbuf *dataref)\n-{\n-\tls_from_rev(rev, path);\n-\treturn parse_ls_response(get_response_line(), mode, dataref);\n-}\n-\n-int fast_export_ls(const char *path, uint32_t *mode, struct strbuf *dataref)\n-{\n-\tls_from_active_commit(path);\n-\treturn parse_ls_response(get_response_line(), mode, dataref);\n-}\n-\n-const char *fast_export_read_path(const char *path, uint32_t *mode_out)\n-{\n-\tint err;\n-\tstatic struct strbuf buf = STRBUF_INIT;\n-\n-\tstrbuf_reset(&buf);\n-\terr = fast_export_ls(path, mode_out, &buf);\n-\tif (err) {\n-\t\tif (errno != ENOENT)\n-\t\t\tBUG(\"unexpected fast_export_ls error: %s\",\n-\t\t\t    strerror(errno));\n-\t\t/* Treat missing paths as directories. */\n-\t\t*mode_out = S_IFDIR;\n-\t\treturn NULL;\n-\t}\n-\treturn buf.buf;\n-}\n-\n-void fast_export_copy(uint32_t revision, const char *src, const char *dst)\n-{\n-\tint err;\n-\tuint32_t mode;\n-\tstatic struct strbuf data = STRBUF_INIT;\n-\n-\tstrbuf_reset(&data);\n-\terr = fast_export_ls_rev(revision, src, &mode, &data);\n-\tif (err) {\n-\t\tif (errno != ENOENT)\n-\t\t\tBUG(\"unexpected fast_export_ls_rev error: %s\",\n-\t\t\t    strerror(errno));\n-\t\tfast_export_delete(dst);\n-\t\treturn;\n-\t}\n-\tfast_export_modify(dst, mode, data.buf);\n-}\n-\n-void fast_export_blob_delta(uint32_t mode,\n-\t\t\t\tuint32_t old_mode, const char *old_data,\n-\t\t\t\toff_t len, struct line_buffer *input)\n-{\n-\tlong postimage_len;\n-\n-\tassert(len >= 0);\n-\tpostimage_len = apply_delta(len, input, old_data, old_mode);\n-\tif (mode == S_IFLNK) {\n-\t\tbuffer_skip_bytes(&postimage, strlen(\"link \"));\n-\t\tpostimage_len -= strlen(\"link \");\n-\t}\n-\tprintf(\"data %ld\\n\", postimage_len);\n-\tbuffer_copy_bytes(&postimage, postimage_len);\n-\tfputc('\\n', stdout);\n-}\ndiff --git a/vcs-svn/line_buffer.c b/vcs-svn/line_buffer.c\ndeleted file mode 100644\nindex e416caf8a4..0000000000\n--- a/vcs-svn/line_buffer.c\n+++ /dev/null\n@@ -1,126 +0,0 @@\n-/*\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"line_buffer.h\"\n-#include \"strbuf.h\"\n-\n-#define COPY_BUFFER_LEN 4096\n-\n-int buffer_init(struct line_buffer *buf, const char *filename)\n-{\n-\tbuf->infile = filename ? fopen(filename, \"r\") : stdin;\n-\tif (!buf->infile)\n-\t\treturn -1;\n-\treturn 0;\n-}\n-\n-int buffer_fdinit(struct line_buffer *buf, int fd)\n-{\n-\tbuf->infile = fdopen(fd, \"r\");\n-\tif (!buf->infile)\n-\t\treturn -1;\n-\treturn 0;\n-}\n-\n-int buffer_tmpfile_init(struct line_buffer *buf)\n-{\n-\tbuf->infile = tmpfile();\n-\tif (!buf->infile)\n-\t\treturn -1;\n-\treturn 0;\n-}\n-\n-int buffer_deinit(struct line_buffer *buf)\n-{\n-\tint err;\n-\tif (buf->infile == stdin)\n-\t\treturn ferror(buf->infile);\n-\terr = ferror(buf->infile);\n-\terr |= fclose(buf->infile);\n-\treturn err;\n-}\n-\n-FILE *buffer_tmpfile_rewind(struct line_buffer *buf)\n-{\n-\trewind(buf->infile);\n-\treturn buf->infile;\n-}\n-\n-long buffer_tmpfile_prepare_to_read(struct line_buffer *buf)\n-{\n-\tlong pos = ftell(buf->infile);\n-\tif (pos < 0)\n-\t\treturn error_errno(\"ftell error\");\n-\tif (fseek(buf->infile, 0, SEEK_SET))\n-\t\treturn error_errno(\"seek error\");\n-\treturn pos;\n-}\n-\n-int buffer_ferror(struct line_buffer *buf)\n-{\n-\treturn ferror(buf->infile);\n-}\n-\n-int buffer_read_char(struct line_buffer *buf)\n-{\n-\treturn fgetc(buf->infile);\n-}\n-\n-/* Read a line without trailing newline. */\n-char *buffer_read_line(struct line_buffer *buf)\n-{\n-\tchar *end;\n-\tif (!fgets(buf->line_buffer, sizeof(buf->line_buffer), buf->infile))\n-\t\t/* Error or data exhausted. */\n-\t\treturn NULL;\n-\tend = buf->line_buffer + strlen(buf->line_buffer);\n-\tif (end[-1] == '\\n')\n-\t\tend[-1] = '\\0';\n-\telse if (feof(buf->infile))\n-\t\t; /* No newline at end of file.  That's fine. */\n-\telse\n-\t\t/*\n-\t\t * Line was too long.\n-\t\t * There is probably a saner way to deal with this,\n-\t\t * but for now let's return an error.\n-\t\t */\n-\t\treturn NULL;\n-\treturn buf->line_buffer;\n-}\n-\n-size_t buffer_read_binary(struct line_buffer *buf,\n-\t\t\t\tstruct strbuf *sb, size_t size)\n-{\n-\treturn strbuf_fread(sb, size, buf->infile);\n-}\n-\n-off_t buffer_copy_bytes(struct line_buffer *buf, off_t nbytes)\n-{\n-\tchar byte_buffer[COPY_BUFFER_LEN];\n-\toff_t done = 0;\n-\twhile (done < nbytes && !feof(buf->infile) && !ferror(buf->infile)) {\n-\t\toff_t len = nbytes - done;\n-\t\tsize_t in = len < COPY_BUFFER_LEN ? len : COPY_BUFFER_LEN;\n-\t\tin = fread(byte_buffer, 1, in, buf->infile);\n-\t\tdone += in;\n-\t\tfwrite(byte_buffer, 1, in, stdout);\n-\t\tif (ferror(stdout))\n-\t\t\treturn done + buffer_skip_bytes(buf, nbytes - done);\n-\t}\n-\treturn done;\n-}\n-\n-off_t buffer_skip_bytes(struct line_buffer *buf, off_t nbytes)\n-{\n-\tchar byte_buffer[COPY_BUFFER_LEN];\n-\toff_t done = 0;\n-\twhile (done < nbytes && !feof(buf->infile) && !ferror(buf->infile)) {\n-\t\toff_t len = nbytes - done;\n-\t\tsize_t in = len < COPY_BUFFER_LEN ? len : COPY_BUFFER_LEN;\n-\t\tdone += fread(byte_buffer, 1, in, buf->infile);\n-\t}\n-\treturn done;\n-}\ndiff --git a/vcs-svn/line_buffer.txt b/vcs-svn/line_buffer.txt\ndeleted file mode 100644\nindex 8e139eb22d..0000000000\n--- a/vcs-svn/line_buffer.txt\n+++ /dev/null\n@@ -1,77 +0,0 @@\n-line_buffer API\n-===============\n-\n-The line_buffer library provides a convenient interface for\n-mostly-line-oriented input.\n-\n-Each line is not permitted to exceed 10000 bytes.  The provided\n-functions are not thread-safe or async-signal-safe, and like\n-`fgets()`, they generally do not function correctly if interrupted\n-by a signal without SA_RESTART set.\n-\n-Calling sequence\n-----------------\n-\n-The calling program:\n-\n- - initializes a `struct line_buffer` to LINE_BUFFER_INIT\n- - specifies a file to read with `buffer_init`\n- - processes input with `buffer_read_line`, `buffer_skip_bytes`,\n-   and `buffer_copy_bytes`\n- - closes the file with `buffer_deinit`, perhaps to start over and\n-   read another file.\n-\n-When finished, the caller can use `buffer_reset` to deallocate\n-resources.\n-\n-Using temporary files\n----------------------\n-\n-Temporary files provide a place to store data that should not outlive\n-the calling program.  A program\n-\n- - initializes a `struct line_buffer` to LINE_BUFFER_INIT\n- - requests a temporary file with `buffer_tmpfile_init`\n- - acquires an output handle by calling `buffer_tmpfile_rewind`\n- - uses standard I/O functions like `fprintf` and `fwrite` to fill\n-   the temporary file\n- - declares writing is over with `buffer_tmpfile_prepare_to_read`\n- - can re-read what was written with `buffer_read_line`,\n-   `buffer_copy_bytes`, and so on\n- - can reuse the temporary file by calling `buffer_tmpfile_rewind`\n-   again\n- - removes the temporary file with `buffer_deinit`, perhaps to\n-   reuse the line_buffer for some other file.\n-\n-When finished, the calling program can use `buffer_reset` to deallocate\n-resources.\n-\n-Functions\n----------\n-\n-`buffer_init`, `buffer_fdinit`::\n-\tOpen the named file or file descriptor for input.\n-\tbuffer_init(buf, NULL) prepares to read from stdin.\n-\tOn failure, returns -1 (with errno indicating the nature\n-\tof the failure).\n-\n-`buffer_deinit`::\n-\tStop reading from the current file (closing it unless\n-\tit was stdin).  Returns nonzero if `fclose` fails or\n-\tthe error indicator was set.\n-\n-`buffer_read_line`::\n-\tRead a line and strip off the trailing newline.\n-\tOn failure or end of file, returns NULL.\n-\n-`buffer_copy_bytes`::\n-\tRead `len` bytes of input and dump them to the standard output\n-\tstream.  Returns early for error or end of file.\n-\n-`buffer_skip_bytes`::\n-\tDiscards `len` bytes from the input stream (stopping early\n-\tif necessary because of an error or eof).  Return value is\n-\tthe number of bytes successfully read.\n-\n-`buffer_reset`::\n-\tDeallocates non-static buffers.\ndiff --git a/vcs-svn/sliding_window.c b/vcs-svn/sliding_window.c\ndeleted file mode 100644\nindex 06d273c9e8..0000000000\n--- a/vcs-svn/sliding_window.c\n+++ /dev/null\n@@ -1,79 +0,0 @@\n-/*\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"sliding_window.h\"\n-#include \"line_buffer.h\"\n-#include \"strbuf.h\"\n-\n-static int input_error(struct line_buffer *file)\n-{\n-\tif (!buffer_ferror(file))\n-\t\treturn error(\"delta preimage ends early\");\n-\treturn error_errno(\"cannot read delta preimage\");\n-}\n-\n-static int skip_or_whine(struct line_buffer *file, off_t gap)\n-{\n-\tif (buffer_skip_bytes(file, gap) != gap)\n-\t\treturn input_error(file);\n-\treturn 0;\n-}\n-\n-static int read_to_fill_or_whine(struct line_buffer *file,\n-\t\t\t\tstruct strbuf *buf, size_t width)\n-{\n-\tbuffer_read_binary(file, buf, width - buf->len);\n-\tif (buf->len != width)\n-\t\treturn input_error(file);\n-\treturn 0;\n-}\n-\n-static int check_offset_overflow(off_t offset, uintmax_t len)\n-{\n-\tif (len > maximum_signed_value_of_type(off_t))\n-\t\treturn error(\"unrepresentable length in delta: \"\n-\t\t\t\t\"%\"PRIuMAX\" > OFF_MAX\", len);\n-\tif (signed_add_overflows(offset, (off_t) len))\n-\t\treturn error(\"unrepresentable offset in delta: \"\n-\t\t\t\t\"%\"PRIuMAX\" + %\"PRIuMAX\" > OFF_MAX\",\n-\t\t\t\t(uintmax_t) offset, len);\n-\treturn 0;\n-}\n-\n-int move_window(struct sliding_view *view, off_t off, size_t width)\n-{\n-\toff_t file_offset;\n-\tassert(view);\n-\tassert(view->width <= view->buf.len);\n-\tassert(!check_offset_overflow(view->off, view->buf.len));\n-\n-\tif (check_offset_overflow(off, width))\n-\t\treturn -1;\n-\tif (off < view->off || off + width < view->off + view->width)\n-\t\treturn error(\"invalid delta: window slides left\");\n-\tif (view->max_off >= 0 && view->max_off < off + (off_t) width)\n-\t\treturn error(\"delta preimage ends early\");\n-\n-\tfile_offset = view->off + view->buf.len;\n-\tif (off < file_offset) {\n-\t\t/* Move the overlapping region into place. */\n-\t\tstrbuf_remove(&view->buf, 0, off - view->off);\n-\t} else {\n-\t\t/* Seek ahead to skip the gap. */\n-\t\tif (skip_or_whine(view->file, off - file_offset))\n-\t\t\treturn -1;\n-\t\tstrbuf_setlen(&view->buf, 0);\n-\t}\n-\n-\tif (view->buf.len > width)\n-\t\t; /* Already read. */\n-\telse if (read_to_fill_or_whine(view->file, &view->buf, width))\n-\t\treturn -1;\n-\n-\tview->off = off;\n-\tview->width = width;\n-\treturn 0;\n-}\ndiff --git a/vcs-svn/svndiff.c b/vcs-svn/svndiff.c\ndeleted file mode 100644\nindex 75c753162a..0000000000\n--- a/vcs-svn/svndiff.c\n+++ /dev/null\n@@ -1,309 +0,0 @@\n-/*\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"git-compat-util.h\"\n-#include \"sliding_window.h\"\n-#include \"line_buffer.h\"\n-#include \"svndiff.h\"\n-\n-/*\n- * svndiff0 applier\n- *\n- * See http://svn.apache.org/repos/asf/subversion/trunk/notes/svndiff.\n- *\n- * svndiff0 ::= 'SVN\\0' window*\n- * window ::= int int int int int instructions inline_data;\n- * instructions ::= instruction*;\n- * instruction ::= view_selector int int\n- *   | copyfrom_data int\n- *   | packed_view_selector int\n- *   | packed_copyfrom_data\n- *   ;\n- * view_selector ::= copyfrom_source\n- *   | copyfrom_target\n- *   ;\n- * copyfrom_source ::= # binary 00 000000;\n- * copyfrom_target ::= # binary 01 000000;\n- * copyfrom_data ::= # binary 10 000000;\n- * packed_view_selector ::= # view_selector OR-ed with 6 bit value;\n- * packed_copyfrom_data ::= # copyfrom_data OR-ed with 6 bit value;\n- * int ::= highdigit* lowdigit;\n- * highdigit ::= # binary 1000 0000 OR-ed with 7 bit value;\n- * lowdigit ::= # 7 bit value;\n- */\n-\n-#define INSN_MASK\t0xc0\n-#define INSN_COPYFROM_SOURCE\t0x00\n-#define INSN_COPYFROM_TARGET\t0x40\n-#define INSN_COPYFROM_DATA\t0x80\n-#define OPERAND_MASK\t0x3f\n-\n-#define VLI_CONTINUE\t0x80\n-#define VLI_DIGIT_MASK\t0x7f\n-#define VLI_BITS_PER_DIGIT 7\n-\n-struct window {\n-\tstruct sliding_view *in;\n-\tstruct strbuf out;\n-\tstruct strbuf instructions;\n-\tstruct strbuf data;\n-};\n-\n-#define WINDOW_INIT(w)\t{ (w), STRBUF_INIT, STRBUF_INIT, STRBUF_INIT }\n-\n-static void window_release(struct window *ctx)\n-{\n-\tstrbuf_release(&ctx->out);\n-\tstrbuf_release(&ctx->instructions);\n-\tstrbuf_release(&ctx->data);\n-}\n-\n-static int write_strbuf(struct strbuf *sb, FILE *out)\n-{\n-\tif (fwrite(sb->buf, 1, sb->len, out) == sb->len)\t/* Success. */\n-\t\treturn 0;\n-\treturn error_errno(\"cannot write delta postimage\");\n-}\n-\n-static int error_short_read(struct line_buffer *input)\n-{\n-\tif (buffer_ferror(input))\n-\t\treturn error_errno(\"error reading delta\");\n-\treturn error(\"invalid delta: unexpected end of file\");\n-}\n-\n-static int read_chunk(struct line_buffer *delta, off_t *delta_len,\n-\t\t      struct strbuf *buf, size_t len)\n-{\n-\tassert(*delta_len >= 0);\n-\tstrbuf_reset(buf);\n-\tif (len > (uintmax_t) *delta_len ||\n-\t    buffer_read_binary(delta, buf, len) != len)\n-\t\treturn error_short_read(delta);\n-\t*delta_len -= buf->len;\n-\treturn 0;\n-}\n-\n-static int read_magic(struct line_buffer *in, off_t *len)\n-{\n-\tstatic const char magic[] = {'S', 'V', 'N', '\\0'};\n-\tstruct strbuf sb = STRBUF_INIT;\n-\n-\tif (read_chunk(in, len, &sb, sizeof(magic))) {\n-\t\tstrbuf_release(&sb);\n-\t\treturn -1;\n-\t}\n-\tif (memcmp(sb.buf, magic, sizeof(magic))) {\n-\t\tstrbuf_release(&sb);\n-\t\treturn error(\"invalid delta: unrecognized file type\");\n-\t}\n-\tstrbuf_release(&sb);\n-\treturn 0;\n-}\n-\n-static int read_int(struct line_buffer *in, uintmax_t *result, off_t *len)\n-{\n-\tuintmax_t rv = 0;\n-\toff_t sz;\n-\tfor (sz = *len; sz; sz--) {\n-\t\tconst int ch = buffer_read_char(in);\n-\t\tif (ch == EOF)\n-\t\t\tbreak;\n-\n-\t\trv <<= VLI_BITS_PER_DIGIT;\n-\t\trv += (ch & VLI_DIGIT_MASK);\n-\t\tif (ch & VLI_CONTINUE)\n-\t\t\tcontinue;\n-\n-\t\t*result = rv;\n-\t\t*len = sz - 1;\n-\t\treturn 0;\n-\t}\n-\treturn error_short_read(in);\n-}\n-\n-static int parse_int(const char **buf, size_t *result, const char *end)\n-{\n-\tsize_t rv = 0;\n-\tconst char *pos;\n-\tfor (pos = *buf; pos != end; pos++) {\n-\t\tunsigned char ch = *pos;\n-\n-\t\trv <<= VLI_BITS_PER_DIGIT;\n-\t\trv += (ch & VLI_DIGIT_MASK);\n-\t\tif (ch & VLI_CONTINUE)\n-\t\t\tcontinue;\n-\n-\t\t*result = rv;\n-\t\t*buf = pos + 1;\n-\t\treturn 0;\n-\t}\n-\treturn error(\"invalid delta: unexpected end of instructions section\");\n-}\n-\n-static int read_offset(struct line_buffer *in, off_t *result, off_t *len)\n-{\n-\tuintmax_t val;\n-\tif (read_int(in, &val, len))\n-\t\treturn -1;\n-\tif (val > maximum_signed_value_of_type(off_t))\n-\t\treturn error(\"unrepresentable offset in delta: %\"PRIuMAX\"\", val);\n-\t*result = val;\n-\treturn 0;\n-}\n-\n-static int read_length(struct line_buffer *in, size_t *result, off_t *len)\n-{\n-\tuintmax_t val;\n-\tif (read_int(in, &val, len))\n-\t\treturn -1;\n-\tif (val > SIZE_MAX)\n-\t\treturn error(\"unrepresentable length in delta: %\"PRIuMAX\"\", val);\n-\t*result = val;\n-\treturn 0;\n-}\n-\n-static int copyfrom_source(struct window *ctx, const char **instructions,\n-\t\t\t   size_t nbytes, const char *insns_end)\n-{\n-\tsize_t offset;\n-\tif (parse_int(instructions, &offset, insns_end))\n-\t\treturn -1;\n-\tif (unsigned_add_overflows(offset, nbytes) ||\n-\t    offset + nbytes > ctx->in->width)\n-\t\treturn error(\"invalid delta: copies source data outside view\");\n-\tstrbuf_add(&ctx->out, ctx->in->buf.buf + offset, nbytes);\n-\treturn 0;\n-}\n-\n-static int copyfrom_target(struct window *ctx, const char **instructions,\n-\t\t\t   size_t nbytes, const char *instructions_end)\n-{\n-\tsize_t offset;\n-\tif (parse_int(instructions, &offset, instructions_end))\n-\t\treturn -1;\n-\tif (offset >= ctx->out.len)\n-\t\treturn error(\"invalid delta: copies from the future\");\n-\tfor (; nbytes > 0; nbytes--)\n-\t\tstrbuf_addch(&ctx->out, ctx->out.buf[offset++]);\n-\treturn 0;\n-}\n-\n-static int copyfrom_data(struct window *ctx, size_t *data_pos, size_t nbytes)\n-{\n-\tconst size_t pos = *data_pos;\n-\tif (unsigned_add_overflows(pos, nbytes) ||\n-\t    pos + nbytes > ctx->data.len)\n-\t\treturn error(\"invalid delta: copies unavailable inline data\");\n-\tstrbuf_add(&ctx->out, ctx->data.buf + pos, nbytes);\n-\t*data_pos += nbytes;\n-\treturn 0;\n-}\n-\n-static int parse_first_operand(const char **buf, size_t *out, const char *end)\n-{\n-\tsize_t result = (unsigned char) *(*buf)++ & OPERAND_MASK;\n-\tif (result) {\t/* immediate operand */\n-\t\t*out = result;\n-\t\treturn 0;\n-\t}\n-\treturn parse_int(buf, out, end);\n-}\n-\n-static int execute_one_instruction(struct window *ctx,\n-\t\t\t\tconst char **instructions, size_t *data_pos)\n-{\n-\tunsigned int instruction;\n-\tconst char *insns_end = ctx->instructions.buf + ctx->instructions.len;\n-\tsize_t nbytes;\n-\tassert(ctx);\n-\tassert(instructions && *instructions);\n-\tassert(data_pos);\n-\n-\tinstruction = (unsigned char) **instructions;\n-\tif (parse_first_operand(instructions, &nbytes, insns_end))\n-\t\treturn -1;\n-\tswitch (instruction & INSN_MASK) {\n-\tcase INSN_COPYFROM_SOURCE:\n-\t\treturn copyfrom_source(ctx, instructions, nbytes, insns_end);\n-\tcase INSN_COPYFROM_TARGET:\n-\t\treturn copyfrom_target(ctx, instructions, nbytes, insns_end);\n-\tcase INSN_COPYFROM_DATA:\n-\t\treturn copyfrom_data(ctx, data_pos, nbytes);\n-\tdefault:\n-\t\treturn error(\"invalid delta: unrecognized instruction\");\n-\t}\n-}\n-\n-static int apply_window_in_core(struct window *ctx)\n-{\n-\tconst char *instructions;\n-\tsize_t data_pos = 0;\n-\n-\t/*\n-\t * Fill ctx->out.buf using data from the source, target,\n-\t * and inline data views.\n-\t */\n-\tfor (instructions = ctx->instructions.buf;\n-\t     instructions != ctx->instructions.buf + ctx->instructions.len;\n-\t     )\n-\t\tif (execute_one_instruction(ctx, &instructions, &data_pos))\n-\t\t\treturn -1;\n-\tif (data_pos != ctx->data.len)\n-\t\treturn error(\"invalid delta: does not copy all inline data\");\n-\treturn 0;\n-}\n-\n-static int apply_one_window(struct line_buffer *delta, off_t *delta_len,\n-\t\t\t    struct sliding_view *preimage, FILE *out)\n-{\n-\tint rv = -1;\n-\tstruct window ctx = WINDOW_INIT(preimage);\n-\tsize_t out_len;\n-\tsize_t instructions_len;\n-\tsize_t data_len;\n-\tassert(delta_len);\n-\n-\t/* \"source view\" offset and length already handled; */\n-\tif (read_length(delta, &out_len, delta_len) ||\n-\t    read_length(delta, &instructions_len, delta_len) ||\n-\t    read_length(delta, &data_len, delta_len) ||\n-\t    read_chunk(delta, delta_len, &ctx.instructions, instructions_len) ||\n-\t    read_chunk(delta, delta_len, &ctx.data, data_len))\n-\t\tgoto error_out;\n-\tstrbuf_grow(&ctx.out, out_len);\n-\tif (apply_window_in_core(&ctx))\n-\t\tgoto error_out;\n-\tif (ctx.out.len != out_len) {\n-\t\trv = error(\"invalid delta: incorrect postimage length\");\n-\t\tgoto error_out;\n-\t}\n-\tif (write_strbuf(&ctx.out, out))\n-\t\tgoto error_out;\n-\trv = 0;\n-error_out:\n-\twindow_release(&ctx);\n-\treturn rv;\n-}\n-\n-int svndiff0_apply(struct line_buffer *delta, off_t delta_len,\n-\t\t\tstruct sliding_view *preimage, FILE *postimage)\n-{\n-\tassert(delta && preimage && postimage && delta_len >= 0);\n-\n-\tif (read_magic(delta, &delta_len))\n-\t\treturn -1;\n-\twhile (delta_len) {\t/* For each window: */\n-\t\toff_t pre_off = -1;\n-\t\tsize_t pre_len;\n-\n-\t\tif (read_offset(delta, &pre_off, &delta_len) ||\n-\t\t    read_length(delta, &pre_len, &delta_len) ||\n-\t\t    move_window(preimage, pre_off, pre_len) ||\n-\t\t    apply_one_window(delta, &delta_len, preimage, postimage))\n-\t\t\treturn -1;\n-\t}\n-\treturn 0;\n-}\ndiff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c\ndeleted file mode 100644\nindex 08d136b8cc..0000000000\n--- a/vcs-svn/svndump.c\n+++ /dev/null\n@@ -1,540 +0,0 @@\n-/*\n- * Parse and rearrange a svnadmin dump.\n- * Create the dump with:\n- * svnadmin dump --incremental -r<startrev>:<endrev> <repository> >outfile\n- *\n- * Licensed under a two-clause BSD-style license.\n- * See LICENSE for details.\n- */\n-\n-#include \"cache.h\"\n-#include \"fast_export.h\"\n-#include \"line_buffer.h\"\n-#include \"strbuf.h\"\n-#include \"svndump.h\"\n-\n-/*\n- * Compare start of string to literal of equal length;\n- * must be guarded by length test.\n- */\n-#define constcmp(s, ref) memcmp(s, ref, sizeof(ref) - 1)\n-\n-#define REPORT_FILENO 3\n-\n-#define NODEACT_REPLACE 4\n-#define NODEACT_DELETE 3\n-#define NODEACT_ADD 2\n-#define NODEACT_CHANGE 1\n-#define NODEACT_UNKNOWN 0\n-\n-/* States: */\n-#define DUMP_CTX 0\t/* dump metadata */\n-#define REV_CTX  1\t/* revision metadata */\n-#define NODE_CTX 2\t/* node metadata */\n-#define INTERNODE_CTX 3\t/* between nodes */\n-\n-#define DATE_RFC2822_LEN 31\n-\n-static struct line_buffer input = LINE_BUFFER_INIT;\n-\n-static struct {\n-\tuint32_t action, srcRev, type;\n-\toff_t prop_length, text_length;\n-\tstruct strbuf src, dst;\n-\tuint32_t text_delta, prop_delta;\n-} node_ctx;\n-\n-static struct {\n-\tuint32_t revision;\n-\ttimestamp_t timestamp;\n-\tstruct strbuf log, author, note;\n-} rev_ctx;\n-\n-static struct {\n-\tuint32_t version;\n-\tstruct strbuf uuid, url;\n-} dump_ctx;\n-\n-static void reset_node_ctx(char *fname)\n-{\n-\tnode_ctx.type = 0;\n-\tnode_ctx.action = NODEACT_UNKNOWN;\n-\tnode_ctx.prop_length = -1;\n-\tnode_ctx.text_length = -1;\n-\tstrbuf_reset(&node_ctx.src);\n-\tnode_ctx.srcRev = 0;\n-\tstrbuf_reset(&node_ctx.dst);\n-\tif (fname)\n-\t\tstrbuf_addstr(&node_ctx.dst, fname);\n-\tnode_ctx.text_delta = 0;\n-\tnode_ctx.prop_delta = 0;\n-}\n-\n-static void reset_rev_ctx(uint32_t revision)\n-{\n-\trev_ctx.revision = revision;\n-\trev_ctx.timestamp = 0;\n-\tstrbuf_reset(&rev_ctx.log);\n-\tstrbuf_reset(&rev_ctx.author);\n-\tstrbuf_reset(&rev_ctx.note);\n-}\n-\n-static void reset_dump_ctx(const char *url)\n-{\n-\tstrbuf_reset(&dump_ctx.url);\n-\tif (url)\n-\t\tstrbuf_addstr(&dump_ctx.url, url);\n-\tdump_ctx.version = 1;\n-\tstrbuf_reset(&dump_ctx.uuid);\n-}\n-\n-static void handle_property(const struct strbuf *key_buf,\n-\t\t\t\tstruct strbuf *val,\n-\t\t\t\tuint32_t *type_set)\n-{\n-\tconst char *key = key_buf->buf;\n-\tsize_t keylen = key_buf->len;\n-\n-\tswitch (keylen + 1) {\n-\tcase sizeof(\"svn:log\"):\n-\t\tif (constcmp(key, \"svn:log\"))\n-\t\t\tbreak;\n-\t\tif (!val)\n-\t\t\tdie(\"invalid dump: unsets svn:log\");\n-\t\tstrbuf_swap(&rev_ctx.log, val);\n-\t\tbreak;\n-\tcase sizeof(\"svn:author\"):\n-\t\tif (constcmp(key, \"svn:author\"))\n-\t\t\tbreak;\n-\t\tif (!val)\n-\t\t\tstrbuf_reset(&rev_ctx.author);\n-\t\telse\n-\t\t\tstrbuf_swap(&rev_ctx.author, val);\n-\t\tbreak;\n-\tcase sizeof(\"svn:date\"):\n-\t\tif (constcmp(key, \"svn:date\"))\n-\t\t\tbreak;\n-\t\tif (!val)\n-\t\t\tdie(\"invalid dump: unsets svn:date\");\n-\t\tif (parse_date_basic(val->buf, &rev_ctx.timestamp, NULL))\n-\t\t\twarning(\"invalid timestamp: %s\", val->buf);\n-\t\tbreak;\n-\tcase sizeof(\"svn:executable\"):\n-\tcase sizeof(\"svn:special\"):\n-\t\tif (keylen == strlen(\"svn:executable\") &&\n-\t\t    constcmp(key, \"svn:executable\"))\n-\t\t\tbreak;\n-\t\tif (keylen == strlen(\"svn:special\") &&\n-\t\t    constcmp(key, \"svn:special\"))\n-\t\t\tbreak;\n-\t\tif (*type_set) {\n-\t\t\tif (!val)\n-\t\t\t\treturn;\n-\t\t\tdie(\"invalid dump: sets type twice\");\n-\t\t}\n-\t\tif (!val) {\n-\t\t\tnode_ctx.type = S_IFREG | 0644;\n-\t\t\treturn;\n-\t\t}\n-\t\t*type_set = 1;\n-\t\tnode_ctx.type = keylen == strlen(\"svn:executable\") ?\n-\t\t\t\t(S_IFREG | 0755) :\n-\t\t\t\tS_IFLNK;\n-\t}\n-}\n-\n-static void die_short_read(void)\n-{\n-\tif (buffer_ferror(&input))\n-\t\tdie_errno(\"error reading dump file\");\n-\tdie(\"invalid dump: unexpected end of file\");\n-}\n-\n-static void read_props(void)\n-{\n-\tstatic struct strbuf key = STRBUF_INIT;\n-\tstatic struct strbuf val = STRBUF_INIT;\n-\tconst char *t;\n-\t/*\n-\t * NEEDSWORK: to support simple mode changes like\n-\t *\tK 11\n-\t *\tsvn:special\n-\t *\tV 1\n-\t *\t*\n-\t *\tD 14\n-\t *\tsvn:executable\n-\t * we keep track of whether a mode has been set and reset to\n-\t * plain file only if not.  We should be keeping track of the\n-\t * symlink and executable bits separately instead.\n-\t */\n-\tuint32_t type_set = 0;\n-\twhile ((t = buffer_read_line(&input)) && strcmp(t, \"PROPS-END\")) {\n-\t\tuint32_t len;\n-\t\tconst char type = t[0];\n-\t\tint ch;\n-\n-\t\tif (!type || t[1] != ' ')\n-\t\t\tdie(\"invalid property line: %s\", t);\n-\t\tlen = atoi(&t[2]);\n-\t\tstrbuf_reset(&val);\n-\t\tbuffer_read_binary(&input, &val, len);\n-\t\tif (val.len < len)\n-\t\t\tdie_short_read();\n-\n-\t\t/* Discard trailing newline. */\n-\t\tch = buffer_read_char(&input);\n-\t\tif (ch == EOF)\n-\t\t\tdie_short_read();\n-\t\tif (ch != '\\n')\n-\t\t\tdie(\"invalid dump: expected newline after %s\", val.buf);\n-\n-\t\tswitch (type) {\n-\t\tcase 'K':\n-\t\t\tstrbuf_swap(&key, &val);\n-\t\t\tcontinue;\n-\t\tcase 'D':\n-\t\t\thandle_property(&val, NULL, &type_set);\n-\t\t\tcontinue;\n-\t\tcase 'V':\n-\t\t\thandle_property(&key, &val, &type_set);\n-\t\t\tstrbuf_reset(&key);\n-\t\t\tcontinue;\n-\t\tdefault:\n-\t\t\tdie(\"invalid property line: %s\", t);\n-\t\t}\n-\t}\n-}\n-\n-static void handle_node(void)\n-{\n-\tconst uint32_t type = node_ctx.type;\n-\tconst int have_props = node_ctx.prop_length != -1;\n-\tconst int have_text = node_ctx.text_length != -1;\n-\t/*\n-\t * Old text for this node:\n-\t *  NULL\t- directory or bug\n-\t *  empty_blob\t- empty\n-\t *  \"<dataref>\"\t- data retrievable from fast-import\n-\t */\n-\tstatic const char *const empty_blob = \"::empty::\";\n-\tconst char *old_data = NULL;\n-\tuint32_t old_mode = S_IFREG | 0644;\n-\n-\tif (node_ctx.action == NODEACT_DELETE) {\n-\t\tif (have_text || have_props || node_ctx.srcRev)\n-\t\t\tdie(\"invalid dump: deletion node has \"\n-\t\t\t\t\"copyfrom info, text, or properties\");\n-\t\tfast_export_delete(node_ctx.dst.buf);\n-\t\treturn;\n-\t}\n-\tif (node_ctx.action == NODEACT_REPLACE) {\n-\t\tfast_export_delete(node_ctx.dst.buf);\n-\t\tnode_ctx.action = NODEACT_ADD;\n-\t}\n-\tif (node_ctx.srcRev) {\n-\t\tfast_export_copy(node_ctx.srcRev, node_ctx.src.buf, node_ctx.dst.buf);\n-\t\tif (node_ctx.action == NODEACT_ADD)\n-\t\t\tnode_ctx.action = NODEACT_CHANGE;\n-\t}\n-\tif (have_text && type == S_IFDIR)\n-\t\tdie(\"invalid dump: directories cannot have text attached\");\n-\n-\t/*\n-\t * Find old content (old_data) and decide on the new mode.\n-\t */\n-\tif (node_ctx.action == NODEACT_CHANGE && !*node_ctx.dst.buf) {\n-\t\tif (type != S_IFDIR)\n-\t\t\tdie(\"invalid dump: root of tree is not a regular file\");\n-\t\told_data = NULL;\n-\t} else if (node_ctx.action == NODEACT_CHANGE) {\n-\t\tuint32_t mode;\n-\t\told_data = fast_export_read_path(node_ctx.dst.buf, &mode);\n-\t\tif (mode == S_IFDIR && type != S_IFDIR)\n-\t\t\tdie(\"invalid dump: cannot modify a directory into a file\");\n-\t\tif (mode != S_IFDIR && type == S_IFDIR)\n-\t\t\tdie(\"invalid dump: cannot modify a file into a directory\");\n-\t\tnode_ctx.type = mode;\n-\t\told_mode = mode;\n-\t} else if (node_ctx.action == NODEACT_ADD) {\n-\t\tif (type == S_IFDIR)\n-\t\t\told_data = NULL;\n-\t\telse if (have_text)\n-\t\t\told_data = empty_blob;\n-\t\telse\n-\t\t\tdie(\"invalid dump: adds node without text\");\n-\t} else {\n-\t\tdie(\"invalid dump: Node-path block lacks Node-action\");\n-\t}\n-\n-\t/*\n-\t * Adjust mode to reflect properties.\n-\t */\n-\tif (have_props) {\n-\t\tif (!node_ctx.prop_delta)\n-\t\t\tnode_ctx.type = type;\n-\t\tif (node_ctx.prop_length)\n-\t\t\tread_props();\n-\t}\n-\n-\t/*\n-\t * Save the result.\n-\t */\n-\tif (type == S_IFDIR)\t/* directories are not tracked. */\n-\t\treturn;\n-\tassert(old_data);\n-\tif (old_data == empty_blob)\n-\t\t/* For the fast_export_* functions, NULL means empty. */\n-\t\told_data = NULL;\n-\tif (!have_text) {\n-\t\tfast_export_modify(node_ctx.dst.buf, node_ctx.type, old_data);\n-\t\treturn;\n-\t}\n-\tif (!node_ctx.text_delta) {\n-\t\tfast_export_modify(node_ctx.dst.buf, node_ctx.type, \"inline\");\n-\t\tfast_export_data(node_ctx.type, node_ctx.text_length, &input);\n-\t\treturn;\n-\t}\n-\tfast_export_modify(node_ctx.dst.buf, node_ctx.type, \"inline\");\n-\tfast_export_blob_delta(node_ctx.type, old_mode, old_data,\n-\t\t\t\tnode_ctx.text_length, &input);\n-}\n-\n-static void begin_revision(const char *remote_ref)\n-{\n-\tif (!rev_ctx.revision)\t/* revision 0 gets no git commit. */\n-\t\treturn;\n-\tfast_export_begin_commit(rev_ctx.revision, rev_ctx.author.buf,\n-\t\t&rev_ctx.log, dump_ctx.uuid.buf, dump_ctx.url.buf,\n-\t\trev_ctx.timestamp, remote_ref);\n-}\n-\n-static void end_revision(const char *note_ref)\n-{\n-\tstruct strbuf mark = STRBUF_INIT;\n-\tif (rev_ctx.revision) {\n-\t\tfast_export_end_commit(rev_ctx.revision);\n-\t\tfast_export_begin_note(rev_ctx.revision, \"remote-svn\",\n-\t\t\t\t\"Note created by remote-svn.\", rev_ctx.timestamp, note_ref);\n-\t\tstrbuf_addf(&mark, \":%\"PRIu32, rev_ctx.revision);\n-\t\tfast_export_note(mark.buf, \"inline\");\n-\t\tfast_export_buf_to_data(&rev_ctx.note);\n-\t\tstrbuf_release(&mark);\n-\t}\n-}\n-\n-void svndump_read(const char *url, const char *local_ref, const char *notes_ref)\n-{\n-\tchar *val;\n-\tchar *t;\n-\tuint32_t active_ctx = DUMP_CTX;\n-\tuint32_t len;\n-\n-\treset_dump_ctx(url);\n-\twhile ((t = buffer_read_line(&input))) {\n-\t\tval = strchr(t, ':');\n-\t\tif (!val)\n-\t\t\tcontinue;\n-\t\tval++;\n-\t\tif (*val != ' ')\n-\t\t\tcontinue;\n-\t\tval++;\n-\n-\t\t/* strlen(key) + 1 */\n-\t\tswitch (val - t - 1) {\n-\t\tcase sizeof(\"SVN-fs-dump-format-version\"):\n-\t\t\tif (constcmp(t, \"SVN-fs-dump-format-version\"))\n-\t\t\t\tcontinue;\n-\t\t\tdump_ctx.version = atoi(val);\n-\t\t\tif (dump_ctx.version > 3)\n-\t\t\t\tdie(\"expected svn dump format version <= 3, found %\"PRIu32,\n-\t\t\t\t    dump_ctx.version);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"UUID\"):\n-\t\t\tif (constcmp(t, \"UUID\"))\n-\t\t\t\tcontinue;\n-\t\t\tstrbuf_reset(&dump_ctx.uuid);\n-\t\t\tstrbuf_addstr(&dump_ctx.uuid, val);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Revision-number\"):\n-\t\t\tif (constcmp(t, \"Revision-number\"))\n-\t\t\t\tcontinue;\n-\t\t\tif (active_ctx == NODE_CTX)\n-\t\t\t\thandle_node();\n-\t\t\tif (active_ctx == REV_CTX)\n-\t\t\t\tbegin_revision(local_ref);\n-\t\t\tif (active_ctx != DUMP_CTX)\n-\t\t\t\tend_revision(notes_ref);\n-\t\t\tactive_ctx = REV_CTX;\n-\t\t\treset_rev_ctx(atoi(val));\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Node-path\"):\n-\t\t\tif (constcmp(t, \"Node-\"))\n-\t\t\t\tcontinue;\n-\t\t\tif (!constcmp(t + strlen(\"Node-\"), \"path\")) {\n-\t\t\t\tif (active_ctx == NODE_CTX)\n-\t\t\t\t\thandle_node();\n-\t\t\t\tif (active_ctx == REV_CTX)\n-\t\t\t\t\tbegin_revision(local_ref);\n-\t\t\t\tactive_ctx = NODE_CTX;\n-\t\t\t\treset_node_ctx(val);\n-\t\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t\tif (constcmp(t + strlen(\"Node-\"), \"kind\"))\n-\t\t\t\tcontinue;\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tif (!strcmp(val, \"dir\"))\n-\t\t\t\tnode_ctx.type = S_IFDIR;\n-\t\t\telse if (!strcmp(val, \"file\"))\n-\t\t\t\tnode_ctx.type = S_IFREG | 0644;\n-\t\t\telse\n-\t\t\t\tfprintf(stderr, \"Unknown node-kind: %s\\n\", val);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Node-action\"):\n-\t\t\tif (constcmp(t, \"Node-action\"))\n-\t\t\t\tcontinue;\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tif (!strcmp(val, \"delete\")) {\n-\t\t\t\tnode_ctx.action = NODEACT_DELETE;\n-\t\t\t} else if (!strcmp(val, \"add\")) {\n-\t\t\t\tnode_ctx.action = NODEACT_ADD;\n-\t\t\t} else if (!strcmp(val, \"change\")) {\n-\t\t\t\tnode_ctx.action = NODEACT_CHANGE;\n-\t\t\t} else if (!strcmp(val, \"replace\")) {\n-\t\t\t\tnode_ctx.action = NODEACT_REPLACE;\n-\t\t\t} else {\n-\t\t\t\tfprintf(stderr, \"Unknown node-action: %s\\n\", val);\n-\t\t\t\tnode_ctx.action = NODEACT_UNKNOWN;\n-\t\t\t}\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Node-copyfrom-path\"):\n-\t\t\tif (constcmp(t, \"Node-copyfrom-path\"))\n-\t\t\t\tcontinue;\n-\t\t\tstrbuf_reset(&node_ctx.src);\n-\t\t\tstrbuf_addstr(&node_ctx.src, val);\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Node-copyfrom-rev\"):\n-\t\t\tif (constcmp(t, \"Node-copyfrom-rev\"))\n-\t\t\t\tcontinue;\n-\t\t\tnode_ctx.srcRev = atoi(val);\n-\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Text-content-length\"):\n-\t\t\tif (constcmp(t, \"Text\") && constcmp(t, \"Prop\"))\n-\t\t\t\tcontinue;\n-\t\t\tif (constcmp(t + 4, \"-content-length\"))\n-\t\t\t\tcontinue;\n-\t\t\t{\n-\t\t\t\tchar *end;\n-\t\t\t\tuintmax_t len;\n-\n-\t\t\t\tlen = strtoumax(val, &end, 10);\n-\t\t\t\tif (!isdigit(*val) || *end)\n-\t\t\t\t\tdie(\"invalid dump: non-numeric length %s\", val);\n-\t\t\t\tif (len > maximum_signed_value_of_type(off_t))\n-\t\t\t\t\tdie(\"unrepresentable length in dump: %s\", val);\n-\n-\t\t\t\tif (*t == 'T')\n-\t\t\t\t\tnode_ctx.text_length = (off_t) len;\n-\t\t\t\telse\n-\t\t\t\t\tnode_ctx.prop_length = (off_t) len;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\tcase sizeof(\"Text-delta\"):\n-\t\t\tif (!constcmp(t, \"Text-delta\")) {\n-\t\t\t\tnode_ctx.text_delta = !strcmp(val, \"true\");\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t\tif (constcmp(t, \"Prop-delta\"))\n-\t\t\t\tcontinue;\n-\t\t\tnode_ctx.prop_delta = !strcmp(val, \"true\");\n-\t\t\tbreak;\n-\t\tcase sizeof(\"Content-length\"):\n-\t\t\tif (constcmp(t, \"Content-length\"))\n-\t\t\t\tcontinue;\n-\t\t\tlen = atoi(val);\n-\t\t\tt = buffer_read_line(&input);\n-\t\t\tif (!t)\n-\t\t\t\tdie_short_read();\n-\t\t\tif (*t)\n-\t\t\t\tdie(\"invalid dump: expected blank line after content length header\");\n-\t\t\tif (active_ctx == REV_CTX) {\n-\t\t\t\tread_props();\n-\t\t\t} else if (active_ctx == NODE_CTX) {\n-\t\t\t\thandle_node();\n-\t\t\t\tactive_ctx = INTERNODE_CTX;\n-\t\t\t} else {\n-\t\t\t\tfprintf(stderr, \"Unexpected content length header: %\"PRIu32\"\\n\", len);\n-\t\t\t\tif (buffer_skip_bytes(&input, len) != len)\n-\t\t\t\t\tdie_short_read();\n-\t\t\t}\n-\t\t}\n-\t}\n-\tif (buffer_ferror(&input))\n-\t\tdie_short_read();\n-\tif (active_ctx == NODE_CTX)\n-\t\thandle_node();\n-\tif (active_ctx == REV_CTX)\n-\t\tbegin_revision(local_ref);\n-\tif (active_ctx != DUMP_CTX)\n-\t\tend_revision(notes_ref);\n-}\n-\n-static void init(int report_fd)\n-{\n-\tfast_export_init(report_fd);\n-\tstrbuf_init(&dump_ctx.uuid, 4096);\n-\tstrbuf_init(&dump_ctx.url, 4096);\n-\tstrbuf_init(&rev_ctx.log, 4096);\n-\tstrbuf_init(&rev_ctx.author, 4096);\n-\tstrbuf_init(&rev_ctx.note, 4096);\n-\tstrbuf_init(&node_ctx.src, 4096);\n-\tstrbuf_init(&node_ctx.dst, 4096);\n-\treset_dump_ctx(NULL);\n-\treset_rev_ctx(0);\n-\treset_node_ctx(NULL);\n-\treturn;\n-}\n-\n-int svndump_init(const char *filename)\n-{\n-\tif (buffer_init(&input, filename))\n-\t\treturn error_errno(\"cannot open %s\", filename ? filename : \"NULL\");\n-\tinit(REPORT_FILENO);\n-\treturn 0;\n-}\n-\n-int svndump_init_fd(int in_fd, int back_fd)\n-{\n-\tif(buffer_fdinit(&input, xdup(in_fd)))\n-\t\treturn error_errno(\"cannot open fd %d\", in_fd);\n-\tinit(xdup(back_fd));\n-\treturn 0;\n-}\n-\n-void svndump_deinit(void)\n-{\n-\tfast_export_deinit();\n-\treset_dump_ctx(NULL);\n-\treset_rev_ctx(0);\n-\treset_node_ctx(NULL);\n-\tstrbuf_release(&rev_ctx.log);\n-\tstrbuf_release(&rev_ctx.author);\n-\tstrbuf_release(&rev_ctx.note);\n-\tstrbuf_release(&node_ctx.src);\n-\tstrbuf_release(&node_ctx.dst);\n-\tif (buffer_deinit(&input))\n-\t\tfprintf(stderr, \"Input error\\n\");\n-\tif (ferror(stdout))\n-\t\tfprintf(stderr, \"Output error\\n\");\n-}\n-\n-void svndump_reset(void)\n-{\n-\tstrbuf_release(&dump_ctx.uuid);\n-\tstrbuf_release(&dump_ctx.url);\n-\tstrbuf_release(&rev_ctx.log);\n-\tstrbuf_release(&rev_ctx.author);\n-}\n-- \n2.28.0.573.gec6564704b\n"},{"id":"403554","messageId":"20200813150428.GA2244@syl.lan","threadId":"54035","inReplyTo":"20200813145719.GA891370@coredump.intra.peff.net","subject":"Re: [PATCH 1/5] Makefile: drop builtins from MSVC pdb list","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-08-13T15:04:28Z","receivedAt":"2020-08-13T15:04:33Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Thu, Aug 13, 2020 at 10:57:19AM -0400, Jeff King wrote:\n> Over the years some more programs have become builtins, but nobody\n> updated this MSVC-specific section of the file (which specifically says\n> that it should not include builtins). Let's bring it up to date.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> Given that nobody has mentioned this, it makes me wonder if anybody is\n> even using this part of the Makefile at all these days. Or maybe having\n> extra lines here isn't a problem (though it's also missing some entries,\n> like one for git-bugreport).\n\nIf having extra entries didn't cause a problem, I would suspect that it\nwas just that. But that missing entries *also* doesn't cause a problem,\nI'd suspect that this section of the Makefile just isn't being used.\n\nOf course, I'm not using it since I'm not on Windows, but maybe dscho or\nStolee would know if there are legitimate uses. Of course, if there\naren't, I'm favor of getting rid of this section entirely.\n\n>  Makefile | 2 --\n>  1 file changed, 2 deletions(-)\n>\n> diff --git a/Makefile b/Makefile\n> index 65f8cfb236..271b96348e 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -2901,7 +2901,6 @@ ifdef MSVC\n>  \t# because it is just a copy/hardlink of git.exe, rather than a unique binary.\n>  \t$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n>  \t$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n> -\t$(INSTALL) git-upload-pack.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n>  \t$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n> @@ -2912,7 +2911,6 @@ ifdef MSVC\n>  \t$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n> -\t$(INSTALL) git-show-index.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  ifndef DEBUG\n>  \t$(INSTALL) $(vcpkg_rel_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'\n>  \t$(INSTALL) $(vcpkg_rel_bin)/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n> --\n> 2.28.0.573.gec6564704b\n>\nThanks,\nTaylor\n"},{"id":"403555","messageId":"20200813150828.GA891963@coredump.intra.peff.net","threadId":"54035","inReplyTo":"20200813150428.GA2244@syl.lan","subject":"Re: [PATCH 1/5] Makefile: drop builtins from MSVC pdb list","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T15:08:28Z","receivedAt":"2020-08-13T15:08:30Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 13, 2020 at 11:04:28AM -0400, Taylor Blau wrote:\n\n> On Thu, Aug 13, 2020 at 10:57:19AM -0400, Jeff King wrote:\n> > Over the years some more programs have become builtins, but nobody\n> > updated this MSVC-specific section of the file (which specifically says\n> > that it should not include builtins). Let's bring it up to date.\n> >\n> > Signed-off-by: Jeff King <peff@peff.net>\n> > ---\n> > Given that nobody has mentioned this, it makes me wonder if anybody is\n> > even using this part of the Makefile at all these days. Or maybe having\n> > extra lines here isn't a problem (though it's also missing some entries,\n> > like one for git-bugreport).\n> \n> If having extra entries didn't cause a problem, I would suspect that it\n> was just that. But that missing entries *also* doesn't cause a problem,\n> I'd suspect that this section of the Makefile just isn't being used.\n> \n> Of course, I'm not using it since I'm not on Windows, but maybe dscho or\n> Stolee would know if there are legitimate uses. Of course, if there\n> aren't, I'm favor of getting rid of this section entirely.\n\nI cc'd Jeff Hostetler, who added it. :)\n\nI'm also pretty not-knowledgeable about Windows, but I think that\nanybody using MSVC would do so through Visual Studio these days. And\nthat's being covered with recent cmake stuff. Or maybe I'm just\nclueless. We'll see.\n\n-Peff\n"},{"id":"403556","messageId":"20200813150839.GB2244@syl.lan","threadId":"54035","inReplyTo":"20200813145855.GB891370@coredump.intra.peff.net","subject":"Re: [PATCH 2/5] make credential helpers builtins","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-08-13T15:08:39Z","receivedAt":"2020-08-13T15:08:44Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Thu, Aug 13, 2020 at 10:58:55AM -0400, Jeff King wrote:\n> There's no real reason for credential helpers to be separate binaries. I\n> did them this way originally under the notion that helper don't _need_\n> to be part of Git, and so can be built totally separately (and indeed,\n> the ones in contrib/credential are). But the ones in our main Makefile\n> build on libgit.a, and the resulting binaries are reasonably large.\n\nCould you clarify which helpers you mean here? Git's own\ncredential-cache and store make sense to convert, but the helpers in\ncontrib definitely don't.\n\nFor what it's worth, I'm almost positive that you mean the in-tree\nhelpers (where in-tree means \"in git.git but not in contrib\"), in which\ncase I'm in favor of this direcftion.\n\n> We can slim down our total disk footprint by just making them builtins.\n> This reduces the size of:\n>\n>   make strip install\n>\n> from 29MB to 24MB on my Debian system.\n\nGreat.\n\n> Note that credential-cache can't operate without support for Unix\n> sockets. Currently we just don't build it at all when NO_UNIX_SOCKETS is\n> set. We could continue that with conditionals in the Makefile and our\n> list of builtins. But instead, let's build a dummy implementation that\n> dies with an informative message. That has two advantages:\n>\n>   - it's simpler, because the conditional bits are all kept inside\n>     the credential-cache source\n>\n>   - a user who is expecting it to exist will be told _why_ they can't\n>     use it, rather than getting the \"credential-cache is not a git\n>     command\" error which makes it look like the Git install is broken.\n>\n> Note that our dummy implementation does still respond to \"-h\" in order\n> to appease t0012 (and this may be a little friendlier for users, as\n> well).\n\nYep, that makes sense and I think this approach seems fine.\n\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  Makefile                                      |  8 ++---\n>  builtin.h                                     |  3 ++\n>  .../credential-cache--daemon.c                | 29 ++++++++++++++++---\n>  .../credential-cache.c                        | 29 ++++++++++++++++---\n>  .../credential-store.c                        |  6 ++--\n>  contrib/buildsystems/CMakeLists.txt           | 20 +------------\n>  git.c                                         |  3 ++\n>  7 files changed, 63 insertions(+), 35 deletions(-)\n>  rename credential-cache--daemon.c => builtin/credential-cache--daemon.c (91%)\n>  rename credential-cache.c => builtin/credential-cache.c (83%)\n>  rename credential-store.c => builtin/credential-store.c (96%)\n>\n> diff --git a/Makefile b/Makefile\n> index 271b96348e..5b43c0fafb 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -672,7 +672,6 @@ EXTRA_PROGRAMS =\n>  PROGRAMS += $(EXTRA_PROGRAMS)\n>\n>  PROGRAM_OBJS += bugreport.o\n> -PROGRAM_OBJS += credential-store.o\n>  PROGRAM_OBJS += daemon.o\n>  PROGRAM_OBJS += fast-import.o\n>  PROGRAM_OBJS += http-backend.o\n> @@ -1052,6 +1051,9 @@ BUILTIN_OBJS += builtin/checkout-index.o\n>  BUILTIN_OBJS += builtin/checkout.o\n>  BUILTIN_OBJS += builtin/clean.o\n>  BUILTIN_OBJS += builtin/clone.o\n> +BUILTIN_OBJS += builtin/credential-cache.o\n> +BUILTIN_OBJS += builtin/credential-cache--daemon.o\n> +BUILTIN_OBJS += builtin/credential-store.o\n>  BUILTIN_OBJS += builtin/column.o\n>  BUILTIN_OBJS += builtin/commit-graph.o\n>  BUILTIN_OBJS += builtin/commit-tree.o\n> @@ -1634,11 +1636,8 @@ ifdef NO_INET_PTON\n>  endif\n>  ifdef NO_UNIX_SOCKETS\n>  \tBASIC_CFLAGS += -DNO_UNIX_SOCKETS\n> -\tEXCLUDED_PROGRAMS += git-credential-cache git-credential-cache--daemon\n>  else\n>  \tLIB_OBJS += unix-socket.o\n> -\tPROGRAM_OBJS += credential-cache.o\n> -\tPROGRAM_OBJS += credential-cache--daemon.o\n>  endif\n>\n>  ifdef NO_ICONV\n> @@ -2901,7 +2900,6 @@ ifdef MSVC\n>  \t# because it is just a copy/hardlink of git.exe, rather than a unique binary.\n>  \t$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n>  \t$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'\n> -\t$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n> diff --git a/builtin.h b/builtin.h\n> index a5ae15bfe5..4a0aed5448 100644\n> --- a/builtin.h\n> +++ b/builtin.h\n> @@ -138,6 +138,9 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix);\n>  int cmd_config(int argc, const char **argv, const char *prefix);\n>  int cmd_count_objects(int argc, const char **argv, const char *prefix);\n>  int cmd_credential(int argc, const char **argv, const char *prefix);\n> +int cmd_credential_cache(int argc, const char **argv, const char *prefix);\n> +int cmd_credential_cache_daemon(int argc, const char **argv, const char *prefix);\n> +int cmd_credential_store(int argc, const char **argv, const char *prefix);\n>  int cmd_describe(int argc, const char **argv, const char *prefix);\n>  int cmd_diff_files(int argc, const char **argv, const char *prefix);\n>  int cmd_diff_index(int argc, const char **argv, const char *prefix);\n> diff --git a/credential-cache--daemon.c b/builtin/credential-cache--daemon.c\n> similarity index 91%\n> rename from credential-cache--daemon.c\n> rename to builtin/credential-cache--daemon.c\n> index ec1271f89c..c61f123a3b 100644\n> --- a/credential-cache--daemon.c\n> +++ b/builtin/credential-cache--daemon.c\n> @@ -1,9 +1,12 @@\n> -#include \"cache.h\"\n> +#include \"builtin.h\"\n> +#include \"parse-options.h\"\n> +\n> +#ifndef NO_UNIX_SOCKETS\n> +\n>  #include \"config.h\"\n>  #include \"tempfile.h\"\n>  #include \"credential.h\"\n>  #include \"unix-socket.h\"\n> -#include \"parse-options.h\"\n>\n>  struct credential_cache_entry {\n>  \tstruct credential item;\n> @@ -257,7 +260,7 @@ static void init_socket_directory(const char *path)\n>  \tfree(path_copy);\n>  }\n>\n> -int cmd_main(int argc, const char **argv)\n> +int cmd_credential_cache_daemon(int argc, const char **argv, const char *prefix)\n>  {\n>  \tstruct tempfile *socket_file;\n>  \tconst char *socket_path;\n> @@ -275,7 +278,7 @@ int cmd_main(int argc, const char **argv)\n>\n>  \tgit_config_get_bool(\"credentialcache.ignoresighup\", &ignore_sighup);\n>\n> -\targc = parse_options(argc, argv, NULL, options, usage, 0);\n> +\targc = parse_options(argc, argv, prefix, options, usage, 0);\n>  \tsocket_path = argv[0];\n>\n>  \tif (!socket_path)\n> @@ -295,3 +298,21 @@ int cmd_main(int argc, const char **argv)\n>\n>  \treturn 0;\n>  }\n> +\n> +#else\n> +\n> +int cmd_credential_cache_daemon(int argc, const char **argv, const char *prefix)\n> +{\n> +\tconst char * const usage[] = {\n> +\t\t\"git credential-cache--daemon [options] <action>\",\n> +\t\t\"\",\n> +\t\t\"credential-cache--daemon is disabled in this build of Git\",\n> +\t\tNULL\n> +\t};\n> +\tstruct option options[] = { OPT_END() };\n> +\n> +\targc = parse_options(argc, argv, prefix, options, usage, 0);\n> +\tdie(_(\"credential-cache--daemon unavailable; no unix socket support\"));\n> +}\n> +\n> +#endif /* NO_UNIX_SOCKET */\n> diff --git a/credential-cache.c b/builtin/credential-cache.c\n> similarity index 83%\n> rename from credential-cache.c\n> rename to builtin/credential-cache.c\n> index 1cccc3a0b9..d0fafdeb9e 100644\n> --- a/credential-cache.c\n> +++ b/builtin/credential-cache.c\n> @@ -1,7 +1,10 @@\n> -#include \"cache.h\"\n> +#include \"builtin.h\"\n> +#include \"parse-options.h\"\n> +\n> +#ifndef NO_UNIX_SOCKETS\n> +\n>  #include \"credential.h\"\n>  #include \"string-list.h\"\n> -#include \"parse-options.h\"\n>  #include \"unix-socket.h\"\n>  #include \"run-command.h\"\n>\n> @@ -96,7 +99,7 @@ static char *get_socket_path(void)\n>  \treturn socket;\n>  }\n>\n> -int cmd_main(int argc, const char **argv)\n> +int cmd_credential_cache(int argc, const char **argv, const char *prefix)\n>  {\n>  \tchar *socket_path = NULL;\n>  \tint timeout = 900;\n> @@ -113,7 +116,7 @@ int cmd_main(int argc, const char **argv)\n>  \t\tOPT_END()\n>  \t};\n>\n> -\targc = parse_options(argc, argv, NULL, options, usage, 0);\n> +\targc = parse_options(argc, argv, prefix, options, usage, 0);\n>  \tif (!argc)\n>  \t\tusage_with_options(usage, options);\n>  \top = argv[0];\n> @@ -134,3 +137,21 @@ int cmd_main(int argc, const char **argv)\n>\n>  \treturn 0;\n>  }\n> +\n> +#else\n> +\n> +int cmd_credential_cache(int argc, const char **argv, const char *prefix)\n> +{\n> +\tconst char * const usage[] = {\n> +\t\t\"git credential-cache [options] <action>\",\n> +\t\t\"\",\n> +\t\t\"credential-cache is disabled in this build of Git\",\n> +\t\tNULL\n> +\t};\n> +\tstruct option options[] = { OPT_END() };\n> +\n> +\targc = parse_options(argc, argv, prefix, options, usage, 0);\n> +\tdie(_(\"credential-cache unavailable; no unix socket support\"));\n> +}\n> +\n> +#endif /* NO_UNIX_SOCKETS */\n> diff --git a/credential-store.c b/builtin/credential-store.c\n> similarity index 96%\n> rename from credential-store.c\n> rename to builtin/credential-store.c\n> index 294e771681..5331ab151a 100644\n> --- a/credential-store.c\n> +++ b/builtin/credential-store.c\n> @@ -1,4 +1,4 @@\n> -#include \"cache.h\"\n> +#include \"builtin.h\"\n>  #include \"lockfile.h\"\n>  #include \"credential.h\"\n>  #include \"string-list.h\"\n> @@ -143,7 +143,7 @@ static void lookup_credential(const struct string_list *fns, struct credential *\n>  \t\t\treturn; /* Found credential */\n>  }\n>\n> -int cmd_main(int argc, const char **argv)\n> +int cmd_credential_store(int argc, const char **argv, const char *prefix)\n>  {\n>  \tconst char * const usage[] = {\n>  \t\t\"git credential-store [<options>] <action>\",\n> @@ -161,7 +161,7 @@ int cmd_main(int argc, const char **argv)\n>\n>  \tumask(077);\n>\n> -\targc = parse_options(argc, (const char **)argv, NULL, options, usage, 0);\n> +\targc = parse_options(argc, (const char **)argv, prefix, options, usage, 0);\n>  \tif (argc != 1)\n>  \t\tusage_with_options(usage, options);\n>  \top = argv[0];\n> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\n> index 47215df25b..4be61247e5 100644\n> --- a/contrib/buildsystems/CMakeLists.txt\n> +++ b/contrib/buildsystems/CMakeLists.txt\n> @@ -501,15 +501,9 @@ unset(CMAKE_REQUIRED_INCLUDES)\n>\n>  #programs\n>  set(PROGRAMS_BUILT\n> -\tgit git-bugreport git-credential-store git-daemon git-fast-import git-http-backend git-sh-i18n--envsubst\n> +\tgit git-bugreport git-daemon git-fast-import git-http-backend git-sh-i18n--envsubst\n>  \tgit-shell git-remote-testsvn)\n>\n> -if(NO_UNIX_SOCKETS)\n> -\tlist(APPEND excluded_progs git-credential-cache git-credential-cache--daemon)\n> -else()\n> -\tlist(APPEND PROGRAMS_BUILT git-credential-cache git-credential-cache--daemon)\n> -endif()\n> -\n>  if(NOT CURL_FOUND)\n>  \tlist(APPEND excluded_progs git-http-fetch git-http-push)\n>  \tadd_compile_definitions(NO_CURL)\n> @@ -633,9 +627,6 @@ target_link_libraries(git common-main)\n>  add_executable(git-bugreport ${CMAKE_SOURCE_DIR}/bugreport.c)\n>  target_link_libraries(git-bugreport common-main)\n>\n> -add_executable(git-credential-store ${CMAKE_SOURCE_DIR}/credential-store.c)\n> -target_link_libraries(git-credential-store common-main)\n> -\n>  add_executable(git-daemon ${CMAKE_SOURCE_DIR}/daemon.c)\n>  target_link_libraries(git-daemon common-main)\n>\n> @@ -672,15 +663,6 @@ endif()\n>  add_executable(git-remote-testsvn ${CMAKE_SOURCE_DIR}/remote-testsvn.c)\n>  target_link_libraries(git-remote-testsvn common-main vcs-svn)\n>\n> -if(NOT NO_UNIX_SOCKETS)\n> -\tadd_executable(git-credential-cache ${CMAKE_SOURCE_DIR}/credential-cache.c)\n> -\ttarget_link_libraries(git-credential-cache common-main)\n> -\n> -\tadd_executable(git-credential-cache--daemon ${CMAKE_SOURCE_DIR}/credential-cache--daemon.c)\n> -\ttarget_link_libraries(git-credential-cache--daemon common-main)\n> -endif()\n> -\n> -\n>  set(git_builtin_extra\n>  \tcherry cherry-pick format-patch fsck-objects\n>  \tinit merge-subtree restore show\n> diff --git a/git.c b/git.c\n> index 8bd1d7551d..39a160fa52 100644\n> --- a/git.c\n> +++ b/git.c\n> @@ -499,6 +499,9 @@ static struct cmd_struct commands[] = {\n>  \t{ \"config\", cmd_config, RUN_SETUP_GENTLY | DELAY_PAGER_CONFIG },\n>  \t{ \"count-objects\", cmd_count_objects, RUN_SETUP },\n>  \t{ \"credential\", cmd_credential, RUN_SETUP_GENTLY | NO_PARSEOPT },\n> +\t{ \"credential-cache\", cmd_credential_cache },\n> +\t{ \"credential-cache--daemon\", cmd_credential_cache_daemon },\n> +\t{ \"credential-store\", cmd_credential_store },\n>  \t{ \"describe\", cmd_describe, RUN_SETUP },\n>  \t{ \"diff\", cmd_diff, NO_PARSEOPT },\n>  \t{ \"diff-files\", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE | NO_PARSEOPT },\n> --\n> 2.28.0.573.gec6564704b\n>\nThanks,\nTaylor\n"},{"id":"403557","messageId":"20200813151136.GC2244@syl.lan","threadId":"54035","inReplyTo":"20200813150017.GE891370@coredump.intra.peff.net","subject":"Re: [PATCH 5/5] drop vcs-svn experiment","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-08-13T15:11:36Z","receivedAt":"2020-08-13T15:11:41Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Thu, Aug 13, 2020 at 11:00:17AM -0400, Jeff King wrote:\n> The code in vcs-svn was started in 2010 as an attempt to build a\n> remote-helper for interacting with svn repositories (as opposed to\n> git-svn). However, we never got as far as shipping a mature remote\n> helper, and the last substantive commit was e99d012a6bc in 2012.\n>\n> We do have a git-remote-testsvn, and it is even installed as part of\n> \"make install\". But given the name, it seems unlikely to be used by\n> anybody (you'd have to explicitly \"git clone testsvn::$url\", and there\n> have been zero mentions of that on the mailing list since 2013, and even\n> that includes the phrase \"you might need to hack a bit to get it working\n> properly\"[1]).\n>\n> We also ship contrib/svn-fe, which builds on the vcs-svn work. However,\n> it does not seem to build out of the box for me, as the link step misses\n> some required libraries for using libgit.a. Curiously, the original\n> build breakage bisects for me to eff80a9fd9 (Allow custom \"comment\n> char\", 2013-01-16), which seems unrelated. There was an attempt to fix\n> it in da011cb0e7 (contrib/svn-fe: fix Makefile, 2014-08-28), but on my\n> system that only switches the error message.\n>\n> So it seems like the result is not really usable by anybody in practice.\n> It would be wonderful if somebody wanted to pick up the topic again, and\n> potentially it's worth carrying around for that reason. But the flip\n> side is that people doing tree-wide operations have to deal with this\n> code.  And you can see the list with (replace \"HEAD\" with this commit as\n> appropriate):\n\nI have nothing to add to this email other than to say that I think it\nmakes sense to remove this. I agree it would be nice if somebody picked\nit up, but given that nothing has really changed since ~8 years ago, I\nthink that it's unlikely to happen in the next ~8 years ;).\n\nAt least, it seems unlikely enough that dropping 2MB from the\ninstallation size is worth it. If someone *is* interested in picking it\nup, I'm sure that they won't have trouble finding this patch and\nreverting it.\n\nThanks.\n\n> [snip]\n\nThanks,\nTaylor\n"},{"id":"403558","messageId":"20200813151329.GD2244@syl.lan","threadId":"54035","inReplyTo":"20200813145515.GA891139@coredump.intra.peff.net","subject":"Re: [PATCH 0/5] slimming down installed size","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-08-13T15:13:29Z","receivedAt":"2020-08-13T15:13:42Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Thu, Aug 13, 2020 at 10:55:15AM -0400, Jeff King wrote:\n> A while ago I was looking at the size of an installed (and stripped)\n> build of Git, and noticed we could make a few more things into builtins.\n>\n> Patches 2-4 do that.  I don't think there's any real downside here.\n> We're not bringing in any new link dependencies to the main binary. And\n> even if these programs don't use all of the code that's in the main\n> binary, operating systems are good at just loading the pages that we do\n> need (and you're probably running other Git programs anyway, which means\n> the main binary is in RAM anyway and we're actually reducing the overall\n> memory footprint).\n>\n> The final patch is not strictly related, but it's something I've had\n> sitting around for a long time. I actually posted it almost exactly two\n> years ago:\n>\n>   https://lore.kernel.org/git/20180817190310.GA5360@sigill.intra.peff.net/\n>\n> which ended with Jonathan saying:\n>\n> >  - keeping this in-tree for the benefit of just one user is excessive,\n> >    so removing it is probably the right thing\n> >\n> >  - it would be nice if the commit removing this code from Git includes\n> >    a note to help people find its new home\n> >\n> > Would you mind holding off until I'm able to arrange that last bit?\n>\n> So...I held off for a bit, but I'd really like to be done with this (and\n> I prefer dropping the code, because I have a few other tree-wide\n> cleanups for which I'd just as soon not have to deal with vcs-svn).\n>\n>   [1/5]: Makefile: drop builtins from MSVC pdb list\n>   [2/5]: make credential helpers builtins\n>   [3/5]: make git-bugreport a builtin\n>   [4/5]: make git-fast-import a builtin\n>   [5/5]: drop vcs-svn experiment\n>\n>  .gitignore                                    |    1 -\n>  Makefile                                      |   45 +-\n>  builtin.h                                     |    5 +\n>  bugreport.c => builtin/bugreport.c            |   10 +-\n>  .../credential-cache--daemon.c                |   29 +-\n>  .../credential-cache.c                        |   29 +-\n>  .../credential-store.c                        |    6 +-\n>  fast-import.c => builtin/fast-import.c        |    3 +-\n>  contrib/buildsystems/CMakeLists.txt           |   52 +-\n>  contrib/svn-fe/.gitignore                     |    4 -\n>  contrib/svn-fe/Makefile                       |  105 --\n>  contrib/svn-fe/svn-fe.c                       |   18 -\n>  contrib/svn-fe/svn-fe.txt                     |   71 --\n>  contrib/svn-fe/svnrdump_sim.py                |   68 -\n>  git.c                                         |    5 +\n>  remote-testsvn.c                              |  341 -----\n>  t/helper/.gitignore                           |    2 -\n>  t/helper/test-line-buffer.c                   |   81 --\n>  t/helper/test-svn-fe.c                        |   52 -\n>  t/t0081-line-buffer.sh                        |   90 --\n>  t/t9010-svn-fe.sh                             | 1105 -----------------\n>  t/t9011-svn-da.sh                             |  248 ----\n>  t/t9020-remote-svn.sh                         |   95 --\n>  t/test-lib-functions.sh                       |    2 +-\n>  vcs-svn/LICENSE                               |   32 -\n>  vcs-svn/fast_export.c                         |  365 ------\n>  vcs-svn/line_buffer.c                         |  126 --\n>  vcs-svn/line_buffer.txt                       |   77 --\n>  vcs-svn/sliding_window.c                      |   79 --\n>  vcs-svn/svndiff.c                             |  309 -----\n>  vcs-svn/svndump.c                             |  540 --------\n>  31 files changed, 80 insertions(+), 3915 deletions(-)\n>  rename bugreport.c => builtin/bugreport.c (96%)\n>  rename credential-cache--daemon.c => builtin/credential-cache--daemon.c (91%)\n>  rename credential-cache.c => builtin/credential-cache.c (83%)\n>  rename credential-store.c => builtin/credential-store.c (96%)\n>  rename fast-import.c => builtin/fast-import.c (99%)\n>  delete mode 100644 contrib/svn-fe/.gitignore\n>  delete mode 100644 contrib/svn-fe/Makefile\n>  delete mode 100644 contrib/svn-fe/svn-fe.c\n>  delete mode 100644 contrib/svn-fe/svn-fe.txt\n>  delete mode 100755 contrib/svn-fe/svnrdump_sim.py\n>  delete mode 100644 remote-testsvn.c\n>  delete mode 100644 t/helper/test-line-buffer.c\n>  delete mode 100644 t/helper/test-svn-fe.c\n>  delete mode 100755 t/t0081-line-buffer.sh\n>  delete mode 100755 t/t9010-svn-fe.sh\n>  delete mode 100755 t/t9011-svn-da.sh\n>  delete mode 100755 t/t9020-remote-svn.sh\n>  delete mode 100644 vcs-svn/LICENSE\n>  delete mode 100644 vcs-svn/fast_export.c\n>  delete mode 100644 vcs-svn/line_buffer.c\n>  delete mode 100644 vcs-svn/line_buffer.txt\n>  delete mode 100644 vcs-svn/sliding_window.c\n>  delete mode 100644 vcs-svn/svndiff.c\n>  delete mode 100644 vcs-svn/svndump.c\n\nLooks all very good to me, and I'm certainly a fan of being able to drop\nthe installation size down substantially as you have done here. I didn't\ncomment on patches 3 and 4, since they are obviously correct and a good\nthing to be doing.\n\nIt would be interesting to think about how we might prevent someone from\nintroducing something that should be a builtin and has to link against\nlibgit.a other than looking for it carefully in review, but that's\ndefinitely outside the scope of what you're trying to do here.\n\nThanks.\n\nTaylor\n"},{"id":"403559","messageId":"20200813151410.GA892741@coredump.intra.peff.net","threadId":"54035","inReplyTo":"20200813150839.GB2244@syl.lan","subject":"Re: [PATCH 2/5] make credential helpers builtins","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T15:14:10Z","receivedAt":"2020-08-13T15:14:20Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 13, 2020 at 11:08:39AM -0400, Taylor Blau wrote:\n\n> On Thu, Aug 13, 2020 at 10:58:55AM -0400, Jeff King wrote:\n> > There's no real reason for credential helpers to be separate binaries. I\n> > did them this way originally under the notion that helper don't _need_\n> > to be part of Git, and so can be built totally separately (and indeed,\n> > the ones in contrib/credential are). But the ones in our main Makefile\n> > build on libgit.a, and the resulting binaries are reasonably large.\n> \n> Could you clarify which helpers you mean here? Git's own\n> credential-cache and store make sense to convert, but the helpers in\n> contrib definitely don't.\n> \n> For what it's worth, I'm almost positive that you mean the in-tree\n> helpers (where in-tree means \"in git.git but not in contrib\"), in which\n> case I'm in favor of this direcftion.\n\nYes, I mean the helpers in the Makefile that we build and install by\ndefault with a regular \"make\".\n\n-Peff\n"},{"id":"403560","messageId":"20200813151831.GB892741@coredump.intra.peff.net","threadId":"54035","inReplyTo":"20200813151136.GC2244@syl.lan","subject":"Re: [PATCH 5/5] drop vcs-svn experiment","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T15:18:31Z","receivedAt":"2020-08-13T15:18:33Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 13, 2020 at 11:11:36AM -0400, Taylor Blau wrote:\n\n> > So it seems like the result is not really usable by anybody in practice.\n> > It would be wonderful if somebody wanted to pick up the topic again, and\n> > potentially it's worth carrying around for that reason. But the flip\n> > side is that people doing tree-wide operations have to deal with this\n> > code.  And you can see the list with (replace \"HEAD\" with this commit as\n> > appropriate):\n> \n> I have nothing to add to this email other than to say that I think it\n> makes sense to remove this. I agree it would be nice if somebody picked\n> it up, but given that nothing has really changed since ~8 years ago, I\n> think that it's unlikely to happen in the next ~8 years ;).\n> \n> At least, it seems unlikely enough that dropping 2MB from the\n> installation size is worth it. If someone *is* interested in picking it\n> up, I'm sure that they won't have trouble finding this patch and\n> reverting it.\n\nTBH I care less about the installation size (which we could easily fix\nby just not installing git-remote-testsvn) and more that it's 3000 lines\nof basically-dead code. That keeps getting touched for tree-wide\nrefactors (most recently for strvec, but my -Wunused-parameters series\nwas the straw that caused me to just delete it instead).\n\nI don't think resurrecting it will be quite as easy as reverting this.\nBecause the rest of the code will move on, so it will probably need\nsome fixups, depending on how long it has been. But those fixups are the\nexact same changes we're saving regular git developers from doing. So\nit's really just gambling that we won't need to do them (and also\nshifting the work from everybody onto whoever chooses to work on this).\n\nIt would be nice if it could be spun out independently, but it does use\na bunch of data structures from libgit.a, which complicates that.\n\n-Peff\n"},{"id":"403565","messageId":"f8b7889a-ea1b-702c-acd4-1eb79e445197@gmail.com","threadId":"54035","inReplyTo":"20200813150828.GA891963@coredump.intra.peff.net","subject":"Re: [PATCH 1/5] Makefile: drop builtins from MSVC pdb list","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2020-08-13T16:37:40Z","receivedAt":"2020-08-13T16:37:48Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 8/13/2020 11:08 AM, Jeff King wrote:\n> On Thu, Aug 13, 2020 at 11:04:28AM -0400, Taylor Blau wrote:\n> \n>> On Thu, Aug 13, 2020 at 10:57:19AM -0400, Jeff King wrote:\n>>> Over the years some more programs have become builtins, but nobody\n>>> updated this MSVC-specific section of the file (which specifically says\n>>> that it should not include builtins). Let's bring it up to date.\n>>>\n>>> Signed-off-by: Jeff King <peff@peff.net>\n>>> ---\n>>> Given that nobody has mentioned this, it makes me wonder if anybody is\n>>> even using this part of the Makefile at all these days. Or maybe having\n>>> extra lines here isn't a problem (though it's also missing some entries,\n>>> like one for git-bugreport).\n>>\n>> If having extra entries didn't cause a problem, I would suspect that it\n>> was just that. But that missing entries *also* doesn't cause a problem,\n>> I'd suspect that this section of the Makefile just isn't being used.\n>>\n>> Of course, I'm not using it since I'm not on Windows, but maybe dscho or\n>> Stolee would know if there are legitimate uses. Of course, if there\n>> aren't, I'm favor of getting rid of this section entirely.\n> \n> I cc'd Jeff Hostetler, who added it. :)\n> \n> I'm also pretty not-knowledgeable about Windows, but I think that\n> anybody using MSVC would do so through Visual Studio these days. And\n> that's being covered with recent cmake stuff. Or maybe I'm just\n> clueless. We'll see.\n\nWe create PDBs for our microsoft/git installers, such as in this\nrecent build: [1]\n\n[1] https://dev.azure.com/gvfs/ci/_build/results?buildId=18994&view=artifacts&type=publishedArtifacts\n\nUnzipping, I see PDBs for the git-* files listed in this command,\nminus the ones that don't exist. So if this line is what creates\nthe PDBs, then it is not erroring out when trying to create the\nPDBs for commands that don't exist.\n\nThanks,\n-Stolee\n\n"},{"id":"403569","messageId":"f576fdce-9005-4653-3f91-0ddd2fff125d@gmail.com","threadId":"54035","inReplyTo":"20200813145936.GC891370@coredump.intra.peff.net","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2020-08-13T17:01:42Z","receivedAt":"2020-08-13T17:01:51Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 8/13/2020 10:59 AM, Jeff King wrote:\n> There's no reason that bugreport has to be a separate binary. And since\n> it links against libgit.a, it has a rather large disk footprint. Let's\n> make it a builtin, which reduces the size of a stripped installation\n> from 24MB to 22MB.\n> \n> This also simplifies our Makefile a bit. And we can take advantage of\n> builtin niceties like RUN_SETUP_GENTLY.\n\nI agree that this is a good change. I'm a bit surprised that a\nfeature added so recently wasn't added as a builtin in the first\nplace. Perhaps that was a conscious decision? Maybe it was just\nbecause there was some point in time where it might have been\nrelegated to contrib.\n\nThanks,\n-Stolee\n\n"},{"id":"403575","messageId":"20200813173845.GA1598703@coredump.intra.peff.net","threadId":"54035","inReplyTo":"f576fdce-9005-4653-3f91-0ddd2fff125d@gmail.com","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T17:38:45Z","receivedAt":"2020-08-13T17:38:48Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 13, 2020 at 01:01:42PM -0400, Derrick Stolee wrote:\n\n> On 8/13/2020 10:59 AM, Jeff King wrote:\n> > There's no reason that bugreport has to be a separate binary. And since\n> > it links against libgit.a, it has a rather large disk footprint. Let's\n> > make it a builtin, which reduces the size of a stripped installation\n> > from 24MB to 22MB.\n> > \n> > This also simplifies our Makefile a bit. And we can take advantage of\n> > builtin niceties like RUN_SETUP_GENTLY.\n> \n> I agree that this is a good change. I'm a bit surprised that a\n> feature added so recently wasn't added as a builtin in the first\n> place. Perhaps that was a conscious decision? Maybe it was just\n> because there was some point in time where it might have been\n> relegated to contrib.\n\nI looked in the history for any rationale, but couldn't find any. There\nis some discussion in the list, though. It looks like we moved from a\nbuiltin to standalone between v3 and v4 of the series, due to this\nsub-thread:\n\n  https://lore.kernel.org/git/xmqqr2284is5.fsf@gitster-ct.c.googlers.com/\n\nMy take is:\n\n  - I agree with Johannes that in terms of resource usage, builtins are\n    better. I'm skeptical that extra code within the Git binary produces\n    a meaningful impact on running other builtins (but I'd be happy to\n    look at evidence if somebody has it).\n\n  - Adding shared-library dependencies definitely _does_ impact other\n    builtin commands. And I think last November when the series was\n    shaping up that it wasn't clear if we might link to system-specific\n    data gathering libraries. But that wasn't how the series shook out;\n    we gather very little general system info, and we do it with basic\n    and lightweight techniques (like uname, or compiler preprocessor\n    macros). That could change eventually of course, but it's not like\n    switching back to a stand-alone at that point is a big deal.\n\n-Peff\n"},{"id":"403576","messageId":"20200813174027.GB1598703@coredump.intra.peff.net","threadId":"54035","inReplyTo":"f8b7889a-ea1b-702c-acd4-1eb79e445197@gmail.com","subject":"Re: [PATCH 1/5] Makefile: drop builtins from MSVC pdb list","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-13T17:40:27Z","receivedAt":"2020-08-13T17:40:30Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 13, 2020 at 12:37:40PM -0400, Derrick Stolee wrote:\n\n> We create PDBs for our microsoft/git installers, such as in this\n> recent build: [1]\n> \n> [1] https://dev.azure.com/gvfs/ci/_build/results?buildId=18994&view=artifacts&type=publishedArtifacts\n> \n> Unzipping, I see PDBs for the git-* files listed in this command,\n> minus the ones that don't exist. So if this line is what creates\n> the PDBs, then it is not erroring out when trying to create the\n> PDBs for commands that don't exist.\n\nAh, thanks for the explanation. The good news is that this list should\nbe up to date after my series. ;)\n\n-Peff\n"},{"id":"403579","messageId":"xmqqv9hm2zxp.fsf@gitster.c.googlers.com","threadId":"54035","inReplyTo":"20200813151410.GA892741@coredump.intra.peff.net","subject":"Re: [PATCH 2/5] make credential helpers builtins","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-08-13T17:55:30Z","receivedAt":"2020-08-13T17:55:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Thu, Aug 13, 2020 at 11:08:39AM -0400, Taylor Blau wrote:\n>\n>> On Thu, Aug 13, 2020 at 10:58:55AM -0400, Jeff King wrote:\n>> > There's no real reason for credential helpers to be separate binaries. I\n>> > did them this way originally under the notion that helper don't _need_\n>> > to be part of Git, and so can be built totally separately (and indeed,\n>> > the ones in contrib/credential are). But the ones in our main Makefile\n>> > build on libgit.a, and the resulting binaries are reasonably large.\n>> \n>> Could you clarify which helpers you mean here? Git's own\n>> credential-cache and store make sense to convert, but the helpers in\n>> contrib definitely don't.\n>> \n>> For what it's worth, I'm almost positive that you mean the in-tree\n>> helpers (where in-tree means \"in git.git but not in contrib\"), in which\n>> case I'm in favor of this direcftion.\n>\n> Yes, I mean the helpers in the Makefile that we build and install by\n> default with a regular \"make\".\n\nMakes sense, especially because none of the in-tree ones need to\nlink with any extra dependency at runtime, we do not even have to\ndebate if dynamic linkage overhead still matters ;-)\n"},{"id":"403580","messageId":"xmqqr1sa2znw.fsf@gitster.c.googlers.com","threadId":"54035","inReplyTo":"20200813145936.GC891370@coredump.intra.peff.net","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-08-13T18:01:23Z","receivedAt":"2020-08-13T18:01:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> There's no reason that bugreport has to be a separate binary. And since\n> it links against libgit.a, it has a rather large disk footprint. Let's\n> make it a builtin, which reduces the size of a stripped installation\n> from 24MB to 22MB.\n>\n> This also simplifies our Makefile a bit. And we can take advantage of\n> builtin niceties like RUN_SETUP_GENTLY.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  Makefile                            |  6 +-----\n>  builtin.h                           |  1 +\n>  bugreport.c => builtin/bugreport.c  | 10 +++-------\n>  contrib/buildsystems/CMakeLists.txt |  5 +----\n>  git.c                               |  1 +\n>  5 files changed, 7 insertions(+), 16 deletions(-)\n>  rename bugreport.c => builtin/bugreport.c (96%)\n\nI am on the fence, as bugreport does not seem to be fully completed\npart of the system.  The original thinking was that it may soon want\nto grow by linking with platform specific libraries for lower-level\nsystem characteristic identification, at which time we'd not want to\nhave it in builtins and \"we can take advantage of builtin niceties\"\nwill cause us regrets.  The only reason that hasn't happened as far\nas I can see is because its development speed is rather slow.\n\nSo, I dunno.\n\n\n> diff --git a/Makefile b/Makefile\n> index 5b43c0fafb..acaff6968b 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -671,7 +671,6 @@ EXTRA_PROGRAMS =\n>  # ... and all the rest that could be moved out of bindir to gitexecdir\n>  PROGRAMS += $(EXTRA_PROGRAMS)\n>  \n> -PROGRAM_OBJS += bugreport.o\n>  PROGRAM_OBJS += daemon.o\n>  PROGRAM_OBJS += fast-import.o\n>  PROGRAM_OBJS += http-backend.o\n> @@ -1041,6 +1040,7 @@ BUILTIN_OBJS += builtin/archive.o\n>  BUILTIN_OBJS += builtin/bisect--helper.o\n>  BUILTIN_OBJS += builtin/blame.o\n>  BUILTIN_OBJS += builtin/branch.o\n> +BUILTIN_OBJS += builtin/bugreport.o\n>  BUILTIN_OBJS += builtin/bundle.o\n>  BUILTIN_OBJS += builtin/cat-file.o\n>  BUILTIN_OBJS += builtin/check-attr.o\n> @@ -2458,10 +2458,6 @@ endif\n>  git-%$X: %.o GIT-LDFLAGS $(GITLIBS)\n>  \t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)\n>  \n> -git-bugreport$X: bugreport.o GIT-LDFLAGS $(GITLIBS)\n> -\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n> -\t\t$(LIBS)\n> -\n>  git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS)\n>  \t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n>  \t\t$(IMAP_SEND_LDFLAGS) $(LIBS)\n> diff --git a/builtin.h b/builtin.h\n> index 4a0aed5448..1e78d6c142 100644\n> --- a/builtin.h\n> +++ b/builtin.h\n> @@ -119,6 +119,7 @@ int cmd_archive(int argc, const char **argv, const char *prefix);\n>  int cmd_bisect__helper(int argc, const char **argv, const char *prefix);\n>  int cmd_blame(int argc, const char **argv, const char *prefix);\n>  int cmd_branch(int argc, const char **argv, const char *prefix);\n> +int cmd_bugreport(int argc, const char **argv, const char *prefix);\n>  int cmd_bundle(int argc, const char **argv, const char *prefix);\n>  int cmd_cat_file(int argc, const char **argv, const char *prefix);\n>  int cmd_checkout(int argc, const char **argv, const char *prefix);\n> diff --git a/bugreport.c b/builtin/bugreport.c\n> similarity index 96%\n> rename from bugreport.c\n> rename to builtin/bugreport.c\n> index 09579e268d..9c920cc065 100644\n> --- a/bugreport.c\n> +++ b/builtin/bugreport.c\n> @@ -1,4 +1,4 @@\n> -#include \"cache.h\"\n> +#include \"builtin.h\"\n>  #include \"parse-options.h\"\n>  #include \"strbuf.h\"\n>  #include \"help.h\"\n> @@ -119,16 +119,14 @@ static void get_header(struct strbuf *buf, const char *title)\n>  \tstrbuf_addf(buf, \"\\n\\n[%s]\\n\", title);\n>  }\n>  \n> -int cmd_main(int argc, const char **argv)\n> +int cmd_bugreport(int argc, const char **argv, const char *prefix)\n>  {\n>  \tstruct strbuf buffer = STRBUF_INIT;\n>  \tstruct strbuf report_path = STRBUF_INIT;\n>  \tint report = -1;\n>  \ttime_t now = time(NULL);\n>  \tchar *option_output = NULL;\n>  \tchar *option_suffix = \"%Y-%m-%d-%H%M\";\n> -\tint nongit_ok = 0;\n> -\tconst char *prefix = NULL;\n>  \tconst char *user_relative_path = NULL;\n>  \n>  \tconst struct option bugreport_options[] = {\n> @@ -139,8 +137,6 @@ int cmd_main(int argc, const char **argv)\n>  \t\tOPT_END()\n>  \t};\n>  \n> -\tprefix = setup_git_directory_gently(&nongit_ok);\n> -\n>  \targc = parse_options(argc, argv, prefix, bugreport_options,\n>  \t\t\t     bugreport_usage, 0);\n>  \n> @@ -170,7 +166,7 @@ int cmd_main(int argc, const char **argv)\n>  \tget_system_info(&buffer);\n>  \n>  \tget_header(&buffer, _(\"Enabled Hooks\"));\n> -\tget_populated_hooks(&buffer, nongit_ok);\n> +\tget_populated_hooks(&buffer, !startup_info->have_repository);\n>  \n>  \t/* fopen doesn't offer us an O_EXCL alternative, except with glibc. */\n>  \treport = open(report_path.buf, O_CREAT | O_EXCL | O_WRONLY, 0666);\n> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\n> index 4be61247e5..3e211606fd 100644\n> --- a/contrib/buildsystems/CMakeLists.txt\n> +++ b/contrib/buildsystems/CMakeLists.txt\n> @@ -501,7 +501,7 @@ unset(CMAKE_REQUIRED_INCLUDES)\n>  \n>  #programs\n>  set(PROGRAMS_BUILT\n> -\tgit git-bugreport git-daemon git-fast-import git-http-backend git-sh-i18n--envsubst\n> +\tgit git-daemon git-fast-import git-http-backend git-sh-i18n--envsubst\n>  \tgit-shell git-remote-testsvn)\n>  \n>  if(NOT CURL_FOUND)\n> @@ -624,9 +624,6 @@ list(TRANSFORM git_SOURCES PREPEND \"${CMAKE_SOURCE_DIR}/\")\n>  add_executable(git ${CMAKE_SOURCE_DIR}/git.c ${git_SOURCES})\n>  target_link_libraries(git common-main)\n>  \n> -add_executable(git-bugreport ${CMAKE_SOURCE_DIR}/bugreport.c)\n> -target_link_libraries(git-bugreport common-main)\n> -\n>  add_executable(git-daemon ${CMAKE_SOURCE_DIR}/daemon.c)\n>  target_link_libraries(git-daemon common-main)\n>  \n> diff --git a/git.c b/git.c\n> index 39a160fa52..bf790e7f4f 100644\n> --- a/git.c\n> +++ b/git.c\n> @@ -479,6 +479,7 @@ static struct cmd_struct commands[] = {\n>  \t{ \"bisect--helper\", cmd_bisect__helper, RUN_SETUP },\n>  \t{ \"blame\", cmd_blame, RUN_SETUP },\n>  \t{ \"branch\", cmd_branch, RUN_SETUP | DELAY_PAGER_CONFIG },\n> +\t{ \"bugreport\", cmd_bugreport, RUN_SETUP_GENTLY },\n>  \t{ \"bundle\", cmd_bundle, RUN_SETUP_GENTLY | NO_PARSEOPT },\n>  \t{ \"cat-file\", cmd_cat_file, RUN_SETUP },\n>  \t{ \"check-attr\", cmd_check_attr, RUN_SETUP },\n"},{"id":"403586","messageId":"xmqqa6yy2yjb.fsf@gitster.c.googlers.com","threadId":"54035","inReplyTo":"20200813173845.GA1598703@coredump.intra.peff.net","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-08-13T18:25:44Z","receivedAt":"2020-08-13T18:25:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>     macros). That could change eventually of course, but it's not like\n>     switching back to a stand-alone at that point is a big deal.\n\nIf it is not a big deal, then I am fine, but at the same time it\nbecomes unclear why we can say \"we can use X and Y niceties only\navailable for builtins\".\n\n\n"},{"id":"403589","messageId":"xmqqr1sa1iym.fsf@gitster.c.googlers.com","threadId":"54035","inReplyTo":"xmqqa6yy2yjb.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-08-13T18:47:29Z","receivedAt":"2020-08-13T18:47:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Jeff King <peff@peff.net> writes:\n>\n>>     macros). That could change eventually of course, but it's not like\n>>     switching back to a stand-alone at that point is a big deal.\n>\n> If it is not a big deal, then I am fine, but at the same time it\n> becomes unclear why we can say \"we can use X and Y niceties only\n> available for builtins\".\n\nActually, there is another issue that is potentially a lot worse.\n\n\"git bugreport\" not being built-in would mean that the compiled-in\ngit-version MUST not be relied upon (it merely is a version of the\nsource \"git bugreport\" came from, it does not necessarily match the\nmain \"git\" binary when we are dealing with a confused user with\nGIT_EXEC_PATH problem), but has to be asked to \"git\" binary on the\n$PATH externally.  That needs to be done for any non-builtin\nbinaries (e.g. when user is having issue with git-remote--curl\")\nanyway, keeping \"git bugreport\" out of builtin would force us the\nnecessary discipline from early on.\n"},{"id":"403636","messageId":"20200814100543.GA3312240@coredump.intra.peff.net","threadId":"54035","inReplyTo":"xmqqa6yy2yjb.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-14T10:05:43Z","receivedAt":"2020-08-14T10:05:45Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 13, 2020 at 11:25:44AM -0700, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> >     macros). That could change eventually of course, but it's not like\n> >     switching back to a stand-alone at that point is a big deal.\n> \n> If it is not a big deal, then I am fine, but at the same time it\n> becomes unclear why we can say \"we can use X and Y niceties only\n> available for builtins\".\n\nI may have oversold those niceties in the commit message. It is really\nonly saving us two lines of code, and it wouldn't be a big deal to\nrevert it (in fact, if you're uncomfortable with that, we could leave\nthe function otherwise intact).\n\n-Peff\n"},{"id":"403637","messageId":"20200814101321.GB3312240@coredump.intra.peff.net","threadId":"54035","inReplyTo":"xmqqr1sa1iym.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-14T10:13:21Z","receivedAt":"2020-08-14T10:13:24Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 13, 2020 at 11:47:29AM -0700, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > Jeff King <peff@peff.net> writes:\n> >\n> >>     macros). That could change eventually of course, but it's not like\n> >>     switching back to a stand-alone at that point is a big deal.\n> >\n> > If it is not a big deal, then I am fine, but at the same time it\n> > becomes unclear why we can say \"we can use X and Y niceties only\n> > available for builtins\".\n> \n> Actually, there is another issue that is potentially a lot worse.\n> \n> \"git bugreport\" not being built-in would mean that the compiled-in\n> git-version MUST not be relied upon (it merely is a version of the\n> source \"git bugreport\" came from, it does not necessarily match the\n> main \"git\" binary when we are dealing with a confused user with\n> GIT_EXEC_PATH problem), but has to be asked to \"git\" binary on the\n> $PATH externally.  That needs to be done for any non-builtin\n> binaries (e.g. when user is having issue with git-remote--curl\")\n> anyway, keeping \"git bugreport\" out of builtin would force us the\n> necessary discipline from early on.\n\nI'm skeptical that an external program would help at all there. If you\nsay \"git bugreport\" you are going to get the \"git\" on your PATH. If it's\na builtin, then obviously we'd run that version. If it's not, then it\nwould run the first one from GIT_EXEC_PATH. That would normally be the\nmatching version. If there's a misconfiguration where that is not true,\nthen I'd argue the builtin version is likely to produce a better\nresponse anyway.\n\nIf there were some mechanism by which that caused a failure that we\nmight notice and correct, I'd agree with your \"necessary discipline\"\ncomment. But in practice I think that:\n\n  - it will either not matter for the details collected in the bug\n    report, in which case nobody will notice the misconfiguration anyway\n\n  - it will lead to confusing details in the report, at which point\n    people will work manually with the submitter to figure out what is\n    going on (just like they do now)\n\nBut I don't see a way that it systematically identifies such\nmisconfigurations or helps us avoid them. If it is a type of issue that\ncomes up a lot, then that's something the tool ought to be examining\nsystematically (looking at GIT* in the environment, reporting the\nbaked-in exec path, etc). Trying to glean that from behavior differences\nin an external bugreport program sounds fragile and confusing.\n\n-Peff\n"},{"id":"403661","messageId":"nycvar.QRO.7.76.6.2008141611490.54@tvgsbejvaqbjf.bet","threadId":"54035","inReplyTo":"20200813150828.GA891963@coredump.intra.peff.net","subject":"Re: [PATCH 1/5] Makefile: drop builtins from MSVC pdb list","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-08-14T14:18:37Z","receivedAt":"2020-08-14T14:18:50Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peff,\n\nOn Thu, 13 Aug 2020, Jeff King wrote:\n\n> On Thu, Aug 13, 2020 at 11:04:28AM -0400, Taylor Blau wrote:\n>\n> > On Thu, Aug 13, 2020 at 10:57:19AM -0400, Jeff King wrote:\n> > > Over the years some more programs have become builtins, but nobody\n> > > updated this MSVC-specific section of the file (which specifically says\n> > > that it should not include builtins). Let's bring it up to date.\n> > >\n> > > Signed-off-by: Jeff King <peff@peff.net>\n> > > ---\n> > > Given that nobody has mentioned this, it makes me wonder if anybody is\n> > > even using this part of the Makefile at all these days. Or maybe having\n> > > extra lines here isn't a problem (though it's also missing some entries,\n> > > like one for git-bugreport).\n> >\n> > If having extra entries didn't cause a problem, I would suspect that it\n> > was just that. But that missing entries *also* doesn't cause a problem,\n> > I'd suspect that this section of the Makefile just isn't being used.\n> >\n> > Of course, I'm not using it since I'm not on Windows, but maybe dscho or\n> > Stolee would know if there are legitimate uses. Of course, if there\n> > aren't, I'm favor of getting rid of this section entirely.\n>\n> I cc'd Jeff Hostetler, who added it. :)\n>\n> I'm also pretty not-knowledgeable about Windows, but I think that\n> anybody using MSVC would do so through Visual Studio these days. And\n> that's being covered with recent cmake stuff. Or maybe I'm just\n> clueless. We'll see.\n\nWe have a couple ways to build Git on Windows:\n\n- the standard way, in a Git for Windows SDK (which is a slightly modified\n  subset of MSYS2). This uses GCC and GNU make and all the things that you\n  might suspect given Git's origins on Linux.\n\n- the Visual Studio way, after running `make vcxproj` in Git for Windows'\n  SDK. As part of the `vcxproj` target, the non-C parts of Git are\n  generated and committed.\n\n- the \"new\" Visual Studio way, after running CMake. The non-C parts are\n  generated through CMake, which is nice because no Git for Windows SDK is\n  required to build this from start to finish.\n\n- the Visual C way, as championed by Jeff (and which was a prerequisite to\n  working on the `vcxproj` target): in a Git for Windows SDK, use GNU make\n  but replace GCC by MSVC (via the command-line): `make MSVC=1`.\n\nWhile all four methods work, the only one that is regularly used with the\n`make install` command is the first one.\n\nThe location you modified is in the `MSVC` part of `compat.mak.uname`,\ni.e. in the Visual C part.\n\nWe originally had a tentative plan to eventually, maybe, build Git for\nWindows using Visual C by default. However, it turned out that the\nstandard malloc in Visual C's runtime was tuned for other workloads than\nGits, and that nedmalloc performed better, and we originally could not get\nnedmalloc to compile with a modern Visual C, so we stopped that effort.\n\nThat's why you still have support for `make MSVC=1 install`.\n\nSince it seems not to be too much trouble, I would prefer to keep it\nworking for now, even if it is rarely exercised and regressions might\ncreep in (like the ones you fixed).\n\nThanks,\nDscho\n"},{"id":"403662","messageId":"nycvar.QRO.7.76.6.2008141623530.54@tvgsbejvaqbjf.bet","threadId":"54035","inReplyTo":"xmqqr1sa1iym.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-08-14T14:25:05Z","receivedAt":"2020-08-14T14:25:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 13 Aug 2020, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n> > Jeff King <peff@peff.net> writes:\n> >\n> >>     macros). That could change eventually of course, but it's not like\n> >>     switching back to a stand-alone at that point is a big deal.\n> >\n> > If it is not a big deal, then I am fine, but at the same time it\n> > becomes unclear why we can say \"we can use X and Y niceties only\n> > available for builtins\".\n>\n> Actually, there is another issue that is potentially a lot worse.\n>\n> \"git bugreport\" not being built-in would mean that the compiled-in\n> git-version MUST not be relied upon (it merely is a version of the\n> source \"git bugreport\" came from, it does not necessarily match the\n> main \"git\" binary when we are dealing with a confused user with\n> GIT_EXEC_PATH problem), but has to be asked to \"git\" binary on the\n> $PATH externally.  That needs to be done for any non-builtin\n> binaries (e.g. when user is having issue with git-remote--curl\")\n> anyway, keeping \"git bugreport\" out of builtin would force us the\n> necessary discipline from early on.\n\nSince `git bugreport` requires specific functionality from, say,\n`git-remote--curl` we would already have a bit of trouble in case of\nversion skew there.\n\nBut yes, I am glad that we finally can at least rely on the Git version\n`git bugreport` reports.\n\nCiao,\nDscho\n"},{"id":"403663","messageId":"nycvar.QRO.7.76.6.2008141625450.54@tvgsbejvaqbjf.bet","threadId":"54035","inReplyTo":"xmqqr1sa2znw.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-08-14T14:28:37Z","receivedAt":"2020-08-14T14:28:46Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 13 Aug 2020, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n>\n> > There's no reason that bugreport has to be a separate binary. And since\n> > it links against libgit.a, it has a rather large disk footprint. Let's\n> > make it a builtin, which reduces the size of a stripped installation\n> > from 24MB to 22MB.\n> >\n> > This also simplifies our Makefile a bit. And we can take advantage of\n> > builtin niceties like RUN_SETUP_GENTLY.\n> >\n> > Signed-off-by: Jeff King <peff@peff.net>\n> > ---\n> >  Makefile                            |  6 +-----\n> >  builtin.h                           |  1 +\n> >  bugreport.c => builtin/bugreport.c  | 10 +++-------\n> >  contrib/buildsystems/CMakeLists.txt |  5 +----\n> >  git.c                               |  1 +\n> >  5 files changed, 7 insertions(+), 16 deletions(-)\n> >  rename bugreport.c => builtin/bugreport.c (96%)\n>\n> I am on the fence, as bugreport does not seem to be fully completed\n> part of the system.  The original thinking was that it may soon want\n> to grow by linking with platform specific libraries for lower-level\n> system characteristic identification, at which time we'd not want to\n> have it in builtins and \"we can take advantage of builtin niceties\"\n> will cause us regrets.  The only reason that hasn't happened as far\n> as I can see is because its development speed is rather slow.\n\nNo, I think the reason is much more benign: my suggestion to query\ninformation from the respective executables that _already_ link to said\nshared libraries seems to have born fruit. It has the additional advantage\nthat we need not worry about cases where `git-bugreport` would look at a\ndifferent dependency than, say, `git-remote--curl`.\n\nSo yes, I am rather delighted that `bugreport` finally takes this\ndirection. It makes me much less worried about the reliability of the\ninformation provided in bug reports.\n\nCiao,\nDscho\n"},{"id":"403664","messageId":"20200814143231.GA4167031@coredump.intra.peff.net","threadId":"54035","inReplyTo":"nycvar.QRO.7.76.6.2008141611490.54@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 1/5] Makefile: drop builtins from MSVC pdb list","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-14T14:32:31Z","receivedAt":"2020-08-14T14:32:33Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Aug 14, 2020 at 04:18:37PM +0200, Johannes Schindelin wrote:\n\n> While all four methods work, the only one that is regularly used with the\n> `make install` command is the first one.\n> \n> The location you modified is in the `MSVC` part of `compat.mak.uname`,\n> i.e. in the Visual C part.\n> \n> We originally had a tentative plan to eventually, maybe, build Git for\n> Windows using Visual C by default. However, it turned out that the\n> standard malloc in Visual C's runtime was tuned for other workloads than\n> Gits, and that nedmalloc performed better, and we originally could not get\n> nedmalloc to compile with a modern Visual C, so we stopped that effort.\n> \n> That's why you still have support for `make MSVC=1 install`.\n> \n> Since it seems not to be too much trouble, I would prefer to keep it\n> working for now, even if it is rarely exercised and regressions might\n> creep in (like the ones you fixed).\n\nAh, thanks. That perfectly explains what is going on and why it might\nnot have been noticed. I agree it is not too much trouble to keep it\naround for now.\n\n-Peff\n"},{"id":"403665","messageId":"nycvar.QRO.7.76.6.2008141634500.54@tvgsbejvaqbjf.bet","threadId":"54035","inReplyTo":"20200813150017.GE891370@coredump.intra.peff.net","subject":"Re: [PATCH 5/5] drop vcs-svn experiment","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-08-14T14:39:07Z","receivedAt":"2020-08-14T14:39:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peff,\n\nOn Thu, 13 Aug 2020, Jeff King wrote:\n\n> The code in vcs-svn was started in 2010 as an attempt to build a\n> remote-helper for interacting with svn repositories (as opposed to\n> git-svn). However, we never got as far as shipping a mature remote\n> helper, and the last substantive commit was e99d012a6bc in 2012.\n>\n> We do have a git-remote-testsvn, and it is even installed as part of\n> \"make install\". But given the name, it seems unlikely to be used by\n> anybody (you'd have to explicitly \"git clone testsvn::$url\", and there\n> have been zero mentions of that on the mailing list since 2013, and even\n> that includes the phrase \"you might need to hack a bit to get it working\n> properly\"[1]).\n>\n> We also ship contrib/svn-fe, which builds on the vcs-svn work. However,\n> it does not seem to build out of the box for me, as the link step misses\n> some required libraries for using libgit.a. Curiously, the original\n> build breakage bisects for me to eff80a9fd9 (Allow custom \"comment\n> char\", 2013-01-16), which seems unrelated. There was an attempt to fix\n> it in da011cb0e7 (contrib/svn-fe: fix Makefile, 2014-08-28), but on my\n> system that only switches the error message.\n\nFWIW I got it to work, as part of my initial patches to support\n`init.defaultBranch`. I even included a patch to touch `svn-fe` up in the\npatch thicket to demonstrate how we can move from `master` as Git's\ndefault branch to `main`.\n\nHowever, given that Subversion usage has declined so dramatically over the\npast ten years, I am inclined to agree with you that it makes sense to\ndrop `testsvn` as well as `svn-fe`.\n\nThanks,\nDscho\n\n>\n> So it seems like the result is not really usable by anybody in practice.\n> It would be wonderful if somebody wanted to pick up the topic again, and\n> potentially it's worth carrying around for that reason. But the flip\n> side is that people doing tree-wide operations have to deal with this\n> code.  And you can see the list with (replace \"HEAD\" with this commit as\n> appropriate):\n>\n>   {\n>     echo \"--\"\n>     git diff-tree --diff-filter=D -r --name-only HEAD^ HEAD\n>   } |\n>   git log --no-merges --oneline e99d012a6bc.. --stdin\n>\n> which shows 58 times somebody had to deal with the code, generally due\n> to a compile or test failure, or a tree-wide style fix or API change.\n> Let's drop it and let anybody who wants to pick it up do so by\n> resurrecting it from the git history.\n>\n> As a bonus, this also reduces the size of a stripped installation of Git\n> from 21MB to 19MB.\n>\n> [1] https://lore.kernel.org/git/CALkWK0mPHzKfzFKKpZkfAus3YVC9NFYDbFnt+5JQYVKipk3bQQ@mail.gmail.com/\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  .gitignore                          |    1 -\n>  Makefile                            |   26 +-\n>  contrib/buildsystems/CMakeLists.txt |   26 +-\n>  contrib/svn-fe/.gitignore           |    4 -\n>  contrib/svn-fe/Makefile             |  105 ---\n>  contrib/svn-fe/svn-fe.c             |   18 -\n>  contrib/svn-fe/svn-fe.txt           |   71 --\n>  contrib/svn-fe/svnrdump_sim.py      |   68 --\n>  remote-testsvn.c                    |  341 ---------\n>  t/helper/.gitignore                 |    2 -\n>  t/helper/test-line-buffer.c         |   81 --\n>  t/helper/test-svn-fe.c              |   52 --\n>  t/t0081-line-buffer.sh              |   90 ---\n>  t/t9010-svn-fe.sh                   | 1105 ---------------------------\n>  t/t9011-svn-da.sh                   |  248 ------\n>  t/t9020-remote-svn.sh               |   95 ---\n>  t/test-lib-functions.sh             |    2 +-\n>  vcs-svn/LICENSE                     |   32 -\n>  vcs-svn/fast_export.c               |  365 ---------\n>  vcs-svn/line_buffer.c               |  126 ---\n>  vcs-svn/line_buffer.txt             |   77 --\n>  vcs-svn/sliding_window.c            |   79 --\n>  vcs-svn/svndiff.c                   |  309 --------\n>  vcs-svn/svndump.c                   |  540 -------------\n>  24 files changed, 7 insertions(+), 3856 deletions(-)\n>  delete mode 100644 contrib/svn-fe/.gitignore\n>  delete mode 100644 contrib/svn-fe/Makefile\n>  delete mode 100644 contrib/svn-fe/svn-fe.c\n>  delete mode 100644 contrib/svn-fe/svn-fe.txt\n>  delete mode 100755 contrib/svn-fe/svnrdump_sim.py\n>  delete mode 100644 remote-testsvn.c\n>  delete mode 100644 t/helper/test-line-buffer.c\n>  delete mode 100644 t/helper/test-svn-fe.c\n>  delete mode 100755 t/t0081-line-buffer.sh\n>  delete mode 100755 t/t9010-svn-fe.sh\n>  delete mode 100755 t/t9011-svn-da.sh\n>  delete mode 100755 t/t9020-remote-svn.sh\n>  delete mode 100644 vcs-svn/LICENSE\n>  delete mode 100644 vcs-svn/fast_export.c\n>  delete mode 100644 vcs-svn/line_buffer.c\n>  delete mode 100644 vcs-svn/line_buffer.txt\n>  delete mode 100644 vcs-svn/sliding_window.c\n>  delete mode 100644 vcs-svn/svndiff.c\n>  delete mode 100644 vcs-svn/svndump.c\n>\n> diff --git a/.gitignore b/.gitignore\n> index ee509a2ad2..9673e792db 100644\n> --- a/.gitignore\n> +++ b/.gitignore\n> @@ -134,7 +134,6 @@\n>  /git-remote-fd\n>  /git-remote-ext\n>  /git-remote-testpy\n> -/git-remote-testsvn\n>  /git-repack\n>  /git-replace\n>  /git-request-pull\n> diff --git a/Makefile b/Makefile\n> index 2b821fc762..314179d918 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -569,7 +569,6 @@ BUILT_INS =\n>  COMPAT_CFLAGS =\n>  COMPAT_OBJS =\n>  XDIFF_OBJS =\n> -VCSSVN_OBJS =\n>  GENERATED_H =\n>  EXTRA_CPPFLAGS =\n>  FUZZ_OBJS =\n> @@ -674,7 +673,6 @@ PROGRAMS += $(EXTRA_PROGRAMS)\n>  PROGRAM_OBJS += daemon.o\n>  PROGRAM_OBJS += http-backend.o\n>  PROGRAM_OBJS += imap-send.o\n> -PROGRAM_OBJS += remote-testsvn.o\n>  PROGRAM_OBJS += sh-i18n--envsubst.o\n>  PROGRAM_OBJS += shell.o\n>\n> @@ -746,8 +744,6 @@ TEST_BUILTINS_OBJS += test-xml-encode.o\n>  # Do not add more tests here unless they have extra dependencies. Add\n>  # them in TEST_BUILTINS_OBJS above.\n>  TEST_PROGRAMS_NEED_X += test-fake-ssh\n> -TEST_PROGRAMS_NEED_X += test-line-buffer\n> -TEST_PROGRAMS_NEED_X += test-svn-fe\n>  TEST_PROGRAMS_NEED_X += test-tool\n>\n>  TEST_PROGRAMS = $(patsubst %,t/helper/%$X,$(TEST_PROGRAMS_NEED_X))\n> @@ -803,7 +799,6 @@ TEST_SHELL_PATH = $(SHELL_PATH)\n>\n>  LIB_FILE = libgit.a\n>  XDIFF_LIB = xdiff/lib.a\n> -VCSSVN_LIB = vcs-svn/lib.a\n>\n>  GENERATED_H += config-list.h\n>  GENERATED_H += command-list.h\n> @@ -2345,16 +2340,9 @@ XDIFF_OBJS += xdiff/xpatience.o\n>  XDIFF_OBJS += xdiff/xprepare.o\n>  XDIFF_OBJS += xdiff/xutils.o\n>\n> -VCSSVN_OBJS += vcs-svn/fast_export.o\n> -VCSSVN_OBJS += vcs-svn/line_buffer.o\n> -VCSSVN_OBJS += vcs-svn/sliding_window.o\n> -VCSSVN_OBJS += vcs-svn/svndiff.o\n> -VCSSVN_OBJS += vcs-svn/svndump.o\n> -\n>  TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))\n>  OBJECTS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \\\n>  \t$(XDIFF_OBJS) \\\n> -\t$(VCSSVN_OBJS) \\\n>  \t$(FUZZ_OBJS) \\\n>  \tcommon-main.o \\\n>  \tgit.o\n> @@ -2469,10 +2457,6 @@ git-http-push$X: http.o http-push.o GIT-LDFLAGS $(GITLIBS)\n>  \t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n>  \t\t$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)\n>\n> -git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB)\n> -\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) \\\n> -\t$(VCSSVN_LIB)\n> -\n>  $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)\n>  \t$(QUIET_LNCP)$(RM) $@ && \\\n>  \tln $< $@ 2>/dev/null || \\\n> @@ -2489,9 +2473,6 @@ $(LIB_FILE): $(LIB_OBJS)\n>  $(XDIFF_LIB): $(XDIFF_OBJS)\n>  \t$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^\n>\n> -$(VCSSVN_LIB): $(VCSSVN_OBJS)\n> -\t$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^\n> -\n>  export DEFAULT_EDITOR DEFAULT_PAGER\n>\n>  Documentation/GIT-EXCLUDED-PROGRAMS: FORCE\n> @@ -2766,10 +2747,6 @@ perf: all\n>\n>  .PHONY: test perf\n>\n> -t/helper/test-line-buffer$X: $(VCSSVN_LIB)\n> -\n> -t/helper/test-svn-fe$X: $(VCSSVN_LIB)\n> -\n>  .PRECIOUS: $(TEST_OBJS)\n>\n>  t/helper/test-tool$X: $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))\n> @@ -2902,7 +2879,6 @@ ifdef MSVC\n>  \t$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n> -\t$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  \t$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n>  ifndef DEBUG\n>  \t$(INSTALL) $(vcpkg_rel_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'\n> @@ -3103,7 +3079,7 @@ cocciclean:\n>  clean: profile-clean coverage-clean cocciclean\n>  \t$(RM) *.res\n>  \t$(RM) $(OBJECTS)\n> -\t$(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)\n> +\t$(RM) $(LIB_FILE) $(XDIFF_LIB)\n>  \t$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X\n>  \t$(RM) $(TEST_PROGRAMS)\n>  \t$(RM) $(FUZZ_PROGRAMS)\n> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\n> index 4a6f135b16..5007f173f1 100644\n> --- a/contrib/buildsystems/CMakeLists.txt\n> +++ b/contrib/buildsystems/CMakeLists.txt\n> @@ -502,7 +502,7 @@ unset(CMAKE_REQUIRED_INCLUDES)\n>  #programs\n>  set(PROGRAMS_BUILT\n>  \tgit git-daemon git-http-backend git-sh-i18n--envsubst\n> -\tgit-shell git-remote-testsvn)\n> +\tgit-shell)\n>\n>  if(NOT CURL_FOUND)\n>  \tlist(APPEND excluded_progs git-http-fetch git-http-push)\n> @@ -568,12 +568,6 @@ parse_makefile_for_sources(libxdiff_SOURCES \"XDIFF_OBJS\")\n>  list(TRANSFORM libxdiff_SOURCES PREPEND \"${CMAKE_SOURCE_DIR}/\")\n>  add_library(xdiff STATIC ${libxdiff_SOURCES})\n>\n> -#libvcs-svn\n> -parse_makefile_for_sources(libvcs-svn_SOURCES \"VCSSVN_OBJS\")\n> -\n> -list(TRANSFORM libvcs-svn_SOURCES PREPEND \"${CMAKE_SOURCE_DIR}/\")\n> -add_library(vcs-svn STATIC ${libvcs-svn_SOURCES})\n> -\n>  if(WIN32)\n>  \tif(NOT MSVC)#use windres when compiling with gcc and clang\n>  \t\tadd_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git.res\n> @@ -654,9 +648,6 @@ if(CURL_FOUND)\n>  \tendif()\n>  endif()\n>\n> -add_executable(git-remote-testsvn ${CMAKE_SOURCE_DIR}/remote-testsvn.c)\n> -target_link_libraries(git-remote-testsvn common-main vcs-svn)\n> -\n>  set(git_builtin_extra\n>  \tcherry cherry-pick format-patch fsck-objects\n>  \tinit merge-subtree restore show\n> @@ -832,26 +823,20 @@ if(BUILD_TESTING)\n>  add_executable(test-fake-ssh ${CMAKE_SOURCE_DIR}/t/helper/test-fake-ssh.c)\n>  target_link_libraries(test-fake-ssh common-main)\n>\n> -add_executable(test-line-buffer ${CMAKE_SOURCE_DIR}/t/helper/test-line-buffer.c)\n> -target_link_libraries(test-line-buffer common-main vcs-svn)\n> -\n> -add_executable(test-svn-fe ${CMAKE_SOURCE_DIR}/t/helper/test-svn-fe.c)\n> -target_link_libraries(test-svn-fe common-main vcs-svn)\n> -\n>  #test-tool\n>  parse_makefile_for_sources(test-tool_SOURCES \"TEST_BUILTINS_OBJS\")\n>\n>  list(TRANSFORM test-tool_SOURCES PREPEND \"${CMAKE_SOURCE_DIR}/t/helper/\")\n>  add_executable(test-tool ${CMAKE_SOURCE_DIR}/t/helper/test-tool.c ${test-tool_SOURCES})\n>  target_link_libraries(test-tool common-main)\n>\n> -set_target_properties(test-fake-ssh test-line-buffer test-svn-fe test-tool\n> +set_target_properties(test-fake-ssh test-tool\n>  \t\t\tPROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/t/helper)\n>\n>  if(MSVC)\n> -\tset_target_properties(test-fake-ssh test-line-buffer test-svn-fe test-tool\n> +\tset_target_properties(test-fake-ssh test-tool\n>  \t\t\t\tPROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/t/helper)\n> -\tset_target_properties(test-fake-ssh test-line-buffer test-svn-fe test-tool\n> +\tset_target_properties(test-fake-ssh test-tool\n>  \t\t\t\tPROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/t/helper)\n>  endif()\n>\n> @@ -860,7 +845,7 @@ set(wrapper_scripts\n>  \tgit git-upload-pack git-receive-pack git-upload-archive git-shell git-remote-ext)\n>\n>  set(wrapper_test_scripts\n> -\ttest-fake-ssh test-line-buffer test-svn-fe test-tool)\n> +\ttest-fake-ssh test-tool)\n>\n>\n>  foreach(script ${wrapper_scripts})\n> @@ -961,7 +946,6 @@ if(NOT ${CMAKE_BINARY_DIR}/CMakeCache.txt STREQUAL ${CACHE_PATH})\n>  \tfile(COPY ${CMAKE_SOURCE_DIR}/mergetools/tkdiff DESTINATION ${CMAKE_BINARY_DIR}/mergetools/)\n>  \tfile(COPY ${CMAKE_SOURCE_DIR}/contrib/completion/git-prompt.sh DESTINATION ${CMAKE_BINARY_DIR}/contrib/completion/)\n>  \tfile(COPY ${CMAKE_SOURCE_DIR}/contrib/completion/git-completion.bash DESTINATION ${CMAKE_BINARY_DIR}/contrib/completion/)\n> -\tfile(COPY ${CMAKE_SOURCE_DIR}/contrib/svn-fe/svnrdump_sim.py DESTINATION ${CMAKE_BINARY_DIR}/contrib/svn-fe/)\n>  endif()\n>\n>  file(GLOB test_scipts \"${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh\")\n> diff --git a/contrib/svn-fe/.gitignore b/contrib/svn-fe/.gitignore\n> deleted file mode 100644\n> index 02a7791585..0000000000\n> --- a/contrib/svn-fe/.gitignore\n> +++ /dev/null\n> @@ -1,4 +0,0 @@\n> -/*.xml\n> -/*.1\n> -/*.html\n> -/svn-fe\n> diff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile\n> deleted file mode 100644\n> index e8651aaf4b..0000000000\n> --- a/contrib/svn-fe/Makefile\n> +++ /dev/null\n> @@ -1,105 +0,0 @@\n> -all:: svn-fe$X\n> -\n> -CC = cc\n> -RM = rm -f\n> -MV = mv\n> -\n> -CFLAGS = -g -O2 -Wall\n> -LDFLAGS =\n> -EXTLIBS = -lz\n> -\n> -include ../../config.mak.uname\n> --include ../../config.mak.autogen\n> --include ../../config.mak\n> -\n> -ifeq ($(uname_S),Darwin)\n> -\tifndef NO_FINK\n> -\t\tifeq ($(shell test -d /sw/lib && echo y),y)\n> -\t\t\tCFLAGS += -I/sw/include\n> -\t\t\tLDFLAGS += -L/sw/lib\n> -\t\tendif\n> -\tendif\n> -\tifndef NO_DARWIN_PORTS\n> -\t\tifeq ($(shell test -d /opt/local/lib && echo y),y)\n> -\t\t\tCFLAGS += -I/opt/local/include\n> -\t\t\tLDFLAGS += -L/opt/local/lib\n> -\t\tendif\n> -\tendif\n> -endif\n> -\n> -ifndef NO_OPENSSL\n> -\tEXTLIBS += -lssl\n> -\tifdef NEEDS_CRYPTO_WITH_SSL\n> -\t\tEXTLIBS += -lcrypto\n> -\tendif\n> -endif\n> -\n> -ifndef NO_PTHREADS\n> -\tCFLAGS += $(PTHREADS_CFLAGS)\n> -\tEXTLIBS += $(PTHREAD_LIBS)\n> -endif\n> -\n> -ifdef HAVE_CLOCK_GETTIME\n> -\tCFLAGS += -DHAVE_CLOCK_GETTIME\n> -\tEXTLIBS += -lrt\n> -endif\n> -\n> -ifdef NEEDS_LIBICONV\n> -\tEXTLIBS += -liconv\n> -endif\n> -\n> -GIT_LIB = ../../libgit.a\n> -VCSSVN_LIB = ../../vcs-svn/lib.a\n> -XDIFF_LIB = ../../xdiff/lib.a\n> -\n> -LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(XDIFF_LIB)\n> -\n> -QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir\n> -QUIET_SUBDIR1 =\n> -\n> -ifneq ($(findstring $(MAKEFLAGS),w),w)\n> -PRINT_DIR = --no-print-directory\n> -else # \"make -w\"\n> -NO_SUBDIR = :\n> -endif\n> -\n> -ifneq ($(findstring $(MAKEFLAGS),s),s)\n> -ifndef V\n> -\tQUIET_CC      = @echo '   ' CC $@;\n> -\tQUIET_LINK    = @echo '   ' LINK $@;\n> -\tQUIET_SUBDIR0 = +@subdir=\n> -\tQUIET_SUBDIR1 = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \\\n> -\t                $(MAKE) $(PRINT_DIR) -C $$subdir\n> -endif\n> -endif\n> -\n> -svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)\n> -\t$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)\n> -\n> -svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h\n> -\t$(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<\n> -\n> -svn-fe.html: svn-fe.txt\n> -\t$(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \\\n> -\t\tMAN_TXT=../contrib/svn-fe/svn-fe.txt \\\n> -\t\t../contrib/svn-fe/$@\n> -\n> -svn-fe.1: svn-fe.txt\n> -\t$(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \\\n> -\t\tMAN_TXT=../contrib/svn-fe/svn-fe.txt \\\n> -\t\t../contrib/svn-fe/$@\n> -\t$(MV) ../../Documentation/svn-fe.1 .\n> -\n> -../../vcs-svn/lib.a: FORCE\n> -\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) vcs-svn/lib.a\n> -\n> -../../xdiff/lib.a: FORCE\n> -\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) xdiff/lib.a\n> -\n> -../../libgit.a: FORCE\n> -\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit.a\n> -\n> -clean:\n> -\t$(RM) svn-fe$X svn-fe.o svn-fe.html svn-fe.xml svn-fe.1\n> -\n> -.PHONY: all clean FORCE\n> diff --git a/contrib/svn-fe/svn-fe.c b/contrib/svn-fe/svn-fe.c\n> deleted file mode 100644\n> index f363505abb..0000000000\n> --- a/contrib/svn-fe/svn-fe.c\n> +++ /dev/null\n> @@ -1,18 +0,0 @@\n> -/*\n> - * This file is in the public domain.\n> - * You may freely use, modify, distribute, and relicense it.\n> - */\n> -\n> -#include <stdlib.h>\n> -#include \"svndump.h\"\n> -\n> -int main(int argc, char **argv)\n> -{\n> -\tif (svndump_init(NULL))\n> -\t\treturn 1;\n> -\tsvndump_read((argc > 1) ? argv[1] : NULL, \"refs/heads/master\",\n> -\t\t\t\"refs/notes/svn/revs\");\n> -\tsvndump_deinit();\n> -\tsvndump_reset();\n> -\treturn 0;\n> -}\n> diff --git a/contrib/svn-fe/svn-fe.txt b/contrib/svn-fe/svn-fe.txt\n> deleted file mode 100644\n> index 19333fc8df..0000000000\n> --- a/contrib/svn-fe/svn-fe.txt\n> +++ /dev/null\n> @@ -1,71 +0,0 @@\n> -svn-fe(1)\n> -=========\n> -\n> -NAME\n> -----\n> -svn-fe - convert an SVN \"dumpfile\" to a fast-import stream\n> -\n> -SYNOPSIS\n> ---------\n> -[verse]\n> -mkfifo backchannel &&\n> -svnadmin dump --deltas REPO |\n> -\tsvn-fe [url] 3<backchannel |\n> -\tgit fast-import --cat-blob-fd=3 3>backchannel\n> -\n> -DESCRIPTION\n> ------------\n> -\n> -Converts a Subversion dumpfile into input suitable for\n> -git-fast-import(1) and similar importers. REPO is a path to a\n> -Subversion repository mirrored on the local disk. Remote Subversion\n> -repositories can be mirrored on local disk using the `svnsync`\n> -command.\n> -\n> -Note: this tool is very young.  The details of its commandline\n> -interface may change in backward incompatible ways.\n> -\n> -INPUT FORMAT\n> -------------\n> -Subversion's repository dump format is documented in full in\n> -`notes/dump-load-format.txt` from the Subversion source tree.\n> -Files in this format can be generated using the 'svnadmin dump' or\n> -'svk admin dump' command.\n> -\n> -OUTPUT FORMAT\n> --------------\n> -The fast-import format is documented by the git-fast-import(1)\n> -manual page.\n> -\n> -NOTES\n> ------\n> -Subversion dumps do not record a separate author and committer for\n> -each revision, nor do they record a separate display name and email\n> -address for each author.  Like git-svn(1), 'svn-fe' will use the name\n> -\n> ----------\n> -user <user@UUID>\n> ----------\n> -\n> -as committer, where 'user' is the value of the `svn:author` property\n> -and 'UUID' the repository's identifier.\n> -\n> -To support incremental imports, 'svn-fe' puts a `git-svn-id` line at\n> -the end of each commit log message if passed a URL on the command\n> -line.  This line has the form `git-svn-id: URL@REVNO UUID`.\n> -\n> -The resulting repository will generally require further processing\n> -to put each project in its own repository and to separate the history\n> -of each branch.  The 'git filter-repo --subdirectory-filter' command\n> -may be useful for this purpose.\n> -\n> -BUGS\n> -----\n> -Empty directories and unknown properties are silently discarded.\n> -\n> -The exit status does not reflect whether an error was detected.\n> -\n> -SEE ALSO\n> ---------\n> -git-svn(1), svn2git(1), svk(1), git-filter-repo(1), git-fast-import(1),\n> -https://svn.apache.org/repos/asf/subversion/trunk/notes/dump-load-format.txt\n> diff --git a/contrib/svn-fe/svnrdump_sim.py b/contrib/svn-fe/svnrdump_sim.py\n> deleted file mode 100755\n> index 8a3cee6175..0000000000\n> --- a/contrib/svn-fe/svnrdump_sim.py\n> +++ /dev/null\n> @@ -1,68 +0,0 @@\n> -#!/usr/bin/env python\n> -\"\"\"\n> -Simulates svnrdump by replaying an existing dump from a file, taking care\n> -of the specified revision range.\n> -To simulate incremental imports the environment variable SVNRMAX can be set\n> -to the highest revision that should be available.\n> -\"\"\"\n> -import sys\n> -import os\n> -\n> -if sys.hexversion < 0x02040000:\n> -    # The limiter is the ValueError() calls. This may be too conservative\n> -    sys.stderr.write(\"svnrdump-sim.py: requires Python 2.4 or later.\\n\")\n> -    sys.exit(1)\n> -\n> -\n> -def getrevlimit():\n> -    var = 'SVNRMAX'\n> -    if var in os.environ:\n> -        return os.environ[var]\n> -    return None\n> -\n> -\n> -def writedump(url, lower, upper):\n> -    if url.startswith('sim://'):\n> -        filename = url[6:]\n> -        if filename[-1] == '/':\n> -            filename = filename[:-1]  # remove terminating slash\n> -    else:\n> -        raise ValueError('sim:// url required')\n> -    f = open(filename, 'r')\n> -    state = 'header'\n> -    wroterev = False\n> -    while(True):\n> -        l = f.readline()\n> -        if l == '':\n> -            break\n> -        if state == 'header' and l.startswith('Revision-number: '):\n> -            state = 'prefix'\n> -        if state == 'prefix' and l == 'Revision-number: %s\\n' % lower:\n> -            state = 'selection'\n> -        if not upper == 'HEAD' and state == 'selection' and \\\n> -                l == 'Revision-number: %s\\n' % upper:\n> -            break\n> -\n> -        if state == 'header' or state == 'selection':\n> -            if state == 'selection':\n> -                wroterev = True\n> -            sys.stdout.write(l)\n> -    return wroterev\n> -\n> -if __name__ == \"__main__\":\n> -    if not (len(sys.argv) in (3, 4, 5)):\n> -        print(\"usage: %s dump URL -rLOWER:UPPER\")\n> -        sys.exit(1)\n> -    if not sys.argv[1] == 'dump':\n> -        raise NotImplementedError('only \"dump\" is supported.')\n> -    url = sys.argv[2]\n> -    r = ('0', 'HEAD')\n> -    if len(sys.argv) == 4 and sys.argv[3][0:2] == '-r':\n> -        r = sys.argv[3][2:].lstrip().split(':')\n> -    if not getrevlimit() is None:\n> -        r[1] = getrevlimit()\n> -    if writedump(url, r[0], r[1]):\n> -        ret = 0\n> -    else:\n> -        ret = 1\n> -    sys.exit(ret)\n> diff --git a/remote-testsvn.c b/remote-testsvn.c\n> deleted file mode 100644\n> index 636b2b62a6..0000000000\n> --- a/remote-testsvn.c\n> +++ /dev/null\n> @@ -1,341 +0,0 @@\n> -#include \"cache.h\"\n> -#include \"refs.h\"\n> -#include \"remote.h\"\n> -#include \"object-store.h\"\n> -#include \"strbuf.h\"\n> -#include \"url.h\"\n> -#include \"exec-cmd.h\"\n> -#include \"run-command.h\"\n> -#include \"vcs-svn/svndump.h\"\n> -#include \"notes.h\"\n> -#include \"strvec.h\"\n> -\n> -static const char *url;\n> -static int dump_from_file;\n> -static const char *private_ref;\n> -static char *remote_ref;\n> -static const char *marksfilename, *notes_ref;\n> -struct rev_note { unsigned int rev_nr; };\n> -\n> -static int cmd_capabilities(const char *line);\n> -static int cmd_import(const char *line);\n> -static int cmd_list(const char *line);\n> -\n> -typedef int (*input_command_handler)(const char *);\n> -struct input_command_entry {\n> -\tconst char *name;\n> -\tinput_command_handler fn;\n> -\tunsigned char batchable;\t/* whether the command starts or is part of a batch */\n> -};\n> -\n> -static const struct input_command_entry input_command_list[] = {\n> -\t{ \"capabilities\", cmd_capabilities, 0 },\n> -\t{ \"import\", cmd_import, 1 },\n> -\t{ \"list\", cmd_list, 0 },\n> -\t{ NULL, NULL }\n> -};\n> -\n> -static int cmd_capabilities(const char *line)\n> -{\n> -\tprintf(\"import\\n\");\n> -\tprintf(\"bidi-import\\n\");\n> -\tprintf(\"refspec %s:%s\\n\\n\", remote_ref, private_ref);\n> -\tfflush(stdout);\n> -\treturn 0;\n> -}\n> -\n> -static void terminate_batch(void)\n> -{\n> -\t/* terminate a current batch's fast-import stream */\n> -\tprintf(\"done\\n\");\n> -\tfflush(stdout);\n> -}\n> -\n> -/* NOTE: 'ref' refers to a git reference, while 'rev' refers to a svn revision. */\n> -static char *read_ref_note(const struct object_id *oid)\n> -{\n> -\tconst struct object_id *note_oid;\n> -\tchar *msg = NULL;\n> -\tunsigned long msglen;\n> -\tenum object_type type;\n> -\n> -\tinit_notes(NULL, notes_ref, NULL, 0);\n> -\tif (!(note_oid = get_note(NULL, oid)))\n> -\t\treturn NULL;\t/* note tree not found */\n> -\tif (!(msg = read_object_file(note_oid, &type, &msglen)))\n> -\t\terror(\"Empty notes tree. %s\", notes_ref);\n> -\telse if (!msglen || type != OBJ_BLOB) {\n> -\t\terror(\"Note contains unusable content. \"\n> -\t\t\t\"Is something else using this notes tree? %s\", notes_ref);\n> -\t\tFREE_AND_NULL(msg);\n> -\t}\n> -\tfree_notes(NULL);\n> -\treturn msg;\n> -}\n> -\n> -static int parse_rev_note(const char *msg, struct rev_note *res)\n> -{\n> -\tconst char *key, *value, *end;\n> -\tsize_t len;\n> -\n> -\twhile (*msg) {\n> -\t\tend = strchrnul(msg, '\\n');\n> -\t\tlen = end - msg;\n> -\n> -\t\tkey = \"Revision-number: \";\n> -\t\tif (starts_with(msg, key)) {\n> -\t\t\tlong i;\n> -\t\t\tchar *end;\n> -\t\t\tvalue = msg + strlen(key);\n> -\t\t\ti = strtol(value, &end, 0);\n> -\t\t\tif (end == value || i < 0 || i > UINT32_MAX)\n> -\t\t\t\treturn -1;\n> -\t\t\tres->rev_nr = i;\n> -\t\t\treturn 0;\n> -\t\t}\n> -\t\tmsg += len + 1;\n> -\t}\n> -\t/* didn't find it */\n> -\treturn -1;\n> -}\n> -\n> -static int note2mark_cb(const struct object_id *object_oid,\n> -\t\tconst struct object_id *note_oid, char *note_path,\n> -\t\tvoid *cb_data)\n> -{\n> -\tFILE *file = (FILE *)cb_data;\n> -\tchar *msg;\n> -\tunsigned long msglen;\n> -\tenum object_type type;\n> -\tstruct rev_note note;\n> -\n> -\tif (!(msg = read_object_file(note_oid, &type, &msglen)) ||\n> -\t\t\t!msglen || type != OBJ_BLOB) {\n> -\t\tfree(msg);\n> -\t\treturn 1;\n> -\t}\n> -\tif (parse_rev_note(msg, &note))\n> -\t\treturn 2;\n> -\tif (fprintf(file, \":%d %s\\n\", note.rev_nr, oid_to_hex(object_oid)) < 1)\n> -\t\treturn 3;\n> -\treturn 0;\n> -}\n> -\n> -static void regenerate_marks(void)\n> -{\n> -\tint ret;\n> -\tFILE *marksfile = xfopen(marksfilename, \"w+\");\n> -\n> -\tret = for_each_note(NULL, 0, note2mark_cb, marksfile);\n> -\tif (ret)\n> -\t\tdie(\"Regeneration of marks failed, returned %d.\", ret);\n> -\tfclose(marksfile);\n> -}\n> -\n> -static void check_or_regenerate_marks(int latestrev)\n> -{\n> -\tFILE *marksfile;\n> -\tstruct strbuf sb = STRBUF_INIT;\n> -\tstruct strbuf line = STRBUF_INIT;\n> -\tint found = 0;\n> -\n> -\tif (latestrev < 1)\n> -\t\treturn;\n> -\n> -\tinit_notes(NULL, notes_ref, NULL, 0);\n> -\tmarksfile = fopen(marksfilename, \"r\");\n> -\tif (!marksfile) {\n> -\t\tregenerate_marks();\n> -\t\tmarksfile = xfopen(marksfilename, \"r\");\n> -\t\tfclose(marksfile);\n> -\t} else {\n> -\t\tstrbuf_addf(&sb, \":%d \", latestrev);\n> -\t\twhile (strbuf_getline_lf(&line, marksfile) != EOF) {\n> -\t\t\tif (starts_with(line.buf, sb.buf)) {\n> -\t\t\t\tfound++;\n> -\t\t\t\tbreak;\n> -\t\t\t}\n> -\t\t}\n> -\t\tfclose(marksfile);\n> -\t\tif (!found)\n> -\t\t\tregenerate_marks();\n> -\t}\n> -\tfree_notes(NULL);\n> -\tstrbuf_release(&sb);\n> -\tstrbuf_release(&line);\n> -}\n> -\n> -static int cmd_import(const char *line)\n> -{\n> -\tint code;\n> -\tint dumpin_fd;\n> -\tchar *note_msg;\n> -\tstruct object_id head_oid;\n> -\tunsigned int startrev;\n> -\tstruct child_process svndump_proc = CHILD_PROCESS_INIT;\n> -\tconst char *command = \"svnrdump\";\n> -\n> -\tif (read_ref(private_ref, &head_oid))\n> -\t\tstartrev = 0;\n> -\telse {\n> -\t\tnote_msg = read_ref_note(&head_oid);\n> -\t\tif(note_msg == NULL) {\n> -\t\t\twarning(\"No note found for %s.\", private_ref);\n> -\t\t\tstartrev = 0;\n> -\t\t} else {\n> -\t\t\tstruct rev_note note = { 0 };\n> -\t\t\tif (parse_rev_note(note_msg, &note))\n> -\t\t\t\tdie(\"Revision number couldn't be parsed from note.\");\n> -\t\t\tstartrev = note.rev_nr + 1;\n> -\t\t\tfree(note_msg);\n> -\t\t}\n> -\t}\n> -\tcheck_or_regenerate_marks(startrev - 1);\n> -\n> -\tif (dump_from_file) {\n> -\t\tdumpin_fd = open(url, O_RDONLY);\n> -\t\tif(dumpin_fd < 0)\n> -\t\t\tdie_errno(\"Couldn't open svn dump file %s.\", url);\n> -\t} else {\n> -\t\tsvndump_proc.out = -1;\n> -\t\tstrvec_push(&svndump_proc.args, command);\n> -\t\tstrvec_push(&svndump_proc.args, \"dump\");\n> -\t\tstrvec_push(&svndump_proc.args, url);\n> -\t\tstrvec_pushf(&svndump_proc.args, \"-r%u:HEAD\", startrev);\n> -\n> -\t\tcode = start_command(&svndump_proc);\n> -\t\tif (code)\n> -\t\t\tdie(\"Unable to start %s, code %d\", command, code);\n> -\t\tdumpin_fd = svndump_proc.out;\n> -\t}\n> -\t/* setup marks file import/export */\n> -\tprintf(\"feature import-marks-if-exists=%s\\n\"\n> -\t\t\t\"feature export-marks=%s\\n\", marksfilename, marksfilename);\n> -\n> -\tsvndump_init_fd(dumpin_fd, STDIN_FILENO);\n> -\tsvndump_read(url, private_ref, notes_ref);\n> -\tsvndump_deinit();\n> -\tsvndump_reset();\n> -\n> -\tclose(dumpin_fd);\n> -\tif (!dump_from_file) {\n> -\t\tcode = finish_command(&svndump_proc);\n> -\t\tif (code)\n> -\t\t\twarning(\"%s, returned %d\", command, code);\n> -\t}\n> -\n> -\treturn 0;\n> -}\n> -\n> -static int cmd_list(const char *line)\n> -{\n> -\tprintf(\"? %s\\n\\n\", remote_ref);\n> -\tfflush(stdout);\n> -\treturn 0;\n> -}\n> -\n> -static int do_command(struct strbuf *line)\n> -{\n> -\tconst struct input_command_entry *p = input_command_list;\n> -\tstatic struct string_list batchlines = STRING_LIST_INIT_DUP;\n> -\tstatic const struct input_command_entry *batch_cmd;\n> -\t/*\n> -\t * commands can be grouped together in a batch.\n> -\t * Batches are ended by \\n. If no batch is active the program ends.\n> -\t * During a batch all lines are buffered and passed to the handler function\n> -\t * when the batch is terminated.\n> -\t */\n> -\tif (line->len == 0) {\n> -\t\tif (batch_cmd) {\n> -\t\t\tstruct string_list_item *item;\n> -\t\t\tfor_each_string_list_item(item, &batchlines)\n> -\t\t\t\tbatch_cmd->fn(item->string);\n> -\t\t\tterminate_batch();\n> -\t\t\tbatch_cmd = NULL;\n> -\t\t\tstring_list_clear(&batchlines, 0);\n> -\t\t\treturn 0;\t/* end of the batch, continue reading other commands. */\n> -\t\t}\n> -\t\treturn 1;\t/* end of command stream, quit */\n> -\t}\n> -\tif (batch_cmd) {\n> -\t\tif (!starts_with(batch_cmd->name, line->buf))\n> -\t\t\tdie(\"Active %s batch interrupted by %s\", batch_cmd->name, line->buf);\n> -\t\t/* buffer batch lines */\n> -\t\tstring_list_append(&batchlines, line->buf);\n> -\t\treturn 0;\n> -\t}\n> -\n> -\tfor (p = input_command_list; p->name; p++) {\n> -\t\tif (starts_with(line->buf, p->name) && (strlen(p->name) == line->len ||\n> -\t\t\t\tline->buf[strlen(p->name)] == ' ')) {\n> -\t\t\tif (p->batchable) {\n> -\t\t\t\tbatch_cmd = p;\n> -\t\t\t\tstring_list_append(&batchlines, line->buf);\n> -\t\t\t\treturn 0;\n> -\t\t\t}\n> -\t\t\treturn p->fn(line->buf);\n> -\t\t}\n> -\t}\n> -\tdie(\"Unknown command '%s'\\n\", line->buf);\n> -\treturn 0;\n> -}\n> -\n> -int cmd_main(int argc, const char **argv)\n> -{\n> -\tstruct strbuf buf = STRBUF_INIT, url_sb = STRBUF_INIT,\n> -\t\t\tprivate_ref_sb = STRBUF_INIT, marksfilename_sb = STRBUF_INIT,\n> -\t\t\tnotes_ref_sb = STRBUF_INIT;\n> -\tstatic struct remote *remote;\n> -\tconst char *url_in, *remote_ref_short;\n> -\n> -\tsetup_git_directory();\n> -\tif (argc < 2 || argc > 3) {\n> -\t\tusage(\"git-remote-svn <remote-name> [<url>]\");\n> -\t\treturn 1;\n> -\t}\n> -\n> -\tremote_ref_short = git_default_branch_name();\n> -\tremote_ref = xstrfmt(\"refs/heads/%s\", remote_ref_short);\n> -\n> -\tremote = remote_get(argv[1]);\n> -\turl_in = (argc == 3) ? argv[2] : remote->url[0];\n> -\n> -\tif (starts_with(url_in, \"file://\")) {\n> -\t\tdump_from_file = 1;\n> -\t\turl = url_decode(url_in + sizeof(\"file://\")-1);\n> -\t} else {\n> -\t\tdump_from_file = 0;\n> -\t\tend_url_with_slash(&url_sb, url_in);\n> -\t\turl = url_sb.buf;\n> -\t}\n> -\n> -\tstrbuf_addf(&private_ref_sb, \"refs/svn/%s/%s\",\n> -\t\t    remote->name, remote_ref_short);\n> -\tprivate_ref = private_ref_sb.buf;\n> -\n> -\tstrbuf_addf(&notes_ref_sb, \"refs/notes/%s/revs\", remote->name);\n> -\tnotes_ref = notes_ref_sb.buf;\n> -\n> -\tstrbuf_addf(&marksfilename_sb, \"%s/info/fast-import/remote-svn/%s.marks\",\n> -\t\tget_git_dir(), remote->name);\n> -\tmarksfilename = marksfilename_sb.buf;\n> -\n> -\twhile (1) {\n> -\t\tif (strbuf_getline_lf(&buf, stdin) == EOF) {\n> -\t\t\tif (ferror(stdin))\n> -\t\t\t\tdie(\"Error reading command stream\");\n> -\t\t\telse\n> -\t\t\t\tdie(\"Unexpected end of command stream\");\n> -\t\t}\n> -\t\tif (do_command(&buf))\n> -\t\t\tbreak;\n> -\t\tstrbuf_reset(&buf);\n> -\t}\n> -\n> -\tstrbuf_release(&buf);\n> -\tstrbuf_release(&url_sb);\n> -\tstrbuf_release(&private_ref_sb);\n> -\tstrbuf_release(&notes_ref_sb);\n> -\tstrbuf_release(&marksfilename_sb);\n> -\treturn 0;\n> -}\n> diff --git a/t/helper/.gitignore b/t/helper/.gitignore\n> index 48c7bb0bbb..8c2ddcce95 100644\n> --- a/t/helper/.gitignore\n> +++ b/t/helper/.gitignore\n> @@ -1,4 +1,2 @@\n>  /test-tool\n>  /test-fake-ssh\n> -/test-line-buffer\n> -/test-svn-fe\n> diff --git a/t/helper/test-line-buffer.c b/t/helper/test-line-buffer.c\n> deleted file mode 100644\n> index 078dd7e29d..0000000000\n> --- a/t/helper/test-line-buffer.c\n> +++ /dev/null\n> @@ -1,81 +0,0 @@\n> -/*\n> - * test-line-buffer.c: code to exercise the svn importer's input helper\n> - */\n> -\n> -#include \"git-compat-util.h\"\n> -#include \"strbuf.h\"\n> -#include \"vcs-svn/line_buffer.h\"\n> -\n> -static uint32_t strtouint32(const char *s)\n> -{\n> -\tchar *end;\n> -\tuintmax_t n = strtoumax(s, &end, 10);\n> -\tif (*s == '\\0' || *end != '\\0')\n> -\t\tdie(\"invalid count: %s\", s);\n> -\treturn (uint32_t) n;\n> -}\n> -\n> -static void handle_command(const char *command, const char *arg, struct line_buffer *buf)\n> -{\n> -\tif (starts_with(command, \"binary \")) {\n> -\t\tstruct strbuf sb = STRBUF_INIT;\n> -\t\tstrbuf_addch(&sb, '>');\n> -\t\tbuffer_read_binary(buf, &sb, strtouint32(arg));\n> -\t\tfwrite(sb.buf, 1, sb.len, stdout);\n> -\t\tstrbuf_release(&sb);\n> -\t} else if (starts_with(command, \"copy \")) {\n> -\t\tbuffer_copy_bytes(buf, strtouint32(arg));\n> -\t} else if (starts_with(command, \"skip \")) {\n> -\t\tbuffer_skip_bytes(buf, strtouint32(arg));\n> -\t} else {\n> -\t\tdie(\"unrecognized command: %s\", command);\n> -\t}\n> -}\n> -\n> -static void handle_line(const char *line, struct line_buffer *stdin_buf)\n> -{\n> -\tconst char *arg = strchr(line, ' ');\n> -\tif (!arg)\n> -\t\tdie(\"no argument in line: %s\", line);\n> -\thandle_command(line, arg + 1, stdin_buf);\n> -}\n> -\n> -int cmd_main(int argc, const char **argv)\n> -{\n> -\tstruct line_buffer stdin_buf = LINE_BUFFER_INIT;\n> -\tstruct line_buffer file_buf = LINE_BUFFER_INIT;\n> -\tstruct line_buffer *input = &stdin_buf;\n> -\tconst char *filename;\n> -\tchar *s;\n> -\n> -\tif (argc == 1)\n> -\t\tfilename = NULL;\n> -\telse if (argc == 2)\n> -\t\tfilename = argv[1];\n> -\telse\n> -\t\tusage(\"test-line-buffer [file | &fd] < script\");\n> -\n> -\tif (buffer_init(&stdin_buf, NULL))\n> -\t\tdie_errno(\"open error\");\n> -\tif (filename) {\n> -\t\tif (*filename == '&') {\n> -\t\t\tif (buffer_fdinit(&file_buf, strtouint32(filename + 1)))\n> -\t\t\t\tdie_errno(\"error opening fd %s\", filename + 1);\n> -\t\t} else {\n> -\t\t\tif (buffer_init(&file_buf, filename))\n> -\t\t\t\tdie_errno(\"error opening %s\", filename);\n> -\t\t}\n> -\t\tinput = &file_buf;\n> -\t}\n> -\n> -\twhile ((s = buffer_read_line(&stdin_buf)))\n> -\t\thandle_line(s, input);\n> -\n> -\tif (filename && buffer_deinit(&file_buf))\n> -\t\tdie(\"error reading from %s\", filename);\n> -\tif (buffer_deinit(&stdin_buf))\n> -\t\tdie(\"input error\");\n> -\tif (ferror(stdout))\n> -\t\tdie(\"output error\");\n> -\treturn 0;\n> -}\n> diff --git a/t/helper/test-svn-fe.c b/t/helper/test-svn-fe.c\n> deleted file mode 100644\n> index 7667c0803f..0000000000\n> --- a/t/helper/test-svn-fe.c\n> +++ /dev/null\n> @@ -1,52 +0,0 @@\n> -/*\n> - * test-svn-fe: Code to exercise the svn import lib\n> - */\n> -\n> -#include \"git-compat-util.h\"\n> -#include \"vcs-svn/svndump.h\"\n> -#include \"vcs-svn/svndiff.h\"\n> -#include \"vcs-svn/sliding_window.h\"\n> -#include \"vcs-svn/line_buffer.h\"\n> -\n> -static const char test_svnfe_usage[] =\n> -\t\"test-svn-fe (<dumpfile> | [-d] <preimage> <delta> <len>)\";\n> -\n> -static int apply_delta(int argc, const char **argv)\n> -{\n> -\tstruct line_buffer preimage = LINE_BUFFER_INIT;\n> -\tstruct line_buffer delta = LINE_BUFFER_INIT;\n> -\tstruct sliding_view preimage_view = SLIDING_VIEW_INIT(&preimage, -1);\n> -\n> -\tif (argc != 5)\n> -\t\tusage(test_svnfe_usage);\n> -\n> -\tif (buffer_init(&preimage, argv[2]))\n> -\t\tdie_errno(\"cannot open preimage\");\n> -\tif (buffer_init(&delta, argv[3]))\n> -\t\tdie_errno(\"cannot open delta\");\n> -\tif (svndiff0_apply(&delta, (off_t) strtoumax(argv[4], NULL, 0),\n> -\t\t\t\t\t&preimage_view, stdout))\n> -\t\treturn 1;\n> -\tif (buffer_deinit(&preimage))\n> -\t\tdie_errno(\"cannot close preimage\");\n> -\tif (buffer_deinit(&delta))\n> -\t\tdie_errno(\"cannot close delta\");\n> -\tstrbuf_release(&preimage_view.buf);\n> -\treturn 0;\n> -}\n> -\n> -int cmd_main(int argc, const char **argv)\n> -{\n> -\tif (argc == 2) {\n> -\t\tif (svndump_init(argv[1]))\n> -\t\t\treturn 1;\n> -\t\tsvndump_read(NULL, \"refs/heads/master\", \"refs/notes/svn/revs\");\n> -\t\tsvndump_deinit();\n> -\t\tsvndump_reset();\n> -\t\treturn 0;\n> -\t}\n> -\n> -\tif (argc >= 2 && !strcmp(argv[1], \"-d\"))\n> -\t\treturn apply_delta(argc, argv);\n> -\tusage(test_svnfe_usage);\n> -}\n> diff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh\n> deleted file mode 100755\n> index ce92e6acad..0000000000\n> --- a/t/t0081-line-buffer.sh\n> +++ /dev/null\n> @@ -1,90 +0,0 @@\n> -#!/bin/sh\n> -\n> -test_description=\"Test the svn importer's input handling routines.\n> -\n> -These tests provide some simple checks that the line_buffer API\n> -behaves as advertised.\n> -\n> -While at it, check that input of newlines and null bytes are handled\n> -correctly.\n> -\"\n> -. ./test-lib.sh\n> -\n> -test_expect_success 'hello world' '\n> -\techo \">HELLO\" >expect &&\n> -\ttest-line-buffer <<-\\EOF >actual &&\n> -\tbinary 6\n> -\tHELLO\n> -\tEOF\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success '0-length read, send along greeting' '\n> -\techo \">HELLO\" >expect &&\n> -\ttest-line-buffer <<-\\EOF >actual &&\n> -\tbinary 0\n> -\tcopy 6\n> -\tHELLO\n> -\tEOF\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success !MINGW 'read from file descriptor' '\n> -\trm -f input &&\n> -\techo hello >expect &&\n> -\techo hello >input &&\n> -\techo copy 6 |\n> -\ttest-line-buffer \"&4\" 4<input >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'skip, copy null byte' '\n> -\techo Q | q_to_nul >expect &&\n> -\tq_to_nul <<-\\EOF | test-line-buffer >actual &&\n> -\tskip 2\n> -\tQ\n> -\tcopy 2\n> -\tQ\n> -\tEOF\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'read null byte' '\n> -\techo \">QhelloQ\" | q_to_nul >expect &&\n> -\tq_to_nul <<-\\EOF | test-line-buffer >actual &&\n> -\tbinary 8\n> -\tQhelloQ\n> -\tEOF\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'long reads are truncated' '\n> -\techo \">foo\" >expect &&\n> -\ttest-line-buffer <<-\\EOF >actual &&\n> -\tbinary 5\n> -\tfoo\n> -\tEOF\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'long copies are truncated' '\n> -\tprintf \"%s\\n\" \">\" foo >expect &&\n> -\ttest-line-buffer <<-\\EOF >actual &&\n> -\tbinary 1\n> -\n> -\tcopy 5\n> -\tfoo\n> -\tEOF\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'long binary reads are truncated' '\n> -\techo \">foo\" >expect &&\n> -\ttest-line-buffer <<-\\EOF >actual &&\n> -\tbinary 5\n> -\tfoo\n> -\tEOF\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_done\n> diff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh\n> deleted file mode 100755\n> index 83f8f5cacb..0000000000\n> --- a/t/t9010-svn-fe.sh\n> +++ /dev/null\n> @@ -1,1105 +0,0 @@\n> -#!/bin/sh\n> -\n> -test_description='check svn dumpfile importer'\n> -\n> -. ./test-lib.sh\n> -\n> -if test_have_prereq !PIPE\n> -then\n> -\tskip_all=\"svn dumpfile importer testing requires the PIPE prerequisite\"\n> -\ttest_done\n> -fi\n> -\n> -reinit_git () {\n> -\trm -fr .git &&\n> -\trm -f stream backflow &&\n> -\tgit init &&\n> -\tmkfifo stream backflow\n> -}\n> -\n> -try_dump () {\n> -\tinput=$1 &&\n> -\tmaybe_fail_svnfe=${2:+test_$2} &&\n> -\tmaybe_fail_fi=${3:+test_$3} &&\n> -\n> -\t{\n> -\t\t$maybe_fail_svnfe test-svn-fe \"$input\" >stream 3<backflow &\n> -\t} &&\n> -\t$maybe_fail_fi git fast-import --cat-blob-fd=3 <stream 3>backflow &&\n> -\twait $!\n> -}\n> -\n> -properties () {\n> -\twhile test \"$#\" -ne 0\n> -\tdo\n> -\t\tproperty=\"$1\" &&\n> -\t\tvalue=\"$2\" &&\n> -\t\tprintf \"%s\\n\" \"K ${#property}\" &&\n> -\t\tprintf \"%s\\n\" \"$property\" &&\n> -\t\tprintf \"%s\\n\" \"V ${#value}\" &&\n> -\t\tprintf \"%s\\n\" \"$value\" &&\n> -\t\tshift 2 ||\n> -\t\treturn 1\n> -\tdone\n> -}\n> -\n> -text_no_props () {\n> -\ttext=\"$1\n> -\" &&\n> -\tprintf \"%s\\n\" \"Prop-content-length: 10\" &&\n> -\tprintf \"%s\\n\" \"Text-content-length: ${#text}\" &&\n> -\tprintf \"%s\\n\" \"Content-length: $((${#text} + 10))\" &&\n> -\tprintf \"%s\\n\" \"\" \"PROPS-END\" &&\n> -\tprintf \"%s\\n\" \"$text\"\n> -}\n> -\n> -test_expect_success 'empty dump' '\n> -\treinit_git &&\n> -\techo \"SVN-fs-dump-format-version: 2\" >input &&\n> -\ttry_dump input\n> -'\n> -\n> -test_expect_success 'v4 dumps not supported' '\n> -\treinit_git &&\n> -\techo \"SVN-fs-dump-format-version: 4\" >v4.dump &&\n> -\ttry_dump v4.dump must_fail\n> -'\n> -\n> -test_expect_failure 'empty revision' '\n> -\treinit_git &&\n> -\tprintf \"rev <nobody, nobody@local>: %s\\n\" \"\" \"\" >expect &&\n> -\tcat >emptyrev.dump <<-\\EOF &&\n> -\tSVN-fs-dump-format-version: 3\n> -\n> -\tRevision-number: 1\n> -\tProp-content-length: 0\n> -\tContent-length: 0\n> -\n> -\tRevision-number: 2\n> -\tProp-content-length: 0\n> -\tContent-length: 0\n> -\n> -\tEOF\n> -\ttry_dump emptyrev.dump &&\n> -\tgit log -p --format=\"rev <%an, %ae>: %s\" HEAD >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'empty properties' '\n> -\treinit_git &&\n> -\tprintf \"rev <nobody, nobody@local>: %s\\n\" \"\" \"\" >expect &&\n> -\tcat >emptyprop.dump <<-\\EOF &&\n> -\tSVN-fs-dump-format-version: 3\n> -\n> -\tRevision-number: 1\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tRevision-number: 2\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\tEOF\n> -\ttry_dump emptyprop.dump &&\n> -\tgit log -p --format=\"rev <%an, %ae>: %s\" HEAD >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'author name and commit message' '\n> -\treinit_git &&\n> -\techo \"<author@example.com, author@example.com@local>\" >expect.author &&\n> -\tcat >message <<-\\EOF &&\n> -\tA concise summary of the change\n> -\n> -\tA detailed description of the change, why it is needed, what\n> -\twas broken and why applying this is the best course of action.\n> -\n> -\t* file.c\n> -\t    Details pertaining to an individual file.\n> -\tEOF\n> -\t{\n> -\t\tproperties \\\n> -\t\t\tsvn:author author@example.com \\\n> -\t\t\tsvn:log \"$(cat message)\" &&\n> -\t\techo PROPS-END\n> -\t} >props &&\n> -\t{\n> -\t\techo \"SVN-fs-dump-format-version: 3\" &&\n> -\t\techo &&\n> -\t\techo \"Revision-number: 1\" &&\n> -\t\techo Prop-content-length: $(wc -c <props) &&\n> -\t\techo Content-length: $(wc -c <props) &&\n> -\t\techo &&\n> -\t\tcat props\n> -\t} >log.dump &&\n> -\ttry_dump log.dump &&\n> -\tgit log -p --format=\"%B\" HEAD >actual.log &&\n> -\tgit log --format=\"<%an, %ae>\" >actual.author &&\n> -\ttest_cmp message actual.log &&\n> -\ttest_cmp expect.author actual.author\n> -'\n> -\n> -test_expect_success 'unsupported properties are ignored' '\n> -\treinit_git &&\n> -\techo author >expect &&\n> -\tcat >extraprop.dump <<-\\EOF &&\n> -\tSVN-fs-dump-format-version: 3\n> -\n> -\tRevision-number: 1\n> -\tProp-content-length: 56\n> -\tContent-length: 56\n> -\n> -\tK 8\n> -\tnonsense\n> -\tV 1\n> -\ty\n> -\tK 10\n> -\tsvn:author\n> -\tV 6\n> -\tauthor\n> -\tPROPS-END\n> -\tEOF\n> -\ttry_dump extraprop.dump &&\n> -\tgit log -p --format=%an HEAD >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_failure 'timestamp and empty file' '\n> -\techo author@example.com >expect.author &&\n> -\techo 1999-01-01 >expect.date &&\n> -\techo file >expect.files &&\n> -\treinit_git &&\n> -\t{\n> -\t\tproperties \\\n> -\t\t\tsvn:author author@example.com \\\n> -\t\t\tsvn:date \"1999-01-01T00:01:002.000000Z\" \\\n> -\t\t\tsvn:log \"add empty file\" &&\n> -\t\techo PROPS-END\n> -\t} >props &&\n> -\t{\n> -\t\tcat <<-EOF &&\n> -\t\tSVN-fs-dump-format-version: 3\n> -\n> -\t\tRevision-number: 1\n> -\t\tEOF\n> -\t\techo Prop-content-length: $(wc -c <props) &&\n> -\t\techo Content-length: $(wc -c <props) &&\n> -\t\techo &&\n> -\t\tcat props &&\n> -\t\tcat <<-\\EOF\n> -\n> -\t\tNode-path: empty-file\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tContent-length: 0\n> -\n> -\t\tEOF\n> -\t} >emptyfile.dump &&\n> -\ttry_dump emptyfile.dump &&\n> -\tgit log --format=%an HEAD >actual.author &&\n> -\tgit log --date=short --format=%ad HEAD >actual.date &&\n> -\tgit ls-tree -r --name-only HEAD >actual.files &&\n> -\ttest_cmp expect.author actual.author &&\n> -\ttest_cmp expect.date actual.date &&\n> -\ttest_cmp expect.files actual.files &&\n> -\tgit checkout HEAD empty-file &&\n> -\ttest_must_be_empty file\n> -'\n> -\n> -test_expect_success 'directory with files' '\n> -\treinit_git &&\n> -\tprintf \"%s\\n\" directory/file1 directory/file2 >expect.files &&\n> -\techo hi >hi &&\n> -\techo hello >hello &&\n> -\t{\n> -\t\tproperties \\\n> -\t\t\tsvn:author author@example.com \\\n> -\t\t\tsvn:date \"1999-02-01T00:01:002.000000Z\" \\\n> -\t\t\tsvn:log \"add directory with some files in it\" &&\n> -\t\techo PROPS-END\n> -\t} >props &&\n> -\t{\n> -\t\tcat <<-EOF &&\n> -\t\tSVN-fs-dump-format-version: 3\n> -\n> -\t\tRevision-number: 1\n> -\t\tEOF\n> -\t\techo Prop-content-length: $(wc -c <props) &&\n> -\t\techo Content-length: $(wc -c <props) &&\n> -\t\techo &&\n> -\t\tcat props &&\n> -\t\tcat <<-\\EOF &&\n> -\n> -\t\tNode-path: directory\n> -\t\tNode-kind: dir\n> -\t\tNode-action: add\n> -\t\tProp-content-length: 10\n> -\t\tContent-length: 10\n> -\n> -\t\tPROPS-END\n> -\n> -\t\tNode-path: directory/file1\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tEOF\n> -\t\ttext_no_props hello &&\n> -\t\tcat <<-\\EOF &&\n> -\t\tNode-path: directory/file2\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tEOF\n> -\t\ttext_no_props hi\n> -\t} >directory.dump &&\n> -\ttry_dump directory.dump &&\n> -\n> -\tgit ls-tree -r --name-only HEAD >actual.files &&\n> -\tgit checkout HEAD directory &&\n> -\ttest_cmp expect.files actual.files &&\n> -\ttest_cmp hello directory/file1 &&\n> -\ttest_cmp hi directory/file2\n> -'\n> -\n> -test_expect_success 'branch name with backslash' '\n> -\treinit_git &&\n> -\tsort <<-\\EOF >expect.branch-files &&\n> -\ttrunk/file1\n> -\ttrunk/file2\n> -\t\"branches/UpdateFOPto094\\\\/file1\"\n> -\t\"branches/UpdateFOPto094\\\\/file2\"\n> -\tEOF\n> -\n> -\techo hi >hi &&\n> -\techo hello >hello &&\n> -\t{\n> -\t\tproperties \\\n> -\t\t\tsvn:author author@example.com \\\n> -\t\t\tsvn:date \"1999-02-02T00:01:02.000000Z\" \\\n> -\t\t\tsvn:log \"add directory with some files in it\" &&\n> -\t\techo PROPS-END\n> -\t} >props.setup &&\n> -\t{\n> -\t\tproperties \\\n> -\t\t\tsvn:author brancher@example.com \\\n> -\t\t\tsvn:date \"2007-12-06T21:38:34.000000Z\" \\\n> -\t\t\tsvn:log \"Updating fop to .94 and adjust fo-stylesheets\" &&\n> -\t\techo PROPS-END\n> -\t} >props.branch &&\n> -\t{\n> -\t\tcat <<-EOF &&\n> -\t\tSVN-fs-dump-format-version: 3\n> -\n> -\t\tRevision-number: 1\n> -\t\tEOF\n> -\t\techo Prop-content-length: $(wc -c <props.setup) &&\n> -\t\techo Content-length: $(wc -c <props.setup) &&\n> -\t\techo &&\n> -\t\tcat props.setup &&\n> -\t\tcat <<-\\EOF &&\n> -\n> -\t\tNode-path: trunk\n> -\t\tNode-kind: dir\n> -\t\tNode-action: add\n> -\t\tProp-content-length: 10\n> -\t\tContent-length: 10\n> -\n> -\t\tPROPS-END\n> -\n> -\t\tNode-path: branches\n> -\t\tNode-kind: dir\n> -\t\tNode-action: add\n> -\t\tProp-content-length: 10\n> -\t\tContent-length: 10\n> -\n> -\t\tPROPS-END\n> -\n> -\t\tNode-path: trunk/file1\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tEOF\n> -\t\ttext_no_props hello &&\n> -\t\tcat <<-\\EOF &&\n> -\t\tNode-path: trunk/file2\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tEOF\n> -\t\ttext_no_props hi &&\n> -\t\tcat <<-\\EOF &&\n> -\n> -\t\tRevision-number: 2\n> -\t\tEOF\n> -\t\techo Prop-content-length: $(wc -c <props.branch) &&\n> -\t\techo Content-length: $(wc -c <props.branch) &&\n> -\t\techo &&\n> -\t\tcat props.branch &&\n> -\t\tcat <<-\\EOF\n> -\n> -\t\tNode-path: branches/UpdateFOPto094\\\n> -\t\tNode-kind: dir\n> -\t\tNode-action: add\n> -\t\tNode-copyfrom-rev: 1\n> -\t\tNode-copyfrom-path: trunk\n> -\n> -\t\tNode-kind: dir\n> -\t\tNode-action: add\n> -\t\tProp-content-length: 34\n> -\t\tContent-length: 34\n> -\n> -\t\tK 13\n> -\t\tsvn:mergeinfo\n> -\t\tV 0\n> -\n> -\t\tPROPS-END\n> -\t\tEOF\n> -\t} >branch.dump &&\n> -\ttry_dump branch.dump &&\n> -\n> -\tgit ls-tree -r --name-only HEAD |\n> -\tsort >actual.branch-files &&\n> -\ttest_cmp expect.branch-files actual.branch-files\n> -'\n> -\n> -test_expect_success 'node without action' '\n> -\treinit_git &&\n> -\tcat >inaction.dump <<-\\EOF &&\n> -\tSVN-fs-dump-format-version: 3\n> -\n> -\tRevision-number: 1\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: directory\n> -\tNode-kind: dir\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\tEOF\n> -\ttry_dump inaction.dump must_fail\n> -'\n> -\n> -test_expect_success 'action: add node without text' '\n> -\treinit_git &&\n> -\tcat >textless.dump <<-\\EOF &&\n> -\tSVN-fs-dump-format-version: 3\n> -\n> -\tRevision-number: 1\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: textless\n> -\tNode-kind: file\n> -\tNode-action: add\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\tEOF\n> -\ttry_dump textless.dump must_fail\n> -'\n> -\n> -test_expect_failure 'change file mode but keep old content' '\n> -\treinit_git &&\n> -\tcat >expect <<-\\EOF &&\n> -\tOBJID\n> -\t:120000 100644 OBJID OBJID T\tgreeting\n> -\tOBJID\n> -\t:100644 120000 OBJID OBJID T\tgreeting\n> -\tOBJID\n> -\t:000000 100644 OBJID OBJID A\tgreeting\n> -\tEOF\n> -\techo \"link hello\" >expect.blob &&\n> -\techo hello >hello &&\n> -\tcat >filemode.dump <<-\\EOF &&\n> -\tSVN-fs-dump-format-version: 3\n> -\n> -\tRevision-number: 1\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: greeting\n> -\tNode-kind: file\n> -\tNode-action: add\n> -\tProp-content-length: 10\n> -\tText-content-length: 11\n> -\tContent-length: 21\n> -\n> -\tPROPS-END\n> -\tlink hello\n> -\n> -\tRevision-number: 2\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: greeting\n> -\tNode-kind: file\n> -\tNode-action: change\n> -\tProp-content-length: 33\n> -\tContent-length: 33\n> -\n> -\tK 11\n> -\tsvn:special\n> -\tV 1\n> -\t*\n> -\tPROPS-END\n> -\n> -\tRevision-number: 3\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: greeting\n> -\tNode-kind: file\n> -\tNode-action: change\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\tEOF\n> -\ttry_dump filemode.dump &&\n> -\t{\n> -\t\tgit rev-list HEAD |\n> -\t\tgit diff-tree --root --stdin |\n> -\t\tsed \"s/$OID_REGEX/OBJID/g\"\n> -\t} >actual &&\n> -\tgit show HEAD:greeting >actual.blob &&\n> -\tgit show HEAD^:greeting >actual.target &&\n> -\ttest_cmp expect actual &&\n> -\ttest_cmp expect.blob actual.blob &&\n> -\ttest_cmp hello actual.target\n> -'\n> -\n> -test_expect_success 'NUL in property value' '\n> -\treinit_git &&\n> -\techo \"commit message\" >expect.message &&\n> -\t{\n> -\t\tproperties \\\n> -\t\t\tunimportant \"something with a NUL (Q)\" \\\n> -\t\t\tsvn:log \"commit message\" &&\n> -\t\techo PROPS-END\n> -\t} |\n> -\tq_to_nul >props &&\n> -\t{\n> -\t\tcat <<-\\EOF &&\n> -\t\tSVN-fs-dump-format-version: 3\n> -\n> -\t\tRevision-number: 1\n> -\t\tEOF\n> -\t\techo Prop-content-length: $(wc -c <props) &&\n> -\t\techo Content-length: $(wc -c <props) &&\n> -\t\techo &&\n> -\t\tcat props\n> -\t} >nulprop.dump &&\n> -\ttry_dump nulprop.dump &&\n> -\tgit diff-tree --always -s --format=%s HEAD >actual.message &&\n> -\ttest_cmp expect.message actual.message\n> -'\n> -\n> -test_expect_success 'NUL in log message, file content, and property name' '\n> -\t# Caveat: svnadmin 1.6.16 (r1073529) truncates at \\0 in the\n> -\t# svn:specialQnotreally example.\n> -\treinit_git &&\n> -\tcat >expect <<-\\EOF &&\n> -\tOBJID\n> -\t:100644 100644 OBJID OBJID M\tgreeting\n> -\tOBJID\n> -\t:000000 100644 OBJID OBJID A\tgreeting\n> -\tEOF\n> -\tprintf \"\\n%s\\n\" \"something with an ASCII NUL (Q)\" >expect.message &&\n> -\tprintf \"%s\\n\" \"helQo\" >expect.hello1 &&\n> -\tprintf \"%s\\n\" \"link hello\" >expect.hello2 &&\n> -\t{\n> -\t\tproperties svn:log \"something with an ASCII NUL (Q)\" &&\n> -\t\techo PROPS-END\n> -\t} |\n> -\tq_to_nul >props &&\n> -\t{\n> -\t\tq_to_nul <<-\\EOF &&\n> -\t\tSVN-fs-dump-format-version: 3\n> -\n> -\t\tRevision-number: 1\n> -\t\tProp-content-length: 10\n> -\t\tContent-length: 10\n> -\n> -\t\tPROPS-END\n> -\n> -\t\tNode-path: greeting\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tProp-content-length: 10\n> -\t\tText-content-length: 6\n> -\t\tContent-length: 16\n> -\n> -\t\tPROPS-END\n> -\t\thelQo\n> -\n> -\t\tRevision-number: 2\n> -\t\tEOF\n> -\t\techo Prop-content-length: $(wc -c <props) &&\n> -\t\techo Content-length: $(wc -c <props) &&\n> -\t\techo &&\n> -\t\tcat props &&\n> -\t\tq_to_nul <<-\\EOF\n> -\n> -\t\tNode-path: greeting\n> -\t\tNode-kind: file\n> -\t\tNode-action: change\n> -\t\tProp-content-length: 43\n> -\t\tText-content-length: 11\n> -\t\tContent-length: 54\n> -\n> -\t\tK 21\n> -\t\tsvn:specialQnotreally\n> -\t\tV 1\n> -\t\t*\n> -\t\tPROPS-END\n> -\t\tlink hello\n> -\t\tEOF\n> -\t} >8bitclean.dump &&\n> -\ttry_dump 8bitclean.dump &&\n> -\t{\n> -\t\tgit rev-list HEAD |\n> -\t\tgit diff-tree --root --stdin |\n> -\t\tsed \"s/$OID_REGEX/OBJID/g\"\n> -\t} >actual &&\n> -\t{\n> -\t\tgit cat-file commit HEAD | nul_to_q &&\n> -\t\techo\n> -\t} |\n> -\tsed -ne \"/^\\$/,\\$ p\" >actual.message &&\n> -\tgit cat-file blob HEAD^:greeting | nul_to_q >actual.hello1 &&\n> -\tgit cat-file blob HEAD:greeting | nul_to_q >actual.hello2 &&\n> -\ttest_cmp expect actual &&\n> -\ttest_cmp expect.message actual.message &&\n> -\ttest_cmp expect.hello1 actual.hello1 &&\n> -\ttest_cmp expect.hello2 actual.hello2\n> -'\n> -\n> -test_expect_success 'change file mode and reiterate content' '\n> -\treinit_git &&\n> -\tcat >expect <<-\\EOF &&\n> -\tOBJID\n> -\t:120000 100644 OBJID OBJID T\tgreeting\n> -\tOBJID\n> -\t:100644 120000 OBJID OBJID T\tgreeting\n> -\tOBJID\n> -\t:000000 100644 OBJID OBJID A\tgreeting\n> -\tEOF\n> -\techo \"link hello\" >expect.blob &&\n> -\techo hello >hello &&\n> -\tcat >filemode2.dump <<-\\EOF &&\n> -\tSVN-fs-dump-format-version: 3\n> -\n> -\tRevision-number: 1\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: greeting\n> -\tNode-kind: file\n> -\tNode-action: add\n> -\tProp-content-length: 10\n> -\tText-content-length: 11\n> -\tContent-length: 21\n> -\n> -\tPROPS-END\n> -\tlink hello\n> -\n> -\tRevision-number: 2\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: greeting\n> -\tNode-kind: file\n> -\tNode-action: change\n> -\tProp-content-length: 33\n> -\tText-content-length: 11\n> -\tContent-length: 44\n> -\n> -\tK 11\n> -\tsvn:special\n> -\tV 1\n> -\t*\n> -\tPROPS-END\n> -\tlink hello\n> -\n> -\tRevision-number: 3\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: greeting\n> -\tNode-kind: file\n> -\tNode-action: change\n> -\tProp-content-length: 10\n> -\tText-content-length: 11\n> -\tContent-length: 21\n> -\n> -\tPROPS-END\n> -\tlink hello\n> -\tEOF\n> -\ttry_dump filemode2.dump &&\n> -\t{\n> -\t\tgit rev-list HEAD |\n> -\t\tgit diff-tree --root --stdin |\n> -\t\tsed \"s/$OID_REGEX/OBJID/g\"\n> -\t} >actual &&\n> -\tgit show HEAD:greeting >actual.blob &&\n> -\tgit show HEAD^:greeting >actual.target &&\n> -\ttest_cmp expect actual &&\n> -\ttest_cmp expect.blob actual.blob &&\n> -\ttest_cmp hello actual.target\n> -'\n> -\n> -test_expect_success 'deltas supported' '\n> -\treinit_git &&\n> -\t{\n> -\t\t# (old) h + (inline) ello + (old) \\n\n> -\t\tprintf \"SVNQ%b%b%s\" \"Q\\003\\006\\005\\004\" \"\\001Q\\0204\\001\\002\" \"ello\" |\n> -\t\tq_to_nul\n> -\t} >delta &&\n> -\t{\n> -\t\tproperties \\\n> -\t\t\tsvn:author author@example.com \\\n> -\t\t\tsvn:date \"1999-01-05T00:01:002.000000Z\" \\\n> -\t\t\tsvn:log \"add greeting\" &&\n> -\t\techo PROPS-END\n> -\t} >props &&\n> -\t{\n> -\t\tproperties \\\n> -\t\t\tsvn:author author@example.com \\\n> -\t\t\tsvn:date \"1999-01-06T00:01:002.000000Z\" \\\n> -\t\t\tsvn:log \"change it\" &&\n> -\t\techo PROPS-END\n> -\t} >props2 &&\n> -\t{\n> -\t\techo SVN-fs-dump-format-version: 3 &&\n> -\t\techo &&\n> -\t\techo Revision-number: 1 &&\n> -\t\techo Prop-content-length: $(wc -c <props) &&\n> -\t\techo Content-length: $(wc -c <props) &&\n> -\t\techo &&\n> -\t\tcat props &&\n> -\t\tcat <<-\\EOF &&\n> -\n> -\t\tNode-path: hello\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tProp-content-length: 10\n> -\t\tText-content-length: 3\n> -\t\tContent-length: 13\n> -\n> -\t\tPROPS-END\n> -\t\thi\n> -\n> -\t\tEOF\n> -\t\techo Revision-number: 2 &&\n> -\t\techo Prop-content-length: $(wc -c <props2) &&\n> -\t\techo Content-length: $(wc -c <props2) &&\n> -\t\techo &&\n> -\t\tcat props2 &&\n> -\t\tcat <<-\\EOF &&\n> -\n> -\t\tNode-path: hello\n> -\t\tNode-kind: file\n> -\t\tNode-action: change\n> -\t\tText-delta: true\n> -\t\tProp-content-length: 10\n> -\t\tEOF\n> -\t\techo Text-content-length: $(wc -c <delta) &&\n> -\t\techo Content-length: $((10 + $(wc -c <delta))) &&\n> -\t\techo &&\n> -\t\techo PROPS-END &&\n> -\t\tcat delta\n> -\t} >delta.dump &&\n> -\ttry_dump delta.dump\n> -'\n> -\n> -test_expect_success 'property deltas supported' '\n> -\treinit_git &&\n> -\tcat >expect <<-\\EOF &&\n> -\tOBJID\n> -\t:100755 100644 OBJID OBJID M\tscript.sh\n> -\tEOF\n> -\t{\n> -\t\tproperties \\\n> -\t\t\tsvn:author author@example.com \\\n> -\t\t\tsvn:date \"1999-03-06T00:01:002.000000Z\" \\\n> -\t\t\tsvn:log \"make an executable, or chmod -x it\" &&\n> -\t\techo PROPS-END\n> -\t} >revprops &&\n> -\t{\n> -\t\techo SVN-fs-dump-format-version: 3 &&\n> -\t\techo &&\n> -\t\techo Revision-number: 1 &&\n> -\t\techo Prop-content-length: $(wc -c <revprops) &&\n> -\t\techo Content-length: $(wc -c <revprops) &&\n> -\t\techo &&\n> -\t\tcat revprops &&\n> -\t\techo &&\n> -\t\tcat <<-\\EOF &&\n> -\t\tNode-path: script.sh\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tText-content-length: 0\n> -\t\tProp-content-length: 39\n> -\t\tContent-length: 39\n> -\n> -\t\tK 14\n> -\t\tsvn:executable\n> -\t\tV 4\n> -\t\ttrue\n> -\t\tPROPS-END\n> -\n> -\t\tEOF\n> -\t\techo Revision-number: 2 &&\n> -\t\techo Prop-content-length: $(wc -c <revprops) &&\n> -\t\techo Content-length: $(wc -c <revprops) &&\n> -\t\techo &&\n> -\t\tcat revprops &&\n> -\t\techo &&\n> -\t\tcat <<-\\EOF\n> -\t\tNode-path: script.sh\n> -\t\tNode-kind: file\n> -\t\tNode-action: change\n> -\t\tProp-delta: true\n> -\t\tProp-content-length: 30\n> -\t\tContent-length: 30\n> -\n> -\t\tD 14\n> -\t\tsvn:executable\n> -\t\tPROPS-END\n> -\t\tEOF\n> -\t} >propdelta.dump &&\n> -\ttry_dump propdelta.dump &&\n> -\t{\n> -\t\tgit rev-list HEAD |\n> -\t\tgit diff-tree --stdin |\n> -\t\tsed \"s/$OID_REGEX/OBJID/g\"\n> -\t} >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'properties on /' '\n> -\treinit_git &&\n> -\tcat <<-\\EOF >expect &&\n> -\tOBJID\n> -\tOBJID\n> -\t:000000 100644 OBJID OBJID A\tgreeting\n> -\tEOF\n> -\tsed -e \"s/X$//\" <<-\\EOF >changeroot.dump &&\n> -\tSVN-fs-dump-format-version: 3\n> -\n> -\tRevision-number: 1\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: greeting\n> -\tNode-kind: file\n> -\tNode-action: add\n> -\tText-content-length: 0\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tRevision-number: 2\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: X\n> -\tNode-kind: dir\n> -\tNode-action: change\n> -\tProp-delta: true\n> -\tProp-content-length: 43\n> -\tContent-length: 43\n> -\n> -\tK 10\n> -\tsvn:ignore\n> -\tV 11\n> -\tbuild-area\n> -\n> -\tPROPS-END\n> -\tEOF\n> -\ttry_dump changeroot.dump &&\n> -\t{\n> -\t\tgit rev-list HEAD |\n> -\t\tgit diff-tree --root --always --stdin |\n> -\t\tsed \"s/$OID_REGEX/OBJID/g\"\n> -\t} >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'deltas for typechange' '\n> -\treinit_git &&\n> -\tcat >expect <<-\\EOF &&\n> -\tOBJID\n> -\t:120000 100644 OBJID OBJID T\ttest-file\n> -\tOBJID\n> -\t:100755 120000 OBJID OBJID T\ttest-file\n> -\tOBJID\n> -\t:000000 100755 OBJID OBJID A\ttest-file\n> -\tEOF\n> -\tcat >deleteprop.dump <<-\\EOF &&\n> -\tSVN-fs-dump-format-version: 3\n> -\n> -\tRevision-number: 1\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: test-file\n> -\tNode-kind: file\n> -\tNode-action: add\n> -\tProp-delta: true\n> -\tProp-content-length: 35\n> -\tText-content-length: 17\n> -\tContent-length: 52\n> -\n> -\tK 14\n> -\tsvn:executable\n> -\tV 0\n> -\n> -\tPROPS-END\n> -\tlink testing 123\n> -\n> -\tRevision-number: 2\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: test-file\n> -\tNode-kind: file\n> -\tNode-action: change\n> -\tProp-delta: true\n> -\tProp-content-length: 53\n> -\tText-content-length: 17\n> -\tContent-length: 70\n> -\n> -\tK 11\n> -\tsvn:special\n> -\tV 1\n> -\t*\n> -\tD 14\n> -\tsvn:executable\n> -\tPROPS-END\n> -\tlink testing 231\n> -\n> -\tRevision-number: 3\n> -\tProp-content-length: 10\n> -\tContent-length: 10\n> -\n> -\tPROPS-END\n> -\n> -\tNode-path: test-file\n> -\tNode-kind: file\n> -\tNode-action: change\n> -\tProp-delta: true\n> -\tProp-content-length: 27\n> -\tText-content-length: 17\n> -\tContent-length: 44\n> -\n> -\tD 11\n> -\tsvn:special\n> -\tPROPS-END\n> -\tlink testing 321\n> -\tEOF\n> -\ttry_dump deleteprop.dump &&\n> -\t{\n> -\t\tgit rev-list HEAD |\n> -\t\tgit diff-tree --root --stdin |\n> -\t\tsed \"s/$OID_REGEX/OBJID/g\"\n> -\t} >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'deltas need not consume the whole preimage' '\n> -\treinit_git &&\n> -\tcat >expect <<-\\EOF &&\n> -\tOBJID\n> -\t:120000 100644 OBJID OBJID T\tpostimage\n> -\tOBJID\n> -\t:100644 120000 OBJID OBJID T\tpostimage\n> -\tOBJID\n> -\t:000000 100644 OBJID OBJID A\tpostimage\n> -\tEOF\n> -\techo \"first preimage\" >expect.1 &&\n> -\tprintf target >expect.2 &&\n> -\tprintf lnk >expect.3 &&\n> -\t{\n> -\t\tprintf \"SVNQ%b%b%b\" \"QQ\\017\\001\\017\" \"\\0217\" \"first preimage\\n\" |\n> -\t\tq_to_nul\n> -\t} >delta.1 &&\n> -\t{\n> -\t\tproperties svn:special \"*\" &&\n> -\t\techo PROPS-END\n> -\t} >symlink.props &&\n> -\t{\n> -\t\tprintf \"SVNQ%b%b%b\" \"Q\\002\\013\\004\\012\" \"\\0201\\001\\001\\0211\" \"lnk target\" |\n> -\t\tq_to_nul\n> -\t} >delta.2 &&\n> -\t{\n> -\t\tprintf \"SVNQ%b%b\" \"Q\\004\\003\\004Q\" \"\\001Q\\002\\002\" |\n> -\t\tq_to_nul\n> -\t} >delta.3 &&\n> -\t{\n> -\t\tcat <<-\\EOF &&\n> -\t\tSVN-fs-dump-format-version: 3\n> -\n> -\t\tRevision-number: 1\n> -\t\tProp-content-length: 10\n> -\t\tContent-length: 10\n> -\n> -\t\tPROPS-END\n> -\n> -\t\tNode-path: postimage\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tText-delta: true\n> -\t\tProp-content-length: 10\n> -\t\tEOF\n> -\t\techo Text-content-length: $(wc -c <delta.1) &&\n> -\t\techo Content-length: $((10 + $(wc -c <delta.1))) &&\n> -\t\techo &&\n> -\t\techo PROPS-END &&\n> -\t\tcat delta.1 &&\n> -\t\tcat <<-\\EOF &&\n> -\n> -\t\tRevision-number: 2\n> -\t\tProp-content-length: 10\n> -\t\tContent-length: 10\n> -\n> -\t\tPROPS-END\n> -\n> -\t\tNode-path: postimage\n> -\t\tNode-kind: file\n> -\t\tNode-action: change\n> -\t\tText-delta: true\n> -\t\tEOF\n> -\t\techo Prop-content-length: $(wc -c <symlink.props) &&\n> -\t\techo Text-content-length: $(wc -c <delta.2) &&\n> -\t\techo Content-length: $(($(wc -c <symlink.props) + $(wc -c <delta.2))) &&\n> -\t\techo &&\n> -\t\tcat symlink.props &&\n> -\t\tcat delta.2 &&\n> -\t\tcat <<-\\EOF &&\n> -\n> -\t\tRevision-number: 3\n> -\t\tProp-content-length: 10\n> -\t\tContent-length: 10\n> -\n> -\t\tPROPS-END\n> -\n> -\t\tNode-path: postimage\n> -\t\tNode-kind: file\n> -\t\tNode-action: change\n> -\t\tText-delta: true\n> -\t\tProp-content-length: 10\n> -\t\tEOF\n> -\t\techo Text-content-length: $(wc -c <delta.3) &&\n> -\t\techo Content-length: $((10 + $(wc -c <delta.3))) &&\n> -\t\techo &&\n> -\t\techo PROPS-END &&\n> -\t\tcat delta.3 &&\n> -\t\techo\n> -\t} >deltapartial.dump &&\n> -\ttry_dump deltapartial.dump &&\n> -\t{\n> -\t\tgit rev-list HEAD |\n> -\t\tgit diff-tree --root --stdin |\n> -\t\tsed \"s/$OID_REGEX/OBJID/g\"\n> -\t} >actual &&\n> -\ttest_cmp expect actual &&\n> -\tgit show HEAD:postimage >actual.3 &&\n> -\tgit show HEAD^:postimage >actual.2 &&\n> -\tgit show HEAD^^:postimage >actual.1 &&\n> -\ttest_cmp expect.1 actual.1 &&\n> -\ttest_cmp expect.2 actual.2 &&\n> -\ttest_cmp expect.3 actual.3\n> -'\n> -\n> -test_expect_success 'no hang for delta trying to read past end of preimage' '\n> -\treinit_git &&\n> -\t{\n> -\t\t# COPY 1\n> -\t\tprintf \"SVNQ%b%b\" \"Q\\001\\001\\002Q\" \"\\001Q\" |\n> -\t\tq_to_nul\n> -\t} >greedy.delta &&\n> -\t{\n> -\t\tcat <<-\\EOF &&\n> -\t\tSVN-fs-dump-format-version: 3\n> -\n> -\t\tRevision-number: 1\n> -\t\tProp-content-length: 10\n> -\t\tContent-length: 10\n> -\n> -\t\tPROPS-END\n> -\n> -\t\tNode-path: bootstrap\n> -\t\tNode-kind: file\n> -\t\tNode-action: add\n> -\t\tText-delta: true\n> -\t\tProp-content-length: 10\n> -\t\tEOF\n> -\t\techo Text-content-length: $(wc -c <greedy.delta) &&\n> -\t\techo Content-length: $((10 + $(wc -c <greedy.delta))) &&\n> -\t\techo &&\n> -\t\techo PROPS-END &&\n> -\t\tcat greedy.delta &&\n> -\t\techo\n> -\t} >greedydelta.dump &&\n> -\ttry_dump greedydelta.dump must_fail might_fail\n> -'\n> -\n> -test_expect_success 'set up svn repo' '\n> -\tsvnconf=$PWD/svnconf &&\n> -\tmkdir -p \"$svnconf\" &&\n> -\n> -\tif\n> -\t\tsvnadmin -h >/dev/null 2>&1 &&\n> -\t\tsvnadmin create simple-svn &&\n> -\t\tsvnadmin load simple-svn <\"$TEST_DIRECTORY/t9135/svn.dump\" &&\n> -\t\tsvn export --config-dir \"$svnconf\" \"file://$PWD/simple-svn\" simple-svnco\n> -\tthen\n> -\t\ttest_set_prereq SVNREPO\n> -\tfi\n> -'\n> -\n> -test_expect_success SVNREPO 't9135/svn.dump' '\n> -\tmkdir -p simple-git &&\n> -\t(\n> -\t\tcd simple-git &&\n> -\t\treinit_git &&\n> -\t\ttry_dump \"$TEST_DIRECTORY/t9135/svn.dump\"\n> -\t) &&\n> -\t(\n> -\t\tcd simple-svnco &&\n> -\t\tgit init &&\n> -\t\tgit add . &&\n> -\t\tgit fetch ../simple-git master &&\n> -\t\tgit diff --exit-code FETCH_HEAD\n> -\t)\n> -'\n> -\n> -test_done\n> diff --git a/t/t9011-svn-da.sh b/t/t9011-svn-da.sh\n> deleted file mode 100755\n> index ab1ef28fd9..0000000000\n> --- a/t/t9011-svn-da.sh\n> +++ /dev/null\n> @@ -1,248 +0,0 @@\n> -#!/bin/sh\n> -\n> -test_description='test parsing of svndiff0 files\n> -\n> -Using the \"test-svn-fe -d\" helper, check that svn-fe correctly\n> -interprets deltas using various facilities (some from the spec,\n> -some only learned from practice).\n> -'\n> -. ./test-lib.sh\n> -\n> ->empty\n> -printf foo >preimage\n> -\n> -test_expect_success 'reject empty delta' '\n> -\ttest_must_fail test-svn-fe -d preimage empty 0\n> -'\n> -\n> -test_expect_success 'delta can empty file' '\n> -\tprintf \"SVNQ\" | q_to_nul >clear.delta &&\n> -\ttest-svn-fe -d preimage clear.delta 4 >actual &&\n> -\ttest_must_be_empty actual\n> -'\n> -\n> -test_expect_success 'reject svndiff2' '\n> -\tprintf \"SVN\\002\" >bad.filetype &&\n> -\ttest_must_fail test-svn-fe -d preimage bad.filetype 4\n> -'\n> -\n> -test_expect_success 'one-window empty delta' '\n> -\tprintf \"SVNQ%s\" \"QQQQQ\" | q_to_nul >clear.onewindow &&\n> -\ttest-svn-fe -d preimage clear.onewindow 9 >actual &&\n> -\ttest_must_be_empty actual\n> -'\n> -\n> -test_expect_success 'reject incomplete window header' '\n> -\tprintf \"SVNQ%s\" \"QQQQQ\" | q_to_nul >clear.onewindow &&\n> -\tprintf \"SVNQ%s\" \"QQ\" | q_to_nul >clear.partialwindow &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.onewindow 6 &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.partialwindow 6\n> -'\n> -\n> -test_expect_success 'reject declared delta longer than actual delta' '\n> -\tprintf \"SVNQ%s\" \"QQQQQ\" | q_to_nul >clear.onewindow &&\n> -\tprintf \"SVNQ%s\" \"QQ\" | q_to_nul >clear.partialwindow &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.onewindow 14 &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.partialwindow 9\n> -'\n> -\n> -test_expect_success 'two-window empty delta' '\n> -\tprintf \"SVNQ%s%s\" \"QQQQQ\" \"QQQQQ\" | q_to_nul >clear.twowindow &&\n> -\ttest-svn-fe -d preimage clear.twowindow 14 >actual &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.twowindow 13 &&\n> -\ttest_must_be_empty actual\n> -'\n> -\n> -test_expect_success 'noisy zeroes' '\n> -\tprintf \"SVNQ%s\" \\\n> -\t\t\"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRQQQQQ\" |\n> -\t\ttr R \"\\200\" |\n> -\t\tq_to_nul >clear.noisy &&\n> -\tlen=$(wc -c <clear.noisy) &&\n> -\ttest-svn-fe -d preimage clear.noisy $len &&\n> -\ttest_must_be_empty actual\n> -'\n> -\n> -test_expect_success 'reject variable-length int in magic' '\n> -\tprintf \"SVNRQ\" | tr R \"\\200\" | q_to_nul >clear.badmagic &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.badmagic 5\n> -'\n> -\n> -test_expect_success 'reject truncated integer' '\n> -\tprintf \"SVNQ%s%s\" \"QQQQQ\" \"QQQQRRQ\" |\n> -\t\ttr R \"\\200\" |\n> -\t\tq_to_nul >clear.fullint &&\n> -\tprintf \"SVNQ%s%s\" \"QQQQQ\" \"QQQQRR\" |\n> -\t\ttr RT \"\\201\" |\n> -\t\tq_to_nul >clear.partialint &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.fullint 15 &&\n> -\ttest-svn-fe -d preimage clear.fullint 16 &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.partialint 15\n> -'\n> -\n> -test_expect_success 'nonempty (but unused) preimage view' '\n> -\tprintf \"SVNQ%b\" \"Q\\003QQQ\" | q_to_nul >clear.readpreimage &&\n> -\ttest-svn-fe -d preimage clear.readpreimage 9 >actual &&\n> -\ttest_must_be_empty actual\n> -'\n> -\n> -test_expect_success 'preimage view: right endpoint cannot backtrack' '\n> -\tprintf \"SVNQ%b%b\" \"Q\\003QQQ\" \"Q\\002QQQ\" |\n> -\t\tq_to_nul >clear.backtrack &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.backtrack 14\n> -'\n> -\n> -test_expect_success 'preimage view: left endpoint can advance' '\n> -\tprintf \"SVNQ%b%b\" \"Q\\003QQQ\" \"\\001\\002QQQ\" |\n> -\t\tq_to_nul >clear.preshrink &&\n> -\tprintf \"SVNQ%b%b\" \"Q\\003QQQ\" \"\\001\\001QQQ\" |\n> -\t\tq_to_nul >clear.shrinkbacktrack &&\n> -\ttest-svn-fe -d preimage clear.preshrink 14 >actual &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.shrinkbacktrack 14 &&\n> -\ttest_must_be_empty actual\n> -'\n> -\n> -test_expect_success 'preimage view: offsets compared by value' '\n> -\tprintf \"SVNQ%b%b\" \"\\001\\001QQQ\" \"\\0200Q\\003QQQ\" |\n> -\t\tq_to_nul >clear.noisybacktrack &&\n> -\tprintf \"SVNQ%b%b\" \"\\001\\001QQQ\" \"\\0200\\001\\002QQQ\" |\n> -\t\tq_to_nul >clear.noisyadvance &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.noisybacktrack 15 &&\n> -\ttest-svn-fe -d preimage clear.noisyadvance 15 &&\n> -\ttest_must_be_empty actual\n> -'\n> -\n> -test_expect_success 'preimage view: reject truncated preimage' '\n> -\tprintf \"SVNQ%b\" \"\\010QQQQ\" | q_to_nul >clear.lateemptyread &&\n> -\tprintf \"SVNQ%b\" \"\\010\\001QQQ\" | q_to_nul >clear.latenonemptyread &&\n> -\tprintf \"SVNQ%b\" \"\\001\\010QQQ\" | q_to_nul >clear.longread &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.lateemptyread 9 &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.latenonemptyread 9 &&\n> -\ttest_must_fail test-svn-fe -d preimage clear.longread 9\n> -'\n> -\n> -test_expect_success 'forbid unconsumed inline data' '\n> -\tprintf \"SVNQ%b%s%b%s\" \"QQQQ\\003\" \"bar\" \"QQQQ\\001\" \"x\" |\n> -\t\tq_to_nul >inline.clear &&\n> -\ttest_must_fail test-svn-fe -d preimage inline.clear 18 >actual\n> -'\n> -\n> -test_expect_success 'reject truncated inline data' '\n> -\tprintf \"SVNQ%b%s\" \"QQQQ\\003\" \"b\" | q_to_nul >inline.trunc &&\n> -\ttest_must_fail test-svn-fe -d preimage inline.trunc 10\n> -'\n> -\n> -test_expect_success 'reject truncated inline data (after instruction section)' '\n> -\tprintf \"SVNQ%b%b%s\" \"QQ\\001\\001\\003\" \"\\0201\" \"b\" | q_to_nul >insn.trunc &&\n> -\ttest_must_fail test-svn-fe -d preimage insn.trunc 11\n> -'\n> -\n> -test_expect_success 'copyfrom_data' '\n> -\techo hi >expect &&\n> -\tprintf \"SVNQ%b%b%b\" \"QQ\\003\\001\\003\" \"\\0203\" \"hi\\n\" | q_to_nul >copydat &&\n> -\ttest-svn-fe -d preimage copydat 13 >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'multiple copyfrom_data' '\n> -\techo hi >expect &&\n> -\tprintf \"SVNQ%b%b%b%b%b\" \"QQ\\003\\002\\003\" \"\\0201\\0202\" \"hi\\n\" \\\n> -\t\t\"QQQ\\002Q\" \"\\0200Q\" | q_to_nul >copy.multi &&\n> -\tlen=$(wc -c <copy.multi) &&\n> -\ttest-svn-fe -d preimage copy.multi $len >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'incomplete multiple insn' '\n> -\tprintf \"SVNQ%b%b%b\" \"QQ\\003\\002\\003\" \"\\0203\\0200\" \"hi\\n\" |\n> -\t\tq_to_nul >copy.partial &&\n> -\tlen=$(wc -c <copy.partial) &&\n> -\ttest_must_fail test-svn-fe -d preimage copy.partial $len\n> -'\n> -\n> -test_expect_success 'catch attempt to copy missing data' '\n> -\tprintf \"SVNQ%b%b%s%b%s\" \"QQ\\002\\002\\001\" \"\\0201\\0201\" \"X\" \\\n> -\t\t\t\"QQQQ\\002\" \"YZ\" |\n> -\t\tq_to_nul >copy.incomplete &&\n> -\tlen=$(wc -c <copy.incomplete) &&\n> -\ttest_must_fail test-svn-fe -d preimage copy.incomplete $len\n> -'\n> -\n> -test_expect_success 'copyfrom target to repeat data' '\n> -\tprintf foofoo >expect &&\n> -\tprintf \"SVNQ%b%b%s\" \"QQ\\006\\004\\003\" \"\\0203\\0100\\003Q\" \"foo\" |\n> -\t\tq_to_nul >copytarget.repeat &&\n> -\tlen=$(wc -c <copytarget.repeat) &&\n> -\ttest-svn-fe -d preimage copytarget.repeat $len >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'copyfrom target out of order' '\n> -\tprintf foooof >expect &&\n> -\tprintf \"SVNQ%b%b%s\" \\\n> -\t\t\"QQ\\006\\007\\003\" \"\\0203\\0101\\002\\0101\\001\\0101Q\" \"foo\" |\n> -\t\tq_to_nul >copytarget.reverse &&\n> -\tlen=$(wc -c <copytarget.reverse) &&\n> -\ttest-svn-fe -d preimage copytarget.reverse $len >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'catch copyfrom future' '\n> -\tprintf \"SVNQ%b%b%s\" \"QQ\\004\\004\\003\" \"\\0202\\0101\\002\\0201\" \"XYZ\" |\n> -\t\tq_to_nul >copytarget.infuture &&\n> -\tlen=$(wc -c <copytarget.infuture) &&\n> -\ttest_must_fail test-svn-fe -d preimage copytarget.infuture $len\n> -'\n> -\n> -test_expect_success 'copy to sustain' '\n> -\tprintf XYXYXYXYXYXZ >expect &&\n> -\tprintf \"SVNQ%b%b%s\" \"QQ\\014\\004\\003\" \"\\0202\\0111Q\\0201\" \"XYZ\" |\n> -\t\tq_to_nul >copytarget.sustain &&\n> -\tlen=$(wc -c <copytarget.sustain) &&\n> -\ttest-svn-fe -d preimage copytarget.sustain $len >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'catch copy that overflows' '\n> -\tprintf \"SVNQ%b%b%s\" \"QQ\\003\\003\\001\" \"\\0201\\0177Q\" X |\n> -\t\tq_to_nul >copytarget.overflow &&\n> -\tlen=$(wc -c <copytarget.overflow) &&\n> -\ttest_must_fail test-svn-fe -d preimage copytarget.overflow $len\n> -'\n> -\n> -test_expect_success 'copyfrom source' '\n> -\tprintf foo >expect &&\n> -\tprintf \"SVNQ%b%b\" \"Q\\003\\003\\002Q\" \"\\003Q\" | q_to_nul >copysource.all &&\n> -\ttest-svn-fe -d preimage copysource.all 11 >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'copy backwards' '\n> -\tprintf oof >expect &&\n> -\tprintf \"SVNQ%b%b\" \"Q\\003\\003\\006Q\" \"\\001\\002\\001\\001\\001Q\" |\n> -\t\tq_to_nul >copysource.rev &&\n> -\ttest-svn-fe -d preimage copysource.rev 15 >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'offsets are relative to window' '\n> -\tprintf fo >expect &&\n> -\tprintf \"SVNQ%b%b%b%b\" \"Q\\003\\001\\002Q\" \"\\001Q\" \\\n> -\t\t\"\\002\\001\\001\\002Q\" \"\\001Q\" |\n> -\t\tq_to_nul >copysource.two &&\n> -\ttest-svn-fe -d preimage copysource.two 18 >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_expect_success 'example from notes/svndiff' '\n> -\tprintf aaaaccccdddddddd >expect &&\n> -\tprintf aaaabbbbcccc >source &&\n> -\tprintf \"SVNQ%b%b%s\" \"Q\\014\\020\\007\\001\" \\\n> -\t\t\"\\004Q\\004\\010\\0201\\0107\\010\" d |\n> -\t\tq_to_nul >delta.example &&\n> -\tlen=$(wc -c <delta.example) &&\n> -\ttest-svn-fe -d source delta.example $len >actual &&\n> -\ttest_cmp expect actual\n> -'\n> -\n> -test_done\n> diff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh\n> deleted file mode 100755\n> index 754c4a3284..0000000000\n> --- a/t/t9020-remote-svn.sh\n> +++ /dev/null\n> @@ -1,95 +0,0 @@\n> -#!/bin/sh\n> -\n> -test_description='tests remote-svn'\n> -\n> -. ./test-lib.sh\n> -\n> -MARKSPATH=.git/info/fast-import/remote-svn\n> -\n> -if ! test_have_prereq PYTHON\n> -then\n> -\tskip_all='skipping remote-svn tests, python not available'\n> -\ttest_done\n> -fi\n> -\n> -# Override svnrdump with our simulator\n> -PATH=\"$HOME:$PATH\"\n> -export PATH PYTHON_PATH GIT_BUILD_DIR\n> -\n> -write_script \"$HOME/svnrdump\" <<\\EOF\n> -exec \"$PYTHON_PATH\" \"$GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py\" \"$@\"\n> -EOF\n> -\n> -init_git () {\n> -\trm -fr .git &&\n> -\tgit init &&\n> -\t#git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump\n> -\t# let's reuse an existing dump file!?\n> -\tgit remote add svnsim \"testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump\"\n> -\tgit remote add svnfile \"testsvn::file://$TEST_DIRECTORY/t9154/svn.dump\"\n> -}\n> -\n> -if test -e \"$GIT_BUILD_DIR/git-remote-testsvn\"\n> -then\n> -\ttest_set_prereq REMOTE_SVN\n> -fi\n> -\n> -test_debug '\n> -\tgit --version\n> -\ttype git\n> -\ttype svnrdump\n> -'\n> -\n> -test_expect_success REMOTE_SVN 'simple fetch' '\n> -\tinit_git &&\n> -\tgit fetch svnsim &&\n> -\ttest_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master  &&\n> -\tcp .git/refs/remotes/svnsim/master master.good\n> -'\n> -\n> -test_debug '\n> -\tgit show-ref -s refs/svn/svnsim/master\n> -\tgit show-ref -s refs/remotes/svnsim/master\n> -'\n> -\n> -test_expect_success REMOTE_SVN 'repeated fetch, nothing shall change' '\n> -\tgit fetch svnsim &&\n> -\ttest_cmp master.good .git/refs/remotes/svnsim/master\n> -'\n> -\n> -test_expect_success REMOTE_SVN 'fetch from a file:// url gives the same result' '\n> -\tgit fetch svnfile\n> -'\n> -\n> -test_expect_failure REMOTE_SVN 'the sha1 differ because the git-svn-id line in the commit msg contains the url' '\n> -\ttest_cmp .git/refs/remotes/svnfile/master .git/refs/remotes/svnsim/master\n> -'\n> -\n> -test_expect_success REMOTE_SVN 'mark-file regeneration' '\n> -\t# filter out any other marks, that can not be regenerated. Only up to 3 digit revisions are allowed here\n> -\tgrep \":[0-9]\\{1,3\\} \" $MARKSPATH/svnsim.marks > $MARKSPATH/svnsim.marks.old &&\n> -\trm $MARKSPATH/svnsim.marks &&\n> -\tgit fetch svnsim &&\n> -\ttest_cmp $MARKSPATH/svnsim.marks.old $MARKSPATH/svnsim.marks\n> -'\n> -\n> -test_expect_success REMOTE_SVN 'incremental imports must lead to the same head' '\n> -\tSVNRMAX=3 &&\n> -\texport SVNRMAX &&\n> -\tinit_git &&\n> -\tgit fetch svnsim &&\n> -\ttest_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master  &&\n> -\tunset SVNRMAX &&\n> -\tgit fetch svnsim &&\n> -\ttest_cmp master.good .git/refs/remotes/svnsim/master\n> -'\n> -\n> -test_expect_success REMOTE_SVN 'respects configured default initial branch' '\n> -\tgit -c init.defaultBranch=trunk remote add -f trunk \\\n> -\t\t\"testsvn::file://$TEST_DIRECTORY/t9154/svn.dump\" &&\n> -\tgit rev-parse --verify refs/remotes/trunk/trunk\n> -'\n> -\n> -test_debug 'git branch -a'\n> -\n> -test_done\n> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\n> index 596c549cdd..6d9ea1bb67 100644\n> --- a/t/test-lib-functions.sh\n> +++ b/t/test-lib-functions.sh\n> @@ -820,7 +820,7 @@ test_must_fail_acceptable () {\n>  \tfi\n>\n>  \tcase \"$1\" in\n> -\tgit|__git*|test-tool|test-svn-fe|test_terminal)\n> +\tgit|__git*|test-tool|test_terminal)\n>  \t\treturn 0\n>  \t\t;;\n>  \t*)\n> diff --git a/vcs-svn/LICENSE b/vcs-svn/LICENSE\n> deleted file mode 100644\n> index eb91858b82..0000000000\n> --- a/vcs-svn/LICENSE\n> +++ /dev/null\n> @@ -1,32 +0,0 @@\n> -Copyright (C) 2010 David Barr <david.barr@cordelta.com>.\n> -All rights reserved.\n> -\n> -Copyright (C) 2010 Jonathan Nieder <jrnieder@gmail.com>.\n> -\n> -Copyright (C) 2005 Stefan Hegny, hydrografix Consulting GmbH,\n> -Frankfurt/Main, Germany\n> -and others, see http://svn2cc.sarovar.org\n> -\n> -Redistribution and use in source and binary forms, with or without\n> -modification, are permitted provided that the following conditions\n> -are met:\n> -1. Redistributions of source code must retain the above copyright\n> -   notice(s), this list of conditions and the following disclaimer\n> -   unmodified other than the allowable addition of one or more\n> -   copyright notices.\n> -2. Redistributions in binary form must reproduce the above copyright\n> -   notice(s), this list of conditions and the following disclaimer in\n> -   the documentation and/or other materials provided with the\n> -   distribution.\n> -\n> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY\n> -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n> -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n> -PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE\n> -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n> -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n> -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n> -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n> -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n> -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n> -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n> diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c\n> deleted file mode 100644\n> index b5b8913cb0..0000000000\n> --- a/vcs-svn/fast_export.c\n> +++ /dev/null\n> @@ -1,365 +0,0 @@\n> -/*\n> - * Licensed under a two-clause BSD-style license.\n> - * See LICENSE for details.\n> - */\n> -\n> -#include \"cache.h\"\n> -#include \"quote.h\"\n> -#include \"fast_export.h\"\n> -#include \"strbuf.h\"\n> -#include \"svndiff.h\"\n> -#include \"sliding_window.h\"\n> -#include \"line_buffer.h\"\n> -\n> -#define MAX_GITSVN_LINE_LEN 4096\n> -\n> -static uint32_t first_commit_done;\n> -static struct line_buffer postimage = LINE_BUFFER_INIT;\n> -static struct line_buffer report_buffer = LINE_BUFFER_INIT;\n> -\n> -/* NEEDSWORK: move to fast_export_init() */\n> -static int init_postimage(void)\n> -{\n> -\tstatic int postimage_initialized;\n> -\tif (postimage_initialized)\n> -\t\treturn 0;\n> -\tpostimage_initialized = 1;\n> -\treturn buffer_tmpfile_init(&postimage);\n> -}\n> -\n> -void fast_export_init(int fd)\n> -{\n> -\tfirst_commit_done = 0;\n> -\tif (buffer_fdinit(&report_buffer, fd))\n> -\t\tdie_errno(\"cannot read from file descriptor %d\", fd);\n> -}\n> -\n> -void fast_export_deinit(void)\n> -{\n> -\tif (buffer_deinit(&report_buffer))\n> -\t\tdie_errno(\"error closing fast-import feedback stream\");\n> -}\n> -\n> -void fast_export_delete(const char *path)\n> -{\n> -\tputchar('D');\n> -\tputchar(' ');\n> -\tquote_c_style(path, NULL, stdout, 0);\n> -\tputchar('\\n');\n> -}\n> -\n> -static void fast_export_truncate(const char *path, uint32_t mode)\n> -{\n> -\tfast_export_modify(path, mode, \"inline\");\n> -\tprintf(\"data 0\\n\\n\");\n> -}\n> -\n> -void fast_export_modify(const char *path, uint32_t mode, const char *dataref)\n> -{\n> -\t/* Mode must be 100644, 100755, 120000, or 160000. */\n> -\tif (!dataref) {\n> -\t\tfast_export_truncate(path, mode);\n> -\t\treturn;\n> -\t}\n> -\tprintf(\"M %06\"PRIo32\" %s \", mode, dataref);\n> -\tquote_c_style(path, NULL, stdout, 0);\n> -\tputchar('\\n');\n> -}\n> -\n> -void fast_export_begin_note(uint32_t revision, const char *author,\n> -\t\tconst char *log, timestamp_t timestamp, const char *note_ref)\n> -{\n> -\tstatic int firstnote = 1;\n> -\tsize_t loglen = strlen(log);\n> -\tprintf(\"commit %s\\n\", note_ref);\n> -\tprintf(\"committer %s <%s@%s> %\"PRItime\" +0000\\n\", author, author, \"local\", timestamp);\n> -\tprintf(\"data %\"PRIuMAX\"\\n\", (uintmax_t)loglen);\n> -\tfwrite(log, loglen, 1, stdout);\n> -\tif (firstnote) {\n> -\t\tif (revision > 1)\n> -\t\t\tprintf(\"from %s^0\", note_ref);\n> -\t\tfirstnote = 0;\n> -\t}\n> -\tfputc('\\n', stdout);\n> -}\n> -\n> -void fast_export_note(const char *committish, const char *dataref)\n> -{\n> -\tprintf(\"N %s %s\\n\", dataref, committish);\n> -}\n> -\n> -static char gitsvnline[MAX_GITSVN_LINE_LEN];\n> -void fast_export_begin_commit(uint32_t revision, const char *author,\n> -\t\t\tconst struct strbuf *log,\n> -\t\t\tconst char *uuid, const char *url,\n> -\t\t\ttimestamp_t timestamp, const char *local_ref)\n> -{\n> -\tstatic const struct strbuf empty = STRBUF_INIT;\n> -\tif (!log)\n> -\t\tlog = &empty;\n> -\tif (*uuid && *url) {\n> -\t\tsnprintf(gitsvnline, MAX_GITSVN_LINE_LEN,\n> -\t\t\t\t\"\\n\\ngit-svn-id: %s@%\"PRIu32\" %s\\n\",\n> -\t\t\t\t url, revision, uuid);\n> -\t} else {\n> -\t\t*gitsvnline = '\\0';\n> -\t}\n> -\tprintf(\"commit %s\\n\", local_ref);\n> -\tprintf(\"mark :%\"PRIu32\"\\n\", revision);\n> -\tprintf(\"committer %s <%s@%s> %\"PRItime\" +0000\\n\",\n> -\t\t   *author ? author : \"nobody\",\n> -\t\t   *author ? author : \"nobody\",\n> -\t\t   *uuid ? uuid : \"local\", timestamp);\n> -\tprintf(\"data %\"PRIuMAX\"\\n\",\n> -\t\t(uintmax_t) (log->len + strlen(gitsvnline)));\n> -\tfwrite(log->buf, log->len, 1, stdout);\n> -\tprintf(\"%s\\n\", gitsvnline);\n> -\tif (!first_commit_done) {\n> -\t\tif (revision > 1)\n> -\t\t\tprintf(\"from :%\"PRIu32\"\\n\", revision - 1);\n> -\t\tfirst_commit_done = 1;\n> -\t}\n> -}\n> -\n> -void fast_export_end_commit(uint32_t revision)\n> -{\n> -\tprintf(\"progress Imported commit %\"PRIu32\".\\n\\n\", revision);\n> -}\n> -\n> -static void ls_from_rev(uint32_t rev, const char *path)\n> -{\n> -\t/* ls :5 path/to/old/file */\n> -\tprintf(\"ls :%\"PRIu32\" \", rev);\n> -\tquote_c_style(path, NULL, stdout, 0);\n> -\tputchar('\\n');\n> -\tfflush(stdout);\n> -}\n> -\n> -static void ls_from_active_commit(const char *path)\n> -{\n> -\t/* ls \"path/to/file\" */\n> -\tprintf(\"ls \\\"\");\n> -\tquote_c_style(path, NULL, stdout, 1);\n> -\tprintf(\"\\\"\\n\");\n> -\tfflush(stdout);\n> -}\n> -\n> -static const char *get_response_line(void)\n> -{\n> -\tconst char *line = buffer_read_line(&report_buffer);\n> -\tif (line)\n> -\t\treturn line;\n> -\tif (buffer_ferror(&report_buffer))\n> -\t\tdie_errno(\"error reading from fast-import\");\n> -\tdie(\"unexpected end of fast-import feedback\");\n> -}\n> -\n> -static void die_short_read(struct line_buffer *input)\n> -{\n> -\tif (buffer_ferror(input))\n> -\t\tdie_errno(\"error reading dump file\");\n> -\tdie(\"invalid dump: unexpected end of file\");\n> -}\n> -\n> -static int parse_cat_response_line(const char *header, off_t *len)\n> -{\n> -\tuintmax_t n;\n> -\tconst char *type;\n> -\tconst char *end;\n> -\n> -\tif (ends_with(header, \" missing\"))\n> -\t\treturn error(\"cat-blob reports missing blob: %s\", header);\n> -\ttype = strstr(header, \" blob \");\n> -\tif (!type)\n> -\t\treturn error(\"cat-blob header has wrong object type: %s\", header);\n> -\tn = strtoumax(type + strlen(\" blob \"), (char **) &end, 10);\n> -\tif (end == type + strlen(\" blob \"))\n> -\t\treturn error(\"cat-blob header does not contain length: %s\", header);\n> -\tif (memchr(type + strlen(\" blob \"), '-', end - type - strlen(\" blob \")))\n> -\t\treturn error(\"cat-blob header contains negative length: %s\", header);\n> -\tif (n == UINTMAX_MAX || n > maximum_signed_value_of_type(off_t))\n> -\t\treturn error(\"blob too large for current definition of off_t\");\n> -\t*len = n;\n> -\tif (*end)\n> -\t\treturn error(\"cat-blob header contains garbage after length: %s\", header);\n> -\treturn 0;\n> -}\n> -\n> -static void check_preimage_overflow(off_t a, off_t b)\n> -{\n> -\tif (signed_add_overflows(a, b))\n> -\t\tdie(\"blob too large for current definition of off_t\");\n> -}\n> -\n> -static long apply_delta(off_t len, struct line_buffer *input,\n> -\t\t\tconst char *old_data, uint32_t old_mode)\n> -{\n> -\tlong ret;\n> -\tstruct sliding_view preimage = SLIDING_VIEW_INIT(&report_buffer, 0);\n> -\tFILE *out;\n> -\n> -\tif (init_postimage() || !(out = buffer_tmpfile_rewind(&postimage)))\n> -\t\tdie(\"cannot open temporary file for blob retrieval\");\n> -\tif (old_data) {\n> -\t\tconst char *response;\n> -\t\tprintf(\"cat-blob %s\\n\", old_data);\n> -\t\tfflush(stdout);\n> -\t\tresponse = get_response_line();\n> -\t\tif (parse_cat_response_line(response, &preimage.max_off))\n> -\t\t\tdie(\"invalid cat-blob response: %s\", response);\n> -\t\tcheck_preimage_overflow(preimage.max_off, 1);\n> -\t}\n> -\tif (old_mode == S_IFLNK) {\n> -\t\tstrbuf_addstr(&preimage.buf, \"link \");\n> -\t\tcheck_preimage_overflow(preimage.max_off, strlen(\"link \"));\n> -\t\tpreimage.max_off += strlen(\"link \");\n> -\t\tcheck_preimage_overflow(preimage.max_off, 1);\n> -\t}\n> -\tif (svndiff0_apply(input, len, &preimage, out))\n> -\t\tdie(\"cannot apply delta\");\n> -\tif (old_data) {\n> -\t\t/* Read the remainder of preimage and trailing newline. */\n> -\t\tassert(!signed_add_overflows(preimage.max_off, 1));\n> -\t\tpreimage.max_off++;\t/* room for newline */\n> -\t\tif (move_window(&preimage, preimage.max_off - 1, 1))\n> -\t\t\tdie(\"cannot seek to end of input\");\n> -\t\tif (preimage.buf.buf[0] != '\\n')\n> -\t\t\tdie(\"missing newline after cat-blob response\");\n> -\t}\n> -\tret = buffer_tmpfile_prepare_to_read(&postimage);\n> -\tif (ret < 0)\n> -\t\tdie(\"cannot read temporary file for blob retrieval\");\n> -\tstrbuf_release(&preimage.buf);\n> -\treturn ret;\n> -}\n> -\n> -void fast_export_buf_to_data(const struct strbuf *data)\n> -{\n> -\tprintf(\"data %\"PRIuMAX\"\\n\", (uintmax_t)data->len);\n> -\tfwrite(data->buf, data->len, 1, stdout);\n> -\tfputc('\\n', stdout);\n> -}\n> -\n> -void fast_export_data(uint32_t mode, off_t len, struct line_buffer *input)\n> -{\n> -\tassert(len >= 0);\n> -\tif (mode == S_IFLNK) {\n> -\t\t/* svn symlink blobs start with \"link \" */\n> -\t\tif (len < 5)\n> -\t\t\tdie(\"invalid dump: symlink too short for \\\"link\\\" prefix\");\n> -\t\tlen -= 5;\n> -\t\tif (buffer_skip_bytes(input, 5) != 5)\n> -\t\t\tdie_short_read(input);\n> -\t}\n> -\tprintf(\"data %\"PRIuMAX\"\\n\", (uintmax_t) len);\n> -\tif (buffer_copy_bytes(input, len) != len)\n> -\t\tdie_short_read(input);\n> -\tfputc('\\n', stdout);\n> -}\n> -\n> -static int parse_ls_response(const char *response, uint32_t *mode,\n> -\t\t\t\t\tstruct strbuf *dataref)\n> -{\n> -\tconst char *tab;\n> -\tconst char *response_end;\n> -\n> -\tassert(response);\n> -\tresponse_end = response + strlen(response);\n> -\n> -\tif (*response == 'm') {\t/* Missing. */\n> -\t\terrno = ENOENT;\n> -\t\treturn -1;\n> -\t}\n> -\n> -\t/* Mode. */\n> -\tif (response_end - response < (signed) strlen(\"100644\") ||\n> -\t    response[strlen(\"100644\")] != ' ')\n> -\t\tdie(\"invalid ls response: missing mode: %s\", response);\n> -\t*mode = 0;\n> -\tfor (; *response != ' '; response++) {\n> -\t\tchar ch = *response;\n> -\t\tif (ch < '0' || ch > '7')\n> -\t\t\tdie(\"invalid ls response: mode is not octal: %s\", response);\n> -\t\t*mode *= 8;\n> -\t\t*mode += ch - '0';\n> -\t}\n> -\n> -\t/* ' blob ' or ' tree ' */\n> -\tif (response_end - response < (signed) strlen(\" blob \") ||\n> -\t    (response[1] != 'b' && response[1] != 't'))\n> -\t\tdie(\"unexpected ls response: not a tree or blob: %s\", response);\n> -\tresponse += strlen(\" blob \");\n> -\n> -\t/* Dataref. */\n> -\ttab = memchr(response, '\\t', response_end - response);\n> -\tif (!tab)\n> -\t\tdie(\"invalid ls response: missing tab: %s\", response);\n> -\tstrbuf_add(dataref, response, tab - response);\n> -\treturn 0;\n> -}\n> -\n> -int fast_export_ls_rev(uint32_t rev, const char *path,\n> -\t\t\t\tuint32_t *mode, struct strbuf *dataref)\n> -{\n> -\tls_from_rev(rev, path);\n> -\treturn parse_ls_response(get_response_line(), mode, dataref);\n> -}\n> -\n> -int fast_export_ls(const char *path, uint32_t *mode, struct strbuf *dataref)\n> -{\n> -\tls_from_active_commit(path);\n> -\treturn parse_ls_response(get_response_line(), mode, dataref);\n> -}\n> -\n> -const char *fast_export_read_path(const char *path, uint32_t *mode_out)\n> -{\n> -\tint err;\n> -\tstatic struct strbuf buf = STRBUF_INIT;\n> -\n> -\tstrbuf_reset(&buf);\n> -\terr = fast_export_ls(path, mode_out, &buf);\n> -\tif (err) {\n> -\t\tif (errno != ENOENT)\n> -\t\t\tBUG(\"unexpected fast_export_ls error: %s\",\n> -\t\t\t    strerror(errno));\n> -\t\t/* Treat missing paths as directories. */\n> -\t\t*mode_out = S_IFDIR;\n> -\t\treturn NULL;\n> -\t}\n> -\treturn buf.buf;\n> -}\n> -\n> -void fast_export_copy(uint32_t revision, const char *src, const char *dst)\n> -{\n> -\tint err;\n> -\tuint32_t mode;\n> -\tstatic struct strbuf data = STRBUF_INIT;\n> -\n> -\tstrbuf_reset(&data);\n> -\terr = fast_export_ls_rev(revision, src, &mode, &data);\n> -\tif (err) {\n> -\t\tif (errno != ENOENT)\n> -\t\t\tBUG(\"unexpected fast_export_ls_rev error: %s\",\n> -\t\t\t    strerror(errno));\n> -\t\tfast_export_delete(dst);\n> -\t\treturn;\n> -\t}\n> -\tfast_export_modify(dst, mode, data.buf);\n> -}\n> -\n> -void fast_export_blob_delta(uint32_t mode,\n> -\t\t\t\tuint32_t old_mode, const char *old_data,\n> -\t\t\t\toff_t len, struct line_buffer *input)\n> -{\n> -\tlong postimage_len;\n> -\n> -\tassert(len >= 0);\n> -\tpostimage_len = apply_delta(len, input, old_data, old_mode);\n> -\tif (mode == S_IFLNK) {\n> -\t\tbuffer_skip_bytes(&postimage, strlen(\"link \"));\n> -\t\tpostimage_len -= strlen(\"link \");\n> -\t}\n> -\tprintf(\"data %ld\\n\", postimage_len);\n> -\tbuffer_copy_bytes(&postimage, postimage_len);\n> -\tfputc('\\n', stdout);\n> -}\n> diff --git a/vcs-svn/line_buffer.c b/vcs-svn/line_buffer.c\n> deleted file mode 100644\n> index e416caf8a4..0000000000\n> --- a/vcs-svn/line_buffer.c\n> +++ /dev/null\n> @@ -1,126 +0,0 @@\n> -/*\n> - * Licensed under a two-clause BSD-style license.\n> - * See LICENSE for details.\n> - */\n> -\n> -#include \"git-compat-util.h\"\n> -#include \"line_buffer.h\"\n> -#include \"strbuf.h\"\n> -\n> -#define COPY_BUFFER_LEN 4096\n> -\n> -int buffer_init(struct line_buffer *buf, const char *filename)\n> -{\n> -\tbuf->infile = filename ? fopen(filename, \"r\") : stdin;\n> -\tif (!buf->infile)\n> -\t\treturn -1;\n> -\treturn 0;\n> -}\n> -\n> -int buffer_fdinit(struct line_buffer *buf, int fd)\n> -{\n> -\tbuf->infile = fdopen(fd, \"r\");\n> -\tif (!buf->infile)\n> -\t\treturn -1;\n> -\treturn 0;\n> -}\n> -\n> -int buffer_tmpfile_init(struct line_buffer *buf)\n> -{\n> -\tbuf->infile = tmpfile();\n> -\tif (!buf->infile)\n> -\t\treturn -1;\n> -\treturn 0;\n> -}\n> -\n> -int buffer_deinit(struct line_buffer *buf)\n> -{\n> -\tint err;\n> -\tif (buf->infile == stdin)\n> -\t\treturn ferror(buf->infile);\n> -\terr = ferror(buf->infile);\n> -\terr |= fclose(buf->infile);\n> -\treturn err;\n> -}\n> -\n> -FILE *buffer_tmpfile_rewind(struct line_buffer *buf)\n> -{\n> -\trewind(buf->infile);\n> -\treturn buf->infile;\n> -}\n> -\n> -long buffer_tmpfile_prepare_to_read(struct line_buffer *buf)\n> -{\n> -\tlong pos = ftell(buf->infile);\n> -\tif (pos < 0)\n> -\t\treturn error_errno(\"ftell error\");\n> -\tif (fseek(buf->infile, 0, SEEK_SET))\n> -\t\treturn error_errno(\"seek error\");\n> -\treturn pos;\n> -}\n> -\n> -int buffer_ferror(struct line_buffer *buf)\n> -{\n> -\treturn ferror(buf->infile);\n> -}\n> -\n> -int buffer_read_char(struct line_buffer *buf)\n> -{\n> -\treturn fgetc(buf->infile);\n> -}\n> -\n> -/* Read a line without trailing newline. */\n> -char *buffer_read_line(struct line_buffer *buf)\n> -{\n> -\tchar *end;\n> -\tif (!fgets(buf->line_buffer, sizeof(buf->line_buffer), buf->infile))\n> -\t\t/* Error or data exhausted. */\n> -\t\treturn NULL;\n> -\tend = buf->line_buffer + strlen(buf->line_buffer);\n> -\tif (end[-1] == '\\n')\n> -\t\tend[-1] = '\\0';\n> -\telse if (feof(buf->infile))\n> -\t\t; /* No newline at end of file.  That's fine. */\n> -\telse\n> -\t\t/*\n> -\t\t * Line was too long.\n> -\t\t * There is probably a saner way to deal with this,\n> -\t\t * but for now let's return an error.\n> -\t\t */\n> -\t\treturn NULL;\n> -\treturn buf->line_buffer;\n> -}\n> -\n> -size_t buffer_read_binary(struct line_buffer *buf,\n> -\t\t\t\tstruct strbuf *sb, size_t size)\n> -{\n> -\treturn strbuf_fread(sb, size, buf->infile);\n> -}\n> -\n> -off_t buffer_copy_bytes(struct line_buffer *buf, off_t nbytes)\n> -{\n> -\tchar byte_buffer[COPY_BUFFER_LEN];\n> -\toff_t done = 0;\n> -\twhile (done < nbytes && !feof(buf->infile) && !ferror(buf->infile)) {\n> -\t\toff_t len = nbytes - done;\n> -\t\tsize_t in = len < COPY_BUFFER_LEN ? len : COPY_BUFFER_LEN;\n> -\t\tin = fread(byte_buffer, 1, in, buf->infile);\n> -\t\tdone += in;\n> -\t\tfwrite(byte_buffer, 1, in, stdout);\n> -\t\tif (ferror(stdout))\n> -\t\t\treturn done + buffer_skip_bytes(buf, nbytes - done);\n> -\t}\n> -\treturn done;\n> -}\n> -\n> -off_t buffer_skip_bytes(struct line_buffer *buf, off_t nbytes)\n> -{\n> -\tchar byte_buffer[COPY_BUFFER_LEN];\n> -\toff_t done = 0;\n> -\twhile (done < nbytes && !feof(buf->infile) && !ferror(buf->infile)) {\n> -\t\toff_t len = nbytes - done;\n> -\t\tsize_t in = len < COPY_BUFFER_LEN ? len : COPY_BUFFER_LEN;\n> -\t\tdone += fread(byte_buffer, 1, in, buf->infile);\n> -\t}\n> -\treturn done;\n> -}\n> diff --git a/vcs-svn/line_buffer.txt b/vcs-svn/line_buffer.txt\n> deleted file mode 100644\n> index 8e139eb22d..0000000000\n> --- a/vcs-svn/line_buffer.txt\n> +++ /dev/null\n> @@ -1,77 +0,0 @@\n> -line_buffer API\n> -===============\n> -\n> -The line_buffer library provides a convenient interface for\n> -mostly-line-oriented input.\n> -\n> -Each line is not permitted to exceed 10000 bytes.  The provided\n> -functions are not thread-safe or async-signal-safe, and like\n> -`fgets()`, they generally do not function correctly if interrupted\n> -by a signal without SA_RESTART set.\n> -\n> -Calling sequence\n> -----------------\n> -\n> -The calling program:\n> -\n> - - initializes a `struct line_buffer` to LINE_BUFFER_INIT\n> - - specifies a file to read with `buffer_init`\n> - - processes input with `buffer_read_line`, `buffer_skip_bytes`,\n> -   and `buffer_copy_bytes`\n> - - closes the file with `buffer_deinit`, perhaps to start over and\n> -   read another file.\n> -\n> -When finished, the caller can use `buffer_reset` to deallocate\n> -resources.\n> -\n> -Using temporary files\n> ----------------------\n> -\n> -Temporary files provide a place to store data that should not outlive\n> -the calling program.  A program\n> -\n> - - initializes a `struct line_buffer` to LINE_BUFFER_INIT\n> - - requests a temporary file with `buffer_tmpfile_init`\n> - - acquires an output handle by calling `buffer_tmpfile_rewind`\n> - - uses standard I/O functions like `fprintf` and `fwrite` to fill\n> -   the temporary file\n> - - declares writing is over with `buffer_tmpfile_prepare_to_read`\n> - - can re-read what was written with `buffer_read_line`,\n> -   `buffer_copy_bytes`, and so on\n> - - can reuse the temporary file by calling `buffer_tmpfile_rewind`\n> -   again\n> - - removes the temporary file with `buffer_deinit`, perhaps to\n> -   reuse the line_buffer for some other file.\n> -\n> -When finished, the calling program can use `buffer_reset` to deallocate\n> -resources.\n> -\n> -Functions\n> ----------\n> -\n> -`buffer_init`, `buffer_fdinit`::\n> -\tOpen the named file or file descriptor for input.\n> -\tbuffer_init(buf, NULL) prepares to read from stdin.\n> -\tOn failure, returns -1 (with errno indicating the nature\n> -\tof the failure).\n> -\n> -`buffer_deinit`::\n> -\tStop reading from the current file (closing it unless\n> -\tit was stdin).  Returns nonzero if `fclose` fails or\n> -\tthe error indicator was set.\n> -\n> -`buffer_read_line`::\n> -\tRead a line and strip off the trailing newline.\n> -\tOn failure or end of file, returns NULL.\n> -\n> -`buffer_copy_bytes`::\n> -\tRead `len` bytes of input and dump them to the standard output\n> -\tstream.  Returns early for error or end of file.\n> -\n> -`buffer_skip_bytes`::\n> -\tDiscards `len` bytes from the input stream (stopping early\n> -\tif necessary because of an error or eof).  Return value is\n> -\tthe number of bytes successfully read.\n> -\n> -`buffer_reset`::\n> -\tDeallocates non-static buffers.\n> diff --git a/vcs-svn/sliding_window.c b/vcs-svn/sliding_window.c\n> deleted file mode 100644\n> index 06d273c9e8..0000000000\n> --- a/vcs-svn/sliding_window.c\n> +++ /dev/null\n> @@ -1,79 +0,0 @@\n> -/*\n> - * Licensed under a two-clause BSD-style license.\n> - * See LICENSE for details.\n> - */\n> -\n> -#include \"git-compat-util.h\"\n> -#include \"sliding_window.h\"\n> -#include \"line_buffer.h\"\n> -#include \"strbuf.h\"\n> -\n> -static int input_error(struct line_buffer *file)\n> -{\n> -\tif (!buffer_ferror(file))\n> -\t\treturn error(\"delta preimage ends early\");\n> -\treturn error_errno(\"cannot read delta preimage\");\n> -}\n> -\n> -static int skip_or_whine(struct line_buffer *file, off_t gap)\n> -{\n> -\tif (buffer_skip_bytes(file, gap) != gap)\n> -\t\treturn input_error(file);\n> -\treturn 0;\n> -}\n> -\n> -static int read_to_fill_or_whine(struct line_buffer *file,\n> -\t\t\t\tstruct strbuf *buf, size_t width)\n> -{\n> -\tbuffer_read_binary(file, buf, width - buf->len);\n> -\tif (buf->len != width)\n> -\t\treturn input_error(file);\n> -\treturn 0;\n> -}\n> -\n> -static int check_offset_overflow(off_t offset, uintmax_t len)\n> -{\n> -\tif (len > maximum_signed_value_of_type(off_t))\n> -\t\treturn error(\"unrepresentable length in delta: \"\n> -\t\t\t\t\"%\"PRIuMAX\" > OFF_MAX\", len);\n> -\tif (signed_add_overflows(offset, (off_t) len))\n> -\t\treturn error(\"unrepresentable offset in delta: \"\n> -\t\t\t\t\"%\"PRIuMAX\" + %\"PRIuMAX\" > OFF_MAX\",\n> -\t\t\t\t(uintmax_t) offset, len);\n> -\treturn 0;\n> -}\n> -\n> -int move_window(struct sliding_view *view, off_t off, size_t width)\n> -{\n> -\toff_t file_offset;\n> -\tassert(view);\n> -\tassert(view->width <= view->buf.len);\n> -\tassert(!check_offset_overflow(view->off, view->buf.len));\n> -\n> -\tif (check_offset_overflow(off, width))\n> -\t\treturn -1;\n> -\tif (off < view->off || off + width < view->off + view->width)\n> -\t\treturn error(\"invalid delta: window slides left\");\n> -\tif (view->max_off >= 0 && view->max_off < off + (off_t) width)\n> -\t\treturn error(\"delta preimage ends early\");\n> -\n> -\tfile_offset = view->off + view->buf.len;\n> -\tif (off < file_offset) {\n> -\t\t/* Move the overlapping region into place. */\n> -\t\tstrbuf_remove(&view->buf, 0, off - view->off);\n> -\t} else {\n> -\t\t/* Seek ahead to skip the gap. */\n> -\t\tif (skip_or_whine(view->file, off - file_offset))\n> -\t\t\treturn -1;\n> -\t\tstrbuf_setlen(&view->buf, 0);\n> -\t}\n> -\n> -\tif (view->buf.len > width)\n> -\t\t; /* Already read. */\n> -\telse if (read_to_fill_or_whine(view->file, &view->buf, width))\n> -\t\treturn -1;\n> -\n> -\tview->off = off;\n> -\tview->width = width;\n> -\treturn 0;\n> -}\n> diff --git a/vcs-svn/svndiff.c b/vcs-svn/svndiff.c\n> deleted file mode 100644\n> index 75c753162a..0000000000\n> --- a/vcs-svn/svndiff.c\n> +++ /dev/null\n> @@ -1,309 +0,0 @@\n> -/*\n> - * Licensed under a two-clause BSD-style license.\n> - * See LICENSE for details.\n> - */\n> -\n> -#include \"git-compat-util.h\"\n> -#include \"sliding_window.h\"\n> -#include \"line_buffer.h\"\n> -#include \"svndiff.h\"\n> -\n> -/*\n> - * svndiff0 applier\n> - *\n> - * See http://svn.apache.org/repos/asf/subversion/trunk/notes/svndiff.\n> - *\n> - * svndiff0 ::= 'SVN\\0' window*\n> - * window ::= int int int int int instructions inline_data;\n> - * instructions ::= instruction*;\n> - * instruction ::= view_selector int int\n> - *   | copyfrom_data int\n> - *   | packed_view_selector int\n> - *   | packed_copyfrom_data\n> - *   ;\n> - * view_selector ::= copyfrom_source\n> - *   | copyfrom_target\n> - *   ;\n> - * copyfrom_source ::= # binary 00 000000;\n> - * copyfrom_target ::= # binary 01 000000;\n> - * copyfrom_data ::= # binary 10 000000;\n> - * packed_view_selector ::= # view_selector OR-ed with 6 bit value;\n> - * packed_copyfrom_data ::= # copyfrom_data OR-ed with 6 bit value;\n> - * int ::= highdigit* lowdigit;\n> - * highdigit ::= # binary 1000 0000 OR-ed with 7 bit value;\n> - * lowdigit ::= # 7 bit value;\n> - */\n> -\n> -#define INSN_MASK\t0xc0\n> -#define INSN_COPYFROM_SOURCE\t0x00\n> -#define INSN_COPYFROM_TARGET\t0x40\n> -#define INSN_COPYFROM_DATA\t0x80\n> -#define OPERAND_MASK\t0x3f\n> -\n> -#define VLI_CONTINUE\t0x80\n> -#define VLI_DIGIT_MASK\t0x7f\n> -#define VLI_BITS_PER_DIGIT 7\n> -\n> -struct window {\n> -\tstruct sliding_view *in;\n> -\tstruct strbuf out;\n> -\tstruct strbuf instructions;\n> -\tstruct strbuf data;\n> -};\n> -\n> -#define WINDOW_INIT(w)\t{ (w), STRBUF_INIT, STRBUF_INIT, STRBUF_INIT }\n> -\n> -static void window_release(struct window *ctx)\n> -{\n> -\tstrbuf_release(&ctx->out);\n> -\tstrbuf_release(&ctx->instructions);\n> -\tstrbuf_release(&ctx->data);\n> -}\n> -\n> -static int write_strbuf(struct strbuf *sb, FILE *out)\n> -{\n> -\tif (fwrite(sb->buf, 1, sb->len, out) == sb->len)\t/* Success. */\n> -\t\treturn 0;\n> -\treturn error_errno(\"cannot write delta postimage\");\n> -}\n> -\n> -static int error_short_read(struct line_buffer *input)\n> -{\n> -\tif (buffer_ferror(input))\n> -\t\treturn error_errno(\"error reading delta\");\n> -\treturn error(\"invalid delta: unexpected end of file\");\n> -}\n> -\n> -static int read_chunk(struct line_buffer *delta, off_t *delta_len,\n> -\t\t      struct strbuf *buf, size_t len)\n> -{\n> -\tassert(*delta_len >= 0);\n> -\tstrbuf_reset(buf);\n> -\tif (len > (uintmax_t) *delta_len ||\n> -\t    buffer_read_binary(delta, buf, len) != len)\n> -\t\treturn error_short_read(delta);\n> -\t*delta_len -= buf->len;\n> -\treturn 0;\n> -}\n> -\n> -static int read_magic(struct line_buffer *in, off_t *len)\n> -{\n> -\tstatic const char magic[] = {'S', 'V', 'N', '\\0'};\n> -\tstruct strbuf sb = STRBUF_INIT;\n> -\n> -\tif (read_chunk(in, len, &sb, sizeof(magic))) {\n> -\t\tstrbuf_release(&sb);\n> -\t\treturn -1;\n> -\t}\n> -\tif (memcmp(sb.buf, magic, sizeof(magic))) {\n> -\t\tstrbuf_release(&sb);\n> -\t\treturn error(\"invalid delta: unrecognized file type\");\n> -\t}\n> -\tstrbuf_release(&sb);\n> -\treturn 0;\n> -}\n> -\n> -static int read_int(struct line_buffer *in, uintmax_t *result, off_t *len)\n> -{\n> -\tuintmax_t rv = 0;\n> -\toff_t sz;\n> -\tfor (sz = *len; sz; sz--) {\n> -\t\tconst int ch = buffer_read_char(in);\n> -\t\tif (ch == EOF)\n> -\t\t\tbreak;\n> -\n> -\t\trv <<= VLI_BITS_PER_DIGIT;\n> -\t\trv += (ch & VLI_DIGIT_MASK);\n> -\t\tif (ch & VLI_CONTINUE)\n> -\t\t\tcontinue;\n> -\n> -\t\t*result = rv;\n> -\t\t*len = sz - 1;\n> -\t\treturn 0;\n> -\t}\n> -\treturn error_short_read(in);\n> -}\n> -\n> -static int parse_int(const char **buf, size_t *result, const char *end)\n> -{\n> -\tsize_t rv = 0;\n> -\tconst char *pos;\n> -\tfor (pos = *buf; pos != end; pos++) {\n> -\t\tunsigned char ch = *pos;\n> -\n> -\t\trv <<= VLI_BITS_PER_DIGIT;\n> -\t\trv += (ch & VLI_DIGIT_MASK);\n> -\t\tif (ch & VLI_CONTINUE)\n> -\t\t\tcontinue;\n> -\n> -\t\t*result = rv;\n> -\t\t*buf = pos + 1;\n> -\t\treturn 0;\n> -\t}\n> -\treturn error(\"invalid delta: unexpected end of instructions section\");\n> -}\n> -\n> -static int read_offset(struct line_buffer *in, off_t *result, off_t *len)\n> -{\n> -\tuintmax_t val;\n> -\tif (read_int(in, &val, len))\n> -\t\treturn -1;\n> -\tif (val > maximum_signed_value_of_type(off_t))\n> -\t\treturn error(\"unrepresentable offset in delta: %\"PRIuMAX\"\", val);\n> -\t*result = val;\n> -\treturn 0;\n> -}\n> -\n> -static int read_length(struct line_buffer *in, size_t *result, off_t *len)\n> -{\n> -\tuintmax_t val;\n> -\tif (read_int(in, &val, len))\n> -\t\treturn -1;\n> -\tif (val > SIZE_MAX)\n> -\t\treturn error(\"unrepresentable length in delta: %\"PRIuMAX\"\", val);\n> -\t*result = val;\n> -\treturn 0;\n> -}\n> -\n> -static int copyfrom_source(struct window *ctx, const char **instructions,\n> -\t\t\t   size_t nbytes, const char *insns_end)\n> -{\n> -\tsize_t offset;\n> -\tif (parse_int(instructions, &offset, insns_end))\n> -\t\treturn -1;\n> -\tif (unsigned_add_overflows(offset, nbytes) ||\n> -\t    offset + nbytes > ctx->in->width)\n> -\t\treturn error(\"invalid delta: copies source data outside view\");\n> -\tstrbuf_add(&ctx->out, ctx->in->buf.buf + offset, nbytes);\n> -\treturn 0;\n> -}\n> -\n> -static int copyfrom_target(struct window *ctx, const char **instructions,\n> -\t\t\t   size_t nbytes, const char *instructions_end)\n> -{\n> -\tsize_t offset;\n> -\tif (parse_int(instructions, &offset, instructions_end))\n> -\t\treturn -1;\n> -\tif (offset >= ctx->out.len)\n> -\t\treturn error(\"invalid delta: copies from the future\");\n> -\tfor (; nbytes > 0; nbytes--)\n> -\t\tstrbuf_addch(&ctx->out, ctx->out.buf[offset++]);\n> -\treturn 0;\n> -}\n> -\n> -static int copyfrom_data(struct window *ctx, size_t *data_pos, size_t nbytes)\n> -{\n> -\tconst size_t pos = *data_pos;\n> -\tif (unsigned_add_overflows(pos, nbytes) ||\n> -\t    pos + nbytes > ctx->data.len)\n> -\t\treturn error(\"invalid delta: copies unavailable inline data\");\n> -\tstrbuf_add(&ctx->out, ctx->data.buf + pos, nbytes);\n> -\t*data_pos += nbytes;\n> -\treturn 0;\n> -}\n> -\n> -static int parse_first_operand(const char **buf, size_t *out, const char *end)\n> -{\n> -\tsize_t result = (unsigned char) *(*buf)++ & OPERAND_MASK;\n> -\tif (result) {\t/* immediate operand */\n> -\t\t*out = result;\n> -\t\treturn 0;\n> -\t}\n> -\treturn parse_int(buf, out, end);\n> -}\n> -\n> -static int execute_one_instruction(struct window *ctx,\n> -\t\t\t\tconst char **instructions, size_t *data_pos)\n> -{\n> -\tunsigned int instruction;\n> -\tconst char *insns_end = ctx->instructions.buf + ctx->instructions.len;\n> -\tsize_t nbytes;\n> -\tassert(ctx);\n> -\tassert(instructions && *instructions);\n> -\tassert(data_pos);\n> -\n> -\tinstruction = (unsigned char) **instructions;\n> -\tif (parse_first_operand(instructions, &nbytes, insns_end))\n> -\t\treturn -1;\n> -\tswitch (instruction & INSN_MASK) {\n> -\tcase INSN_COPYFROM_SOURCE:\n> -\t\treturn copyfrom_source(ctx, instructions, nbytes, insns_end);\n> -\tcase INSN_COPYFROM_TARGET:\n> -\t\treturn copyfrom_target(ctx, instructions, nbytes, insns_end);\n> -\tcase INSN_COPYFROM_DATA:\n> -\t\treturn copyfrom_data(ctx, data_pos, nbytes);\n> -\tdefault:\n> -\t\treturn error(\"invalid delta: unrecognized instruction\");\n> -\t}\n> -}\n> -\n> -static int apply_window_in_core(struct window *ctx)\n> -{\n> -\tconst char *instructions;\n> -\tsize_t data_pos = 0;\n> -\n> -\t/*\n> -\t * Fill ctx->out.buf using data from the source, target,\n> -\t * and inline data views.\n> -\t */\n> -\tfor (instructions = ctx->instructions.buf;\n> -\t     instructions != ctx->instructions.buf + ctx->instructions.len;\n> -\t     )\n> -\t\tif (execute_one_instruction(ctx, &instructions, &data_pos))\n> -\t\t\treturn -1;\n> -\tif (data_pos != ctx->data.len)\n> -\t\treturn error(\"invalid delta: does not copy all inline data\");\n> -\treturn 0;\n> -}\n> -\n> -static int apply_one_window(struct line_buffer *delta, off_t *delta_len,\n> -\t\t\t    struct sliding_view *preimage, FILE *out)\n> -{\n> -\tint rv = -1;\n> -\tstruct window ctx = WINDOW_INIT(preimage);\n> -\tsize_t out_len;\n> -\tsize_t instructions_len;\n> -\tsize_t data_len;\n> -\tassert(delta_len);\n> -\n> -\t/* \"source view\" offset and length already handled; */\n> -\tif (read_length(delta, &out_len, delta_len) ||\n> -\t    read_length(delta, &instructions_len, delta_len) ||\n> -\t    read_length(delta, &data_len, delta_len) ||\n> -\t    read_chunk(delta, delta_len, &ctx.instructions, instructions_len) ||\n> -\t    read_chunk(delta, delta_len, &ctx.data, data_len))\n> -\t\tgoto error_out;\n> -\tstrbuf_grow(&ctx.out, out_len);\n> -\tif (apply_window_in_core(&ctx))\n> -\t\tgoto error_out;\n> -\tif (ctx.out.len != out_len) {\n> -\t\trv = error(\"invalid delta: incorrect postimage length\");\n> -\t\tgoto error_out;\n> -\t}\n> -\tif (write_strbuf(&ctx.out, out))\n> -\t\tgoto error_out;\n> -\trv = 0;\n> -error_out:\n> -\twindow_release(&ctx);\n> -\treturn rv;\n> -}\n> -\n> -int svndiff0_apply(struct line_buffer *delta, off_t delta_len,\n> -\t\t\tstruct sliding_view *preimage, FILE *postimage)\n> -{\n> -\tassert(delta && preimage && postimage && delta_len >= 0);\n> -\n> -\tif (read_magic(delta, &delta_len))\n> -\t\treturn -1;\n> -\twhile (delta_len) {\t/* For each window: */\n> -\t\toff_t pre_off = -1;\n> -\t\tsize_t pre_len;\n> -\n> -\t\tif (read_offset(delta, &pre_off, &delta_len) ||\n> -\t\t    read_length(delta, &pre_len, &delta_len) ||\n> -\t\t    move_window(preimage, pre_off, pre_len) ||\n> -\t\t    apply_one_window(delta, &delta_len, preimage, postimage))\n> -\t\t\treturn -1;\n> -\t}\n> -\treturn 0;\n> -}\n> diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c\n> deleted file mode 100644\n> index 08d136b8cc..0000000000\n> --- a/vcs-svn/svndump.c\n> +++ /dev/null\n> @@ -1,540 +0,0 @@\n> -/*\n> - * Parse and rearrange a svnadmin dump.\n> - * Create the dump with:\n> - * svnadmin dump --incremental -r<startrev>:<endrev> <repository> >outfile\n> - *\n> - * Licensed under a two-clause BSD-style license.\n> - * See LICENSE for details.\n> - */\n> -\n> -#include \"cache.h\"\n> -#include \"fast_export.h\"\n> -#include \"line_buffer.h\"\n> -#include \"strbuf.h\"\n> -#include \"svndump.h\"\n> -\n> -/*\n> - * Compare start of string to literal of equal length;\n> - * must be guarded by length test.\n> - */\n> -#define constcmp(s, ref) memcmp(s, ref, sizeof(ref) - 1)\n> -\n> -#define REPORT_FILENO 3\n> -\n> -#define NODEACT_REPLACE 4\n> -#define NODEACT_DELETE 3\n> -#define NODEACT_ADD 2\n> -#define NODEACT_CHANGE 1\n> -#define NODEACT_UNKNOWN 0\n> -\n> -/* States: */\n> -#define DUMP_CTX 0\t/* dump metadata */\n> -#define REV_CTX  1\t/* revision metadata */\n> -#define NODE_CTX 2\t/* node metadata */\n> -#define INTERNODE_CTX 3\t/* between nodes */\n> -\n> -#define DATE_RFC2822_LEN 31\n> -\n> -static struct line_buffer input = LINE_BUFFER_INIT;\n> -\n> -static struct {\n> -\tuint32_t action, srcRev, type;\n> -\toff_t prop_length, text_length;\n> -\tstruct strbuf src, dst;\n> -\tuint32_t text_delta, prop_delta;\n> -} node_ctx;\n> -\n> -static struct {\n> -\tuint32_t revision;\n> -\ttimestamp_t timestamp;\n> -\tstruct strbuf log, author, note;\n> -} rev_ctx;\n> -\n> -static struct {\n> -\tuint32_t version;\n> -\tstruct strbuf uuid, url;\n> -} dump_ctx;\n> -\n> -static void reset_node_ctx(char *fname)\n> -{\n> -\tnode_ctx.type = 0;\n> -\tnode_ctx.action = NODEACT_UNKNOWN;\n> -\tnode_ctx.prop_length = -1;\n> -\tnode_ctx.text_length = -1;\n> -\tstrbuf_reset(&node_ctx.src);\n> -\tnode_ctx.srcRev = 0;\n> -\tstrbuf_reset(&node_ctx.dst);\n> -\tif (fname)\n> -\t\tstrbuf_addstr(&node_ctx.dst, fname);\n> -\tnode_ctx.text_delta = 0;\n> -\tnode_ctx.prop_delta = 0;\n> -}\n> -\n> -static void reset_rev_ctx(uint32_t revision)\n> -{\n> -\trev_ctx.revision = revision;\n> -\trev_ctx.timestamp = 0;\n> -\tstrbuf_reset(&rev_ctx.log);\n> -\tstrbuf_reset(&rev_ctx.author);\n> -\tstrbuf_reset(&rev_ctx.note);\n> -}\n> -\n> -static void reset_dump_ctx(const char *url)\n> -{\n> -\tstrbuf_reset(&dump_ctx.url);\n> -\tif (url)\n> -\t\tstrbuf_addstr(&dump_ctx.url, url);\n> -\tdump_ctx.version = 1;\n> -\tstrbuf_reset(&dump_ctx.uuid);\n> -}\n> -\n> -static void handle_property(const struct strbuf *key_buf,\n> -\t\t\t\tstruct strbuf *val,\n> -\t\t\t\tuint32_t *type_set)\n> -{\n> -\tconst char *key = key_buf->buf;\n> -\tsize_t keylen = key_buf->len;\n> -\n> -\tswitch (keylen + 1) {\n> -\tcase sizeof(\"svn:log\"):\n> -\t\tif (constcmp(key, \"svn:log\"))\n> -\t\t\tbreak;\n> -\t\tif (!val)\n> -\t\t\tdie(\"invalid dump: unsets svn:log\");\n> -\t\tstrbuf_swap(&rev_ctx.log, val);\n> -\t\tbreak;\n> -\tcase sizeof(\"svn:author\"):\n> -\t\tif (constcmp(key, \"svn:author\"))\n> -\t\t\tbreak;\n> -\t\tif (!val)\n> -\t\t\tstrbuf_reset(&rev_ctx.author);\n> -\t\telse\n> -\t\t\tstrbuf_swap(&rev_ctx.author, val);\n> -\t\tbreak;\n> -\tcase sizeof(\"svn:date\"):\n> -\t\tif (constcmp(key, \"svn:date\"))\n> -\t\t\tbreak;\n> -\t\tif (!val)\n> -\t\t\tdie(\"invalid dump: unsets svn:date\");\n> -\t\tif (parse_date_basic(val->buf, &rev_ctx.timestamp, NULL))\n> -\t\t\twarning(\"invalid timestamp: %s\", val->buf);\n> -\t\tbreak;\n> -\tcase sizeof(\"svn:executable\"):\n> -\tcase sizeof(\"svn:special\"):\n> -\t\tif (keylen == strlen(\"svn:executable\") &&\n> -\t\t    constcmp(key, \"svn:executable\"))\n> -\t\t\tbreak;\n> -\t\tif (keylen == strlen(\"svn:special\") &&\n> -\t\t    constcmp(key, \"svn:special\"))\n> -\t\t\tbreak;\n> -\t\tif (*type_set) {\n> -\t\t\tif (!val)\n> -\t\t\t\treturn;\n> -\t\t\tdie(\"invalid dump: sets type twice\");\n> -\t\t}\n> -\t\tif (!val) {\n> -\t\t\tnode_ctx.type = S_IFREG | 0644;\n> -\t\t\treturn;\n> -\t\t}\n> -\t\t*type_set = 1;\n> -\t\tnode_ctx.type = keylen == strlen(\"svn:executable\") ?\n> -\t\t\t\t(S_IFREG | 0755) :\n> -\t\t\t\tS_IFLNK;\n> -\t}\n> -}\n> -\n> -static void die_short_read(void)\n> -{\n> -\tif (buffer_ferror(&input))\n> -\t\tdie_errno(\"error reading dump file\");\n> -\tdie(\"invalid dump: unexpected end of file\");\n> -}\n> -\n> -static void read_props(void)\n> -{\n> -\tstatic struct strbuf key = STRBUF_INIT;\n> -\tstatic struct strbuf val = STRBUF_INIT;\n> -\tconst char *t;\n> -\t/*\n> -\t * NEEDSWORK: to support simple mode changes like\n> -\t *\tK 11\n> -\t *\tsvn:special\n> -\t *\tV 1\n> -\t *\t*\n> -\t *\tD 14\n> -\t *\tsvn:executable\n> -\t * we keep track of whether a mode has been set and reset to\n> -\t * plain file only if not.  We should be keeping track of the\n> -\t * symlink and executable bits separately instead.\n> -\t */\n> -\tuint32_t type_set = 0;\n> -\twhile ((t = buffer_read_line(&input)) && strcmp(t, \"PROPS-END\")) {\n> -\t\tuint32_t len;\n> -\t\tconst char type = t[0];\n> -\t\tint ch;\n> -\n> -\t\tif (!type || t[1] != ' ')\n> -\t\t\tdie(\"invalid property line: %s\", t);\n> -\t\tlen = atoi(&t[2]);\n> -\t\tstrbuf_reset(&val);\n> -\t\tbuffer_read_binary(&input, &val, len);\n> -\t\tif (val.len < len)\n> -\t\t\tdie_short_read();\n> -\n> -\t\t/* Discard trailing newline. */\n> -\t\tch = buffer_read_char(&input);\n> -\t\tif (ch == EOF)\n> -\t\t\tdie_short_read();\n> -\t\tif (ch != '\\n')\n> -\t\t\tdie(\"invalid dump: expected newline after %s\", val.buf);\n> -\n> -\t\tswitch (type) {\n> -\t\tcase 'K':\n> -\t\t\tstrbuf_swap(&key, &val);\n> -\t\t\tcontinue;\n> -\t\tcase 'D':\n> -\t\t\thandle_property(&val, NULL, &type_set);\n> -\t\t\tcontinue;\n> -\t\tcase 'V':\n> -\t\t\thandle_property(&key, &val, &type_set);\n> -\t\t\tstrbuf_reset(&key);\n> -\t\t\tcontinue;\n> -\t\tdefault:\n> -\t\t\tdie(\"invalid property line: %s\", t);\n> -\t\t}\n> -\t}\n> -}\n> -\n> -static void handle_node(void)\n> -{\n> -\tconst uint32_t type = node_ctx.type;\n> -\tconst int have_props = node_ctx.prop_length != -1;\n> -\tconst int have_text = node_ctx.text_length != -1;\n> -\t/*\n> -\t * Old text for this node:\n> -\t *  NULL\t- directory or bug\n> -\t *  empty_blob\t- empty\n> -\t *  \"<dataref>\"\t- data retrievable from fast-import\n> -\t */\n> -\tstatic const char *const empty_blob = \"::empty::\";\n> -\tconst char *old_data = NULL;\n> -\tuint32_t old_mode = S_IFREG | 0644;\n> -\n> -\tif (node_ctx.action == NODEACT_DELETE) {\n> -\t\tif (have_text || have_props || node_ctx.srcRev)\n> -\t\t\tdie(\"invalid dump: deletion node has \"\n> -\t\t\t\t\"copyfrom info, text, or properties\");\n> -\t\tfast_export_delete(node_ctx.dst.buf);\n> -\t\treturn;\n> -\t}\n> -\tif (node_ctx.action == NODEACT_REPLACE) {\n> -\t\tfast_export_delete(node_ctx.dst.buf);\n> -\t\tnode_ctx.action = NODEACT_ADD;\n> -\t}\n> -\tif (node_ctx.srcRev) {\n> -\t\tfast_export_copy(node_ctx.srcRev, node_ctx.src.buf, node_ctx.dst.buf);\n> -\t\tif (node_ctx.action == NODEACT_ADD)\n> -\t\t\tnode_ctx.action = NODEACT_CHANGE;\n> -\t}\n> -\tif (have_text && type == S_IFDIR)\n> -\t\tdie(\"invalid dump: directories cannot have text attached\");\n> -\n> -\t/*\n> -\t * Find old content (old_data) and decide on the new mode.\n> -\t */\n> -\tif (node_ctx.action == NODEACT_CHANGE && !*node_ctx.dst.buf) {\n> -\t\tif (type != S_IFDIR)\n> -\t\t\tdie(\"invalid dump: root of tree is not a regular file\");\n> -\t\told_data = NULL;\n> -\t} else if (node_ctx.action == NODEACT_CHANGE) {\n> -\t\tuint32_t mode;\n> -\t\told_data = fast_export_read_path(node_ctx.dst.buf, &mode);\n> -\t\tif (mode == S_IFDIR && type != S_IFDIR)\n> -\t\t\tdie(\"invalid dump: cannot modify a directory into a file\");\n> -\t\tif (mode != S_IFDIR && type == S_IFDIR)\n> -\t\t\tdie(\"invalid dump: cannot modify a file into a directory\");\n> -\t\tnode_ctx.type = mode;\n> -\t\told_mode = mode;\n> -\t} else if (node_ctx.action == NODEACT_ADD) {\n> -\t\tif (type == S_IFDIR)\n> -\t\t\told_data = NULL;\n> -\t\telse if (have_text)\n> -\t\t\told_data = empty_blob;\n> -\t\telse\n> -\t\t\tdie(\"invalid dump: adds node without text\");\n> -\t} else {\n> -\t\tdie(\"invalid dump: Node-path block lacks Node-action\");\n> -\t}\n> -\n> -\t/*\n> -\t * Adjust mode to reflect properties.\n> -\t */\n> -\tif (have_props) {\n> -\t\tif (!node_ctx.prop_delta)\n> -\t\t\tnode_ctx.type = type;\n> -\t\tif (node_ctx.prop_length)\n> -\t\t\tread_props();\n> -\t}\n> -\n> -\t/*\n> -\t * Save the result.\n> -\t */\n> -\tif (type == S_IFDIR)\t/* directories are not tracked. */\n> -\t\treturn;\n> -\tassert(old_data);\n> -\tif (old_data == empty_blob)\n> -\t\t/* For the fast_export_* functions, NULL means empty. */\n> -\t\told_data = NULL;\n> -\tif (!have_text) {\n> -\t\tfast_export_modify(node_ctx.dst.buf, node_ctx.type, old_data);\n> -\t\treturn;\n> -\t}\n> -\tif (!node_ctx.text_delta) {\n> -\t\tfast_export_modify(node_ctx.dst.buf, node_ctx.type, \"inline\");\n> -\t\tfast_export_data(node_ctx.type, node_ctx.text_length, &input);\n> -\t\treturn;\n> -\t}\n> -\tfast_export_modify(node_ctx.dst.buf, node_ctx.type, \"inline\");\n> -\tfast_export_blob_delta(node_ctx.type, old_mode, old_data,\n> -\t\t\t\tnode_ctx.text_length, &input);\n> -}\n> -\n> -static void begin_revision(const char *remote_ref)\n> -{\n> -\tif (!rev_ctx.revision)\t/* revision 0 gets no git commit. */\n> -\t\treturn;\n> -\tfast_export_begin_commit(rev_ctx.revision, rev_ctx.author.buf,\n> -\t\t&rev_ctx.log, dump_ctx.uuid.buf, dump_ctx.url.buf,\n> -\t\trev_ctx.timestamp, remote_ref);\n> -}\n> -\n> -static void end_revision(const char *note_ref)\n> -{\n> -\tstruct strbuf mark = STRBUF_INIT;\n> -\tif (rev_ctx.revision) {\n> -\t\tfast_export_end_commit(rev_ctx.revision);\n> -\t\tfast_export_begin_note(rev_ctx.revision, \"remote-svn\",\n> -\t\t\t\t\"Note created by remote-svn.\", rev_ctx.timestamp, note_ref);\n> -\t\tstrbuf_addf(&mark, \":%\"PRIu32, rev_ctx.revision);\n> -\t\tfast_export_note(mark.buf, \"inline\");\n> -\t\tfast_export_buf_to_data(&rev_ctx.note);\n> -\t\tstrbuf_release(&mark);\n> -\t}\n> -}\n> -\n> -void svndump_read(const char *url, const char *local_ref, const char *notes_ref)\n> -{\n> -\tchar *val;\n> -\tchar *t;\n> -\tuint32_t active_ctx = DUMP_CTX;\n> -\tuint32_t len;\n> -\n> -\treset_dump_ctx(url);\n> -\twhile ((t = buffer_read_line(&input))) {\n> -\t\tval = strchr(t, ':');\n> -\t\tif (!val)\n> -\t\t\tcontinue;\n> -\t\tval++;\n> -\t\tif (*val != ' ')\n> -\t\t\tcontinue;\n> -\t\tval++;\n> -\n> -\t\t/* strlen(key) + 1 */\n> -\t\tswitch (val - t - 1) {\n> -\t\tcase sizeof(\"SVN-fs-dump-format-version\"):\n> -\t\t\tif (constcmp(t, \"SVN-fs-dump-format-version\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tdump_ctx.version = atoi(val);\n> -\t\t\tif (dump_ctx.version > 3)\n> -\t\t\t\tdie(\"expected svn dump format version <= 3, found %\"PRIu32,\n> -\t\t\t\t    dump_ctx.version);\n> -\t\t\tbreak;\n> -\t\tcase sizeof(\"UUID\"):\n> -\t\t\tif (constcmp(t, \"UUID\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tstrbuf_reset(&dump_ctx.uuid);\n> -\t\t\tstrbuf_addstr(&dump_ctx.uuid, val);\n> -\t\t\tbreak;\n> -\t\tcase sizeof(\"Revision-number\"):\n> -\t\t\tif (constcmp(t, \"Revision-number\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tif (active_ctx == NODE_CTX)\n> -\t\t\t\thandle_node();\n> -\t\t\tif (active_ctx == REV_CTX)\n> -\t\t\t\tbegin_revision(local_ref);\n> -\t\t\tif (active_ctx != DUMP_CTX)\n> -\t\t\t\tend_revision(notes_ref);\n> -\t\t\tactive_ctx = REV_CTX;\n> -\t\t\treset_rev_ctx(atoi(val));\n> -\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n> -\t\t\tbreak;\n> -\t\tcase sizeof(\"Node-path\"):\n> -\t\t\tif (constcmp(t, \"Node-\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tif (!constcmp(t + strlen(\"Node-\"), \"path\")) {\n> -\t\t\t\tif (active_ctx == NODE_CTX)\n> -\t\t\t\t\thandle_node();\n> -\t\t\t\tif (active_ctx == REV_CTX)\n> -\t\t\t\t\tbegin_revision(local_ref);\n> -\t\t\t\tactive_ctx = NODE_CTX;\n> -\t\t\t\treset_node_ctx(val);\n> -\t\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n> -\t\t\t\tbreak;\n> -\t\t\t}\n> -\t\t\tif (constcmp(t + strlen(\"Node-\"), \"kind\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n> -\t\t\tif (!strcmp(val, \"dir\"))\n> -\t\t\t\tnode_ctx.type = S_IFDIR;\n> -\t\t\telse if (!strcmp(val, \"file\"))\n> -\t\t\t\tnode_ctx.type = S_IFREG | 0644;\n> -\t\t\telse\n> -\t\t\t\tfprintf(stderr, \"Unknown node-kind: %s\\n\", val);\n> -\t\t\tbreak;\n> -\t\tcase sizeof(\"Node-action\"):\n> -\t\t\tif (constcmp(t, \"Node-action\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n> -\t\t\tif (!strcmp(val, \"delete\")) {\n> -\t\t\t\tnode_ctx.action = NODEACT_DELETE;\n> -\t\t\t} else if (!strcmp(val, \"add\")) {\n> -\t\t\t\tnode_ctx.action = NODEACT_ADD;\n> -\t\t\t} else if (!strcmp(val, \"change\")) {\n> -\t\t\t\tnode_ctx.action = NODEACT_CHANGE;\n> -\t\t\t} else if (!strcmp(val, \"replace\")) {\n> -\t\t\t\tnode_ctx.action = NODEACT_REPLACE;\n> -\t\t\t} else {\n> -\t\t\t\tfprintf(stderr, \"Unknown node-action: %s\\n\", val);\n> -\t\t\t\tnode_ctx.action = NODEACT_UNKNOWN;\n> -\t\t\t}\n> -\t\t\tbreak;\n> -\t\tcase sizeof(\"Node-copyfrom-path\"):\n> -\t\t\tif (constcmp(t, \"Node-copyfrom-path\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tstrbuf_reset(&node_ctx.src);\n> -\t\t\tstrbuf_addstr(&node_ctx.src, val);\n> -\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n> -\t\t\tbreak;\n> -\t\tcase sizeof(\"Node-copyfrom-rev\"):\n> -\t\t\tif (constcmp(t, \"Node-copyfrom-rev\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tnode_ctx.srcRev = atoi(val);\n> -\t\t\tstrbuf_addf(&rev_ctx.note, \"%s\\n\", t);\n> -\t\t\tbreak;\n> -\t\tcase sizeof(\"Text-content-length\"):\n> -\t\t\tif (constcmp(t, \"Text\") && constcmp(t, \"Prop\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tif (constcmp(t + 4, \"-content-length\"))\n> -\t\t\t\tcontinue;\n> -\t\t\t{\n> -\t\t\t\tchar *end;\n> -\t\t\t\tuintmax_t len;\n> -\n> -\t\t\t\tlen = strtoumax(val, &end, 10);\n> -\t\t\t\tif (!isdigit(*val) || *end)\n> -\t\t\t\t\tdie(\"invalid dump: non-numeric length %s\", val);\n> -\t\t\t\tif (len > maximum_signed_value_of_type(off_t))\n> -\t\t\t\t\tdie(\"unrepresentable length in dump: %s\", val);\n> -\n> -\t\t\t\tif (*t == 'T')\n> -\t\t\t\t\tnode_ctx.text_length = (off_t) len;\n> -\t\t\t\telse\n> -\t\t\t\t\tnode_ctx.prop_length = (off_t) len;\n> -\t\t\t\tbreak;\n> -\t\t\t}\n> -\t\tcase sizeof(\"Text-delta\"):\n> -\t\t\tif (!constcmp(t, \"Text-delta\")) {\n> -\t\t\t\tnode_ctx.text_delta = !strcmp(val, \"true\");\n> -\t\t\t\tbreak;\n> -\t\t\t}\n> -\t\t\tif (constcmp(t, \"Prop-delta\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tnode_ctx.prop_delta = !strcmp(val, \"true\");\n> -\t\t\tbreak;\n> -\t\tcase sizeof(\"Content-length\"):\n> -\t\t\tif (constcmp(t, \"Content-length\"))\n> -\t\t\t\tcontinue;\n> -\t\t\tlen = atoi(val);\n> -\t\t\tt = buffer_read_line(&input);\n> -\t\t\tif (!t)\n> -\t\t\t\tdie_short_read();\n> -\t\t\tif (*t)\n> -\t\t\t\tdie(\"invalid dump: expected blank line after content length header\");\n> -\t\t\tif (active_ctx == REV_CTX) {\n> -\t\t\t\tread_props();\n> -\t\t\t} else if (active_ctx == NODE_CTX) {\n> -\t\t\t\thandle_node();\n> -\t\t\t\tactive_ctx = INTERNODE_CTX;\n> -\t\t\t} else {\n> -\t\t\t\tfprintf(stderr, \"Unexpected content length header: %\"PRIu32\"\\n\", len);\n> -\t\t\t\tif (buffer_skip_bytes(&input, len) != len)\n> -\t\t\t\t\tdie_short_read();\n> -\t\t\t}\n> -\t\t}\n> -\t}\n> -\tif (buffer_ferror(&input))\n> -\t\tdie_short_read();\n> -\tif (active_ctx == NODE_CTX)\n> -\t\thandle_node();\n> -\tif (active_ctx == REV_CTX)\n> -\t\tbegin_revision(local_ref);\n> -\tif (active_ctx != DUMP_CTX)\n> -\t\tend_revision(notes_ref);\n> -}\n> -\n> -static void init(int report_fd)\n> -{\n> -\tfast_export_init(report_fd);\n> -\tstrbuf_init(&dump_ctx.uuid, 4096);\n> -\tstrbuf_init(&dump_ctx.url, 4096);\n> -\tstrbuf_init(&rev_ctx.log, 4096);\n> -\tstrbuf_init(&rev_ctx.author, 4096);\n> -\tstrbuf_init(&rev_ctx.note, 4096);\n> -\tstrbuf_init(&node_ctx.src, 4096);\n> -\tstrbuf_init(&node_ctx.dst, 4096);\n> -\treset_dump_ctx(NULL);\n> -\treset_rev_ctx(0);\n> -\treset_node_ctx(NULL);\n> -\treturn;\n> -}\n> -\n> -int svndump_init(const char *filename)\n> -{\n> -\tif (buffer_init(&input, filename))\n> -\t\treturn error_errno(\"cannot open %s\", filename ? filename : \"NULL\");\n> -\tinit(REPORT_FILENO);\n> -\treturn 0;\n> -}\n> -\n> -int svndump_init_fd(int in_fd, int back_fd)\n> -{\n> -\tif(buffer_fdinit(&input, xdup(in_fd)))\n> -\t\treturn error_errno(\"cannot open fd %d\", in_fd);\n> -\tinit(xdup(back_fd));\n> -\treturn 0;\n> -}\n> -\n> -void svndump_deinit(void)\n> -{\n> -\tfast_export_deinit();\n> -\treset_dump_ctx(NULL);\n> -\treset_rev_ctx(0);\n> -\treset_node_ctx(NULL);\n> -\tstrbuf_release(&rev_ctx.log);\n> -\tstrbuf_release(&rev_ctx.author);\n> -\tstrbuf_release(&rev_ctx.note);\n> -\tstrbuf_release(&node_ctx.src);\n> -\tstrbuf_release(&node_ctx.dst);\n> -\tif (buffer_deinit(&input))\n> -\t\tfprintf(stderr, \"Input error\\n\");\n> -\tif (ferror(stdout))\n> -\t\tfprintf(stderr, \"Output error\\n\");\n> -}\n> -\n> -void svndump_reset(void)\n> -{\n> -\tstrbuf_release(&dump_ctx.uuid);\n> -\tstrbuf_release(&dump_ctx.url);\n> -\tstrbuf_release(&rev_ctx.log);\n> -\tstrbuf_release(&rev_ctx.author);\n> -}\n> --\n> 2.28.0.573.gec6564704b\n>\n"},{"id":"403671","messageId":"20200814151137.GA4169627@coredump.intra.peff.net","threadId":"54035","inReplyTo":"nycvar.QRO.7.76.6.2008141634500.54@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 5/5] drop vcs-svn experiment","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-14T15:11:37Z","receivedAt":"2020-08-14T15:11:40Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Aug 14, 2020 at 04:39:07PM +0200, Johannes Schindelin wrote:\n\n> On Thu, 13 Aug 2020, Jeff King wrote:\n> \n> > The code in vcs-svn was started in 2010 as an attempt to build a\n> > remote-helper for interacting with svn repositories (as opposed to\n> > git-svn). However, we never got as far as shipping a mature remote\n> > helper, and the last substantive commit was e99d012a6bc in 2012.\n> >\n> > We do have a git-remote-testsvn, and it is even installed as part of\n> > \"make install\". But given the name, it seems unlikely to be used by\n> > anybody (you'd have to explicitly \"git clone testsvn::$url\", and there\n> > have been zero mentions of that on the mailing list since 2013, and even\n> > that includes the phrase \"you might need to hack a bit to get it working\n> > properly\"[1]).\n> >\n> > We also ship contrib/svn-fe, which builds on the vcs-svn work. However,\n> > it does not seem to build out of the box for me, as the link step misses\n> > some required libraries for using libgit.a. Curiously, the original\n> > build breakage bisects for me to eff80a9fd9 (Allow custom \"comment\n> > char\", 2013-01-16), which seems unrelated. There was an attempt to fix\n> > it in da011cb0e7 (contrib/svn-fe: fix Makefile, 2014-08-28), but on my\n> > system that only switches the error message.\n> \n> FWIW I got it to work, as part of my initial patches to support\n> `init.defaultBranch`. I even included a patch to touch `svn-fe` up in the\n> patch thicket to demonstrate how we can move from `master` as Git's\n> default branch to `main`.\n\nIn my case I needed to specify both -lpthread (common for Unix systems)\nand -lpcre (uncommon; I set USE_LIBPCRE).\n\nIt looks like it tries to use PTHREAD_LIBS automatically, but that's\nonly defined in the Makefile for most platforms, not any of the\nconfig.mak.* we include. However, I think it would be defined if I used\nautoconf.\n\nSo I can _almost_ build with:\n\n  make PTHREAD_LIBS='-lpthread -lpcre2-8'\n\nBut it still doesn't work, because the code which uses those (and -lz,\nwhich the Makefile does know about) is in the static libraries\n(libgit.a, etc). So the -l libs need to come after that. I needed:\n\ndiff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile\nindex e8651aaf4b..b90cf876cd 100644\n--- a/contrib/svn-fe/Makefile\n+++ b/contrib/svn-fe/Makefile\n@@ -74,7 +74,7 @@ endif\n endif\n \n svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)\n-\t$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)\n+\t$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ svn-fe.o $(LIBS) $(EXTLIBS)\n \n svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h\n \t$(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<\n\nSo I'm sure somebody determined could get it to work, and it's\ndefinitely salvageable. But given the lack of questions or reports about\nthis long-standing breakage on the list, I suspect that nobody is\nactually building it in practice.\n\n-Peff\n"},{"id":"403779","messageId":"20200815063811.GA628010@coredump.intra.peff.net","threadId":"54035","inReplyTo":"xmqqr1sa2znw.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-15T06:38:11Z","receivedAt":"2020-08-15T23:21:42Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 13, 2020 at 11:01:23AM -0700, Junio C Hamano wrote:\n\n> > ---\n> >  Makefile                            |  6 +-----\n> >  builtin.h                           |  1 +\n> >  bugreport.c => builtin/bugreport.c  | 10 +++-------\n> >  contrib/buildsystems/CMakeLists.txt |  5 +----\n> >  git.c                               |  1 +\n> >  5 files changed, 7 insertions(+), 16 deletions(-)\n> >  rename bugreport.c => builtin/bugreport.c (96%)\n> \n> I am on the fence, as bugreport does not seem to be fully completed\n> part of the system.  The original thinking was that it may soon want\n> to grow by linking with platform specific libraries for lower-level\n> system characteristic identification, at which time we'd not want to\n> have it in builtins and \"we can take advantage of builtin niceties\"\n> will cause us regrets.  The only reason that hasn't happened as far\n> as I can see is because its development speed is rather slow.\n> \n> So, I dunno.\n\nWhere do we want to go with this? After the discussion and sleeping on\nit, I'm still of the mind that we should generally default things to\nbeing builtins unless there's an immediate need not to do so (like\nextra link dependencies). But I don't care _too_ much, so I'd rather\neject this patch and move forward with the rest of the series if it's a\nsticking point. Thoughts?\n\n-Peff\n"},{"id":"403803","messageId":"nycvar.QRO.7.76.6.2008170641450.56@tvgsbejvaqbjf.bet","threadId":"54035","inReplyTo":"20200814143231.GA4167031@coredump.intra.peff.net","subject":"Re: [PATCH 1/5] Makefile: drop builtins from MSVC pdb list","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-08-17T04:42:46Z","receivedAt":"2020-08-17T09:06:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peff,\n\nOn Fri, 14 Aug 2020, Jeff King wrote:\n\n> On Fri, Aug 14, 2020 at 04:18:37PM +0200, Johannes Schindelin wrote:\n>\n> > While all four methods work, the only one that is regularly used with the\n> > `make install` command is the first one.\n> >\n> > The location you modified is in the `MSVC` part of `compat.mak.uname`,\n> > i.e. in the Visual C part.\n> >\n> > We originally had a tentative plan to eventually, maybe, build Git for\n> > Windows using Visual C by default. However, it turned out that the\n> > standard malloc in Visual C's runtime was tuned for other workloads than\n> > Gits, and that nedmalloc performed better, and we originally could not get\n> > nedmalloc to compile with a modern Visual C, so we stopped that effort.\n> >\n> > That's why you still have support for `make MSVC=1 install`.\n> >\n> > Since it seems not to be too much trouble, I would prefer to keep it\n> > working for now, even if it is rarely exercised and regressions might\n> > creep in (like the ones you fixed).\n>\n> Ah, thanks. That perfectly explains what is going on and why it might\n> not have been noticed. I agree it is not too much trouble to keep it\n> around for now.\n\nIncidentally, I stumbled across the patch I carry in Git for Windows'\nbranch thicket that _actually_ fixes this. Will send it out in a couple\nminutes.\n\nCiao,\nDscho\n"},{"id":"403812","messageId":"20200817121239.GA44309@google.com","threadId":"54035","inReplyTo":"20200815063811.GA628010@coredump.intra.peff.net","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Emily Shaffer","fromEmail":"emilyshaffer@google.com","sentAt":"2020-08-17T12:12:39Z","receivedAt":"2020-08-17T12:12:53Z","isPatch":true,"sender":{"key":"nasamuffin@google.com","avatar":"https://avatars.githubusercontent.com/u/1606826?v=4"},"body":"On Sat, Aug 15, 2020 at 02:38:11AM -0400, Jeff King wrote:\n> \n> On Thu, Aug 13, 2020 at 11:01:23AM -0700, Junio C Hamano wrote:\n> \n> > > ---\n> > >  Makefile                            |  6 +-----\n> > >  builtin.h                           |  1 +\n> > >  bugreport.c => builtin/bugreport.c  | 10 +++-------\n> > >  contrib/buildsystems/CMakeLists.txt |  5 +----\n> > >  git.c                               |  1 +\n> > >  5 files changed, 7 insertions(+), 16 deletions(-)\n> > >  rename bugreport.c => builtin/bugreport.c (96%)\n> > \n> > I am on the fence, as bugreport does not seem to be fully completed\n> > part of the system.  The original thinking was that it may soon want\n> > to grow by linking with platform specific libraries for lower-level\n> > system characteristic identification, at which time we'd not want to\n> > have it in builtins and \"we can take advantage of builtin niceties\"\n> > will cause us regrets.  The only reason that hasn't happened as far\n> > as I can see is because its development speed is rather slow.\n> > \n> > So, I dunno.\n> \n> Where do we want to go with this? After the discussion and sleeping on\n> it, I'm still of the mind that we should generally default things to\n> being builtins unless there's an immediate need not to do so (like\n> extra link dependencies). But I don't care _too_ much, so I'd rather\n> eject this patch and move forward with the rest of the series if it's a\n> sticking point. Thoughts?\n\nJust now catching up. I think it's a fine idea to turn it into a\nbuiltin. As stated elsewhere, this means the version reported is more\nreliable (and saves me work which I had on my list to query 'git\nversion' instead of listing the version when git-bugreport was built).\nIt's true that there is more work to do on bugreport, it's true that\nthat work is moving very slowly, as I had a number of things on my plate\neven before the world turned upside down :) At the time, Junio seemed\ninclined to take git-bugreport as a standalone, and I didn't care very\nmuch one way or another, so it seemed like a fine way to get the series\nout of review and into use. As I said then, turning it into a builtin\ndown the road isn't difficult - so I'm happy with the general direction.\n\n - Emily\n\n> \n> -Peff\n"},{"id":"403813","messageId":"20200817121643.GB44309@google.com","threadId":"54035","inReplyTo":"20200813145936.GC891370@coredump.intra.peff.net","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Emily Shaffer","fromEmail":"emilyshaffer@google.com","sentAt":"2020-08-17T12:16:43Z","receivedAt":"2020-08-17T12:16:59Z","isPatch":true,"sender":{"key":"nasamuffin@google.com","avatar":"https://avatars.githubusercontent.com/u/1606826?v=4"},"body":"On Thu, Aug 13, 2020 at 10:59:36AM -0400, Jeff King wrote:\n> \n> There's no reason that bugreport has to be a separate binary. And since\n> it links against libgit.a, it has a rather large disk footprint. Let's\n> make it a builtin, which reduces the size of a stripped installation\n> from 24MB to 22MB.\n> \n> This also simplifies our Makefile a bit. And we can take advantage of\n> builtin niceties like RUN_SETUP_GENTLY.\n> \n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  Makefile                            |  6 +-----\n>  builtin.h                           |  1 +\n>  bugreport.c => builtin/bugreport.c  | 10 +++-------\n>  contrib/buildsystems/CMakeLists.txt |  5 +----\n>  git.c                               |  1 +\n>  5 files changed, 7 insertions(+), 16 deletions(-)\n>  rename bugreport.c => builtin/bugreport.c (96%)\n\nAnd I saw no surprises in the diff. As stated in\nhttps://lore.kernel.org/git/20200817121239.GA44309@google.com I think\nthis is a fine idea, so:\n\nReviewed-by: Emily Shaffer <emilyshaffer@google.com>\n"},{"id":"403815","messageId":"4fc1eaf3-86d8-99de-3a8f-34f49250cee3@jeffhostetler.com","threadId":"54035","inReplyTo":"nycvar.QRO.7.76.6.2008141611490.54@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 1/5] Makefile: drop builtins from MSVC pdb list","fromName":"Jeff Hostetler","fromEmail":"git@jeffhostetler.com","sentAt":"2020-08-17T13:20:01Z","receivedAt":"2020-08-17T13:20:11Z","isPatch":true,"sender":{"key":"git@jeffhostetler.com","avatar":null},"body":"\n\nOn 8/14/20 10:18 AM, Johannes Schindelin wrote:\n> Hi Peff,\n> \n> On Thu, 13 Aug 2020, Jeff King wrote:\n> \n>> On Thu, Aug 13, 2020 at 11:04:28AM -0400, Taylor Blau wrote:\n>>\n>>> On Thu, Aug 13, 2020 at 10:57:19AM -0400, Jeff King wrote:\n>>>> Over the years some more programs have become builtins, but nobody\n>>>> updated this MSVC-specific section of the file (which specifically says\n>>>> that it should not include builtins). Let's bring it up to date.\n>>>>\n>>>> Signed-off-by: Jeff King <peff@peff.net>\n>>>> ---\n>>>> Given that nobody has mentioned this, it makes me wonder if anybody is\n>>>> even using this part of the Makefile at all these days. Or maybe having\n>>>> extra lines here isn't a problem (though it's also missing some entries,\n>>>> like one for git-bugreport).\n>>>\n>>> If having extra entries didn't cause a problem, I would suspect that it\n>>> was just that. But that missing entries *also* doesn't cause a problem,\n>>> I'd suspect that this section of the Makefile just isn't being used.\n>>>\n>>> Of course, I'm not using it since I'm not on Windows, but maybe dscho or\n>>> Stolee would know if there are legitimate uses. Of course, if there\n>>> aren't, I'm favor of getting rid of this section entirely.\n>>\n>> I cc'd Jeff Hostetler, who added it. :)\n>>\n>> I'm also pretty not-knowledgeable about Windows, but I think that\n>> anybody using MSVC would do so through Visual Studio these days. And\n>> that's being covered with recent cmake stuff. Or maybe I'm just\n>> clueless. We'll see.\n> \n> We have a couple ways to build Git on Windows:\n> \n> - the standard way, in a Git for Windows SDK (which is a slightly modified\n>    subset of MSYS2). This uses GCC and GNU make and all the things that you\n>    might suspect given Git's origins on Linux.\n> \n> - the Visual Studio way, after running `make vcxproj` in Git for Windows'\n>    SDK. As part of the `vcxproj` target, the non-C parts of Git are\n>    generated and committed.\n> \n> - the \"new\" Visual Studio way, after running CMake. The non-C parts are\n>    generated through CMake, which is nice because no Git for Windows SDK is\n>    required to build this from start to finish.\n> \n> - the Visual C way, as championed by Jeff (and which was a prerequisite to\n>    working on the `vcxproj` target): in a Git for Windows SDK, use GNU make\n>    but replace GCC by MSVC (via the command-line): `make MSVC=1`.\n\n\nOn Windows, I always use either \"make\" or \"make MSVC=1\" from a SDK\nshell window to build and test.  This lets me debug in either GDB or\nVisual Studio directly against the EXE.  (That is, without any of the\nproject complications in the debugger or the artificial commits created\nfor the .vcxproj files.)  MSVC builds are built from source all the way \ndown (including third-party libraries) thanks to vcpkg.\n\nHowever, I never install my \"make MSVC=1\" builds, so I don't care about\nthe PDBs being redistributed.  As @dscho said, we added that thinking\nthat we would be able to do MSVC-based releases one day, but that ship\nsank.\n\nThere were some very-early GVFS users who we (personally) gave MSVC-\nbased builds to help get stack traces via internal Watson channels,\nbut that is unnecessary now.\n\nJeff\n\n\n> \n> While all four methods work, the only one that is regularly used with the\n> `make install` command is the first one.\n> \n> The location you modified is in the `MSVC` part of `compat.mak.uname`,\n> i.e. in the Visual C part.\n> \n> We originally had a tentative plan to eventually, maybe, build Git for\n> Windows using Visual C by default. However, it turned out that the\n> standard malloc in Visual C's runtime was tuned for other workloads than\n> Gits, and that nedmalloc performed better, and we originally could not get\n> nedmalloc to compile with a modern Visual C, so we stopped that effort.\n> \n> That's why you still have support for `make MSVC=1 install`.\n> \n> Since it seems not to be too much trouble, I would prefer to keep it\n> working for now, even if it is rarely exercised and regressions might\n> creep in (like the ones you fixed).\n> \n> Thanks,\n> Dscho\n> \n"},{"id":"403840","messageId":"xmqqv9hh2oq9.fsf@gitster.c.googlers.com","threadId":"54035","inReplyTo":"20200815063811.GA628010@coredump.intra.peff.net","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-08-17T16:58:54Z","receivedAt":"2020-08-17T17:30:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Where do we want to go with this? After the discussion and sleeping on\n> it, I'm still of the mind that we should generally default things to\n> being builtins unless there's an immediate need not to do so (like\n> extra link dependencies). But I don't care _too_ much, so I'd rather\n> eject this patch and move forward with the rest of the series if it's a\n> sticking point. Thoughts?\n\nI already said what needs to be said.\n\nI do not care too deeply what we do now today either way, as long as\npeople remember that we are interested in the version string, build\noptions and external library versions of the \"git\" binary (for\nbuilt-ins) and non-built-in binaries (like the remote helpers), and\nnot as much interested in these traits of the \"git-bugreport\" binary\nitself, when we need to split \"bugreport\" out of builtins in the\nfuture.\n\nIronically, making it built-in eliminates the chance of sloppy code\nto report versions and other traits of git-bugreport that does not\nmatter and is different from these traits of git itself, but it will\nmake the technical burden larger if we ever need to split.  It won't\nbe just the matter of giving it a new cmd_main() and worry about the\noptional nongit setup.\n\nThanks.\n"},{"id":"403898","messageId":"20200817214041.GA1854983@coredump.intra.peff.net","threadId":"54035","inReplyTo":"xmqqv9hh2oq9.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 3/5] make git-bugreport a builtin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-08-17T21:40:41Z","receivedAt":"2020-08-17T21:40:44Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Aug 17, 2020 at 09:58:54AM -0700, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > Where do we want to go with this? After the discussion and sleeping on\n> > it, I'm still of the mind that we should generally default things to\n> > being builtins unless there's an immediate need not to do so (like\n> > extra link dependencies). But I don't care _too_ much, so I'd rather\n> > eject this patch and move forward with the rest of the series if it's a\n> > sticking point. Thoughts?\n> \n> I already said what needs to be said.\n\nI guess my question was really: after the discussion do you think I'm\nbeing an idiot, to the point that you do not want to pick up the series?\n\nIt sounds like the answer is no, and...\n\n> I do not care too deeply what we do now today either way, as long as\n> people remember that we are interested in the version string, build\n> options and external library versions of the \"git\" binary (for\n> built-ins) and non-built-in binaries (like the remote helpers), and\n> not as much interested in these traits of the \"git-bugreport\" binary\n> itself, when we need to split \"bugreport\" out of builtins in the\n> future.\n\nYes, I agree that future changes to bugreport may need to keep that in\nmind (but my guess is that it won't even ever come up).\n\n-Peff\n"}]}