Skip to content

Commit fc47391

Browse files
peffgitster
authored andcommitted
drop vcs-svn experiment
The code in vcs-svn was started in 2010 as an attempt to build a remote-helper for interacting with svn repositories (as opposed to git-svn). However, we never got as far as shipping a mature remote helper, and the last substantive commit was e99d012 in 2012. We do have a git-remote-testsvn, and it is even installed as part of "make install". But given the name, it seems unlikely to be used by anybody (you'd have to explicitly "git clone testsvn::$url", and there have been zero mentions of that on the mailing list since 2013, and even that includes the phrase "you might need to hack a bit to get it working properly"[1]). We also ship contrib/svn-fe, which builds on the vcs-svn work. However, it does not seem to build out of the box for me, as the link step misses some required libraries for using libgit.a. Curiously, the original build breakage bisects for me to eff80a9 (Allow custom "comment char", 2013-01-16), which seems unrelated. There was an attempt to fix it in da011cb (contrib/svn-fe: fix Makefile, 2014-08-28), but on my system that only switches the error message. So it seems like the result is not really usable by anybody in practice. It would be wonderful if somebody wanted to pick up the topic again, and potentially it's worth carrying around for that reason. But the flip side is that people doing tree-wide operations have to deal with this code. And you can see the list with (replace "HEAD" with this commit as appropriate): { echo "--" git diff-tree --diff-filter=D -r --name-only HEAD^ HEAD } | git log --no-merges --oneline e99d012.. --stdin which shows 58 times somebody had to deal with the code, generally due to a compile or test failure, or a tree-wide style fix or API change. Let's drop it and let anybody who wants to pick it up do so by resurrecting it from the git history. As a bonus, this also reduces the size of a stripped installation of Git from 21MB to 19MB. [1] https://lore.kernel.org/git/CALkWK0mPHzKfzFKKpZkfAus3YVC9NFYDbFnt+5JQYVKipk3bQQ@mail.gmail.com/ Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a006f87 commit fc47391

24 files changed

+7
-3856
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134
/git-remote-fd
135135
/git-remote-ext
136136
/git-remote-testpy
137-
/git-remote-testsvn
138137
/git-repack
139138
/git-replace
140139
/git-request-pull

Makefile

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@ BUILT_INS =
569569
COMPAT_CFLAGS =
570570
COMPAT_OBJS =
571571
XDIFF_OBJS =
572-
VCSSVN_OBJS =
573572
GENERATED_H =
574573
EXTRA_CPPFLAGS =
575574
FUZZ_OBJS =
@@ -674,7 +673,6 @@ PROGRAMS += $(EXTRA_PROGRAMS)
674673
PROGRAM_OBJS += daemon.o
675674
PROGRAM_OBJS += http-backend.o
676675
PROGRAM_OBJS += imap-send.o
677-
PROGRAM_OBJS += remote-testsvn.o
678676
PROGRAM_OBJS += sh-i18n--envsubst.o
679677
PROGRAM_OBJS += shell.o
680678

@@ -746,8 +744,6 @@ TEST_BUILTINS_OBJS += test-xml-encode.o
746744
# Do not add more tests here unless they have extra dependencies. Add
747745
# them in TEST_BUILTINS_OBJS above.
748746
TEST_PROGRAMS_NEED_X += test-fake-ssh
749-
TEST_PROGRAMS_NEED_X += test-line-buffer
750-
TEST_PROGRAMS_NEED_X += test-svn-fe
751747
TEST_PROGRAMS_NEED_X += test-tool
752748

753749
TEST_PROGRAMS = $(patsubst %,t/helper/%$X,$(TEST_PROGRAMS_NEED_X))
@@ -803,7 +799,6 @@ TEST_SHELL_PATH = $(SHELL_PATH)
803799

804800
LIB_FILE = libgit.a
805801
XDIFF_LIB = xdiff/lib.a
806-
VCSSVN_LIB = vcs-svn/lib.a
807802

808803
GENERATED_H += config-list.h
809804
GENERATED_H += command-list.h
@@ -2345,16 +2340,9 @@ XDIFF_OBJS += xdiff/xpatience.o
23452340
XDIFF_OBJS += xdiff/xprepare.o
23462341
XDIFF_OBJS += xdiff/xutils.o
23472342

2348-
VCSSVN_OBJS += vcs-svn/fast_export.o
2349-
VCSSVN_OBJS += vcs-svn/line_buffer.o
2350-
VCSSVN_OBJS += vcs-svn/sliding_window.o
2351-
VCSSVN_OBJS += vcs-svn/svndiff.o
2352-
VCSSVN_OBJS += vcs-svn/svndump.o
2353-
23542343
TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
23552344
OBJECTS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
23562345
$(XDIFF_OBJS) \
2357-
$(VCSSVN_OBJS) \
23582346
$(FUZZ_OBJS) \
23592347
common-main.o \
23602348
git.o
@@ -2469,10 +2457,6 @@ git-http-push$X: http.o http-push.o GIT-LDFLAGS $(GITLIBS)
24692457
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
24702458
$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)
24712459

2472-
git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB)
2473-
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) \
2474-
$(VCSSVN_LIB)
2475-
24762460
$(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)
24772461
$(QUIET_LNCP)$(RM) $@ && \
24782462
ln $< $@ 2>/dev/null || \
@@ -2489,9 +2473,6 @@ $(LIB_FILE): $(LIB_OBJS)
24892473
$(XDIFF_LIB): $(XDIFF_OBJS)
24902474
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
24912475

2492-
$(VCSSVN_LIB): $(VCSSVN_OBJS)
2493-
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
2494-
24952476
export DEFAULT_EDITOR DEFAULT_PAGER
24962477

24972478
Documentation/GIT-EXCLUDED-PROGRAMS: FORCE
@@ -2766,10 +2747,6 @@ perf: all
27662747

27672748
.PHONY: test perf
27682749

2769-
t/helper/test-line-buffer$X: $(VCSSVN_LIB)
2770-
2771-
t/helper/test-svn-fe$X: $(VCSSVN_LIB)
2772-
27732750
.PRECIOUS: $(TEST_OBJS)
27742751

27752752
t/helper/test-tool$X: $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
@@ -2902,7 +2879,6 @@ ifdef MSVC
29022879
$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
29032880
$(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
29042881
$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2905-
$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
29062882
$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
29072883
ifndef DEBUG
29082884
$(INSTALL) $(vcpkg_rel_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
@@ -3103,7 +3079,7 @@ cocciclean:
31033079
clean: profile-clean coverage-clean cocciclean
31043080
$(RM) *.res
31053081
$(RM) $(OBJECTS)
3106-
$(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)
3082+
$(RM) $(LIB_FILE) $(XDIFF_LIB)
31073083
$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
31083084
$(RM) $(TEST_PROGRAMS)
31093085
$(RM) $(FUZZ_PROGRAMS)

contrib/buildsystems/CMakeLists.txt

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ unset(CMAKE_REQUIRED_INCLUDES)
502502
#programs
503503
set(PROGRAMS_BUILT
504504
git git-daemon git-http-backend git-sh-i18n--envsubst
505-
git-shell git-remote-testsvn)
505+
git-shell)
506506

507507
if(NOT CURL_FOUND)
508508
list(APPEND excluded_progs git-http-fetch git-http-push)
@@ -568,12 +568,6 @@ parse_makefile_for_sources(libxdiff_SOURCES "XDIFF_OBJS")
568568
list(TRANSFORM libxdiff_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/")
569569
add_library(xdiff STATIC ${libxdiff_SOURCES})
570570

571-
#libvcs-svn
572-
parse_makefile_for_sources(libvcs-svn_SOURCES "VCSSVN_OBJS")
573-
574-
list(TRANSFORM libvcs-svn_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/")
575-
add_library(vcs-svn STATIC ${libvcs-svn_SOURCES})
576-
577571
if(WIN32)
578572
if(NOT MSVC)#use windres when compiling with gcc and clang
579573
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git.res
@@ -654,9 +648,6 @@ if(CURL_FOUND)
654648
endif()
655649
endif()
656650

657-
add_executable(git-remote-testsvn ${CMAKE_SOURCE_DIR}/remote-testsvn.c)
658-
target_link_libraries(git-remote-testsvn common-main vcs-svn)
659-
660651
set(git_builtin_extra
661652
cherry cherry-pick format-patch fsck-objects
662653
init merge-subtree restore show
@@ -832,26 +823,20 @@ if(BUILD_TESTING)
832823
add_executable(test-fake-ssh ${CMAKE_SOURCE_DIR}/t/helper/test-fake-ssh.c)
833824
target_link_libraries(test-fake-ssh common-main)
834825

835-
add_executable(test-line-buffer ${CMAKE_SOURCE_DIR}/t/helper/test-line-buffer.c)
836-
target_link_libraries(test-line-buffer common-main vcs-svn)
837-
838-
add_executable(test-svn-fe ${CMAKE_SOURCE_DIR}/t/helper/test-svn-fe.c)
839-
target_link_libraries(test-svn-fe common-main vcs-svn)
840-
841826
#test-tool
842827
parse_makefile_for_sources(test-tool_SOURCES "TEST_BUILTINS_OBJS")
843828

844829
list(TRANSFORM test-tool_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/t/helper/")
845830
add_executable(test-tool ${CMAKE_SOURCE_DIR}/t/helper/test-tool.c ${test-tool_SOURCES})
846831
target_link_libraries(test-tool common-main)
847832

848-
set_target_properties(test-fake-ssh test-line-buffer test-svn-fe test-tool
833+
set_target_properties(test-fake-ssh test-tool
849834
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/t/helper)
850835

851836
if(MSVC)
852-
set_target_properties(test-fake-ssh test-line-buffer test-svn-fe test-tool
837+
set_target_properties(test-fake-ssh test-tool
853838
PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/t/helper)
854-
set_target_properties(test-fake-ssh test-line-buffer test-svn-fe test-tool
839+
set_target_properties(test-fake-ssh test-tool
855840
PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/t/helper)
856841
endif()
857842

@@ -860,7 +845,7 @@ set(wrapper_scripts
860845
git git-upload-pack git-receive-pack git-upload-archive git-shell git-remote-ext)
861846

862847
set(wrapper_test_scripts
863-
test-fake-ssh test-line-buffer test-svn-fe test-tool)
848+
test-fake-ssh test-tool)
864849

865850

866851
foreach(script ${wrapper_scripts})
@@ -961,7 +946,6 @@ if(NOT ${CMAKE_BINARY_DIR}/CMakeCache.txt STREQUAL ${CACHE_PATH})
961946
file(COPY ${CMAKE_SOURCE_DIR}/mergetools/tkdiff DESTINATION ${CMAKE_BINARY_DIR}/mergetools/)
962947
file(COPY ${CMAKE_SOURCE_DIR}/contrib/completion/git-prompt.sh DESTINATION ${CMAKE_BINARY_DIR}/contrib/completion/)
963948
file(COPY ${CMAKE_SOURCE_DIR}/contrib/completion/git-completion.bash DESTINATION ${CMAKE_BINARY_DIR}/contrib/completion/)
964-
file(COPY ${CMAKE_SOURCE_DIR}/contrib/svn-fe/svnrdump_sim.py DESTINATION ${CMAKE_BINARY_DIR}/contrib/svn-fe/)
965949
endif()
966950

967951
file(GLOB test_scipts "${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh")

contrib/svn-fe/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

contrib/svn-fe/Makefile

Lines changed: 0 additions & 105 deletions
This file was deleted.

contrib/svn-fe/svn-fe.c

Lines changed: 0 additions & 18 deletions
This file was deleted.

contrib/svn-fe/svn-fe.txt

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)