{"thread":{"id":"66229","subject":"[PATCH 2/2] Makefile: add NO_GIT_SVN knob to skip building/installing git-svn","startedAt":"2026-08-27T16:51:52Z","lastAt":"2026-08-27T23:44:04Z","messageCount":7,"participants":["Wesley Schwengle","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"551374","messageId":"20260827165134.848207-3-wesleys@opperschaap.net","threadId":"66229","inReplyTo":"20260827165134.848207-1-wesleys@opperschaap.net","subject":"[PATCH 2/2] Makefile: add NO_GIT_SVN knob to skip building/installing git-svn","fromName":"Wesley Schwengle","fromEmail":"wesleys@opperschaap.net","sentAt":"2026-08-27T16:51:34Z","receivedAt":"2026-08-27T16:51:52Z","isPatch":true,"body":"This option also implies that NO_SVN_TESTS is enabled.\n\nSigned-off-by: Wesley Schwengle <wesleys@opperschaap.net>\n---\n Makefile | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/Makefile b/Makefile\nindex d4b775953d..e4b2f5fa0b 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -81,20 +81,23 @@ include shared.mak\n #\n # Define NO_SYS_SELECT_H if you don't have sys/select.h.\n #\n # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.\n # Enable it on Windows.  By default, symrefs are still used.\n #\n # Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability\n # tests.  These tests take up a significant amount of the total test time\n # but are not needed unless you plan to talk to SVN repos.\n #\n+# Define NO_GIT_SVN if you don't want git-svn built or installed at all.\n+# Implies NO_SVN_TESTS.\n+#\n # Define NO_FINK if you are building on Darwin/Mac OS X, have Fink\n # installed in /sw, but don't want GIT to link against any libraries\n # installed there.  If defined you may specify your own (or Fink's)\n # include directories and library directories by defining CFLAGS\n # and LDFLAGS appropriately.\n #\n # Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X,\n # have DarwinPorts (which is an old name for MacPorts) installed\n # in /opt/local, but don't want GIT to\n # link against any libraries installed there.  If defined you may\n@@ -741,21 +744,23 @@ SCRIPT_SH += git-web--browse.sh\n \n SCRIPT_LIB += git-mergetool--lib\n SCRIPT_LIB += git-sh-i18n\n SCRIPT_LIB += git-sh-setup\n \n SCRIPT_PERL += git-archimport.perl\n SCRIPT_PERL += git-cvsexportcommit.perl\n SCRIPT_PERL += git-cvsimport.perl\n SCRIPT_PERL += git-cvsserver.perl\n SCRIPT_PERL += git-send-email.perl\n+ifndef NO_GIT_SVN\n SCRIPT_PERL += git-svn.perl\n+endif\n \n SCRIPT_PYTHON += git-p4.py\n \n # Generated files for scripts\n SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))\n SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))\n SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))\n \n # Individual rules to allow e.g.\n # \"make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script\"\n@@ -3408,20 +3413,23 @@ $(test_bindir_programs): bin-wrappers/%: bin-wrappers/wrap-for-bin.sh\n \t     -e 's|@GITPERLLIB@|$(shell pwd)/perl/build/lib|' \\\n \t     -e 's|@MERGE_TOOLS_DIR@|$(shell pwd)/mergetools|' \\\n \t     -e 's|@TEMPLATE_DIR@|$(shell pwd)/templates/blt|' \\\n \t     -e 's|@PROG@|$(shell pwd)/$(patsubst test-%,t/helper/test-%,$(@F))$(if $(filter-out $(BINDIR_PROGRAMS_NO_X),$(@F)),$(X),)|' < $< > $@ && \\\n \tchmod +x $@\n \n # GNU make supports exporting all variables by \"export\" without parameters.\n # However, the environment gets quite big, and some programs have problems\n # with that.\n \n+ifdef NO_GIT_SVN\n+NO_SVN_TESTS = YesPlease\n+endif\n export NO_SVN_TESTS\n export TEST_NO_MALLOC_CHECK\n \n ### Testing rules\n \n test: all\n \t$(MAKE) -C t/ all\n ifdef TEST_CONTRIB_TOO\n \t$(MAKE) -C contrib/ test\n endif\n-- \n2.55.0.827.g48ce2c92dc\n\n"},{"id":"551375","messageId":"20260827165134.848207-1-wesleys@opperschaap.net","threadId":"66229","inReplyTo":null,"subject":"[PATCH 0/2] git-svn: silence bogus v1-layout migration message","fromName":"Wesley Schwengle","fromEmail":"wesleys@opperschaap.net","sentAt":"2026-08-27T16:51:32Z","receivedAt":"2026-08-27T16:51:52Z","isPatch":true,"body":"While running `dzil build' (a Perl tool for minting and shipping\nmodules) without a git remote configured, git started printing\n\"Migrating from a git-svn v1 layout...\" messages. In addition it also\ncreated an empty `.git/svn' directory. After removing that directory, it\nagain repeated the behaviour on every `dzil build' invocation.\n\nOne of the plugins runs `git svn info' to probe whether the repo is an\nSVN checkout. On a plain git-only repository this produced a wall of\nmigration text on the terminal and left behind an empty `.git/svn'\ndirectory. I initially thought it was just a plugin being weird, but\nrunning `git svn info' myself turned out to be the real \"troublemaker\".\n\nYou can do reproduce the behaviour by doing:\n\n  git init .\n  git svn info\n\nThis patch addresses that and uses the same pattern as\n`migrate_from_v0'. I've included tests to t9107.\n\nIn addition, which was my intitial reaction: I've added a knob to\nexclude git svn from being installed. When you add\n`NO_GIT_SVN=YesPlease' to your make invocation, git is installed without\ngit-svn and no SVN tests run.\n\nWesley Schwengle (2):\n  git-svn: don't print v1-layout migration noise when there's nothing to\n    migrate\n  Makefile: add NO_GIT_SVN knob to skip building/installing git-svn\n\n Makefile                   |  8 ++++++++\n perl/Git/SVN/Migration.pm  | 16 ++++++++++------\n t/t9107-git-svn-migrate.sh |  7 +++++++\n 3 files changed, 25 insertions(+), 6 deletions(-)\n\n-- \n2.55.0.827.g48ce2c92dc\n\n"},{"id":"551379","messageId":"20260827165134.848207-2-wesleys@opperschaap.net","threadId":"66229","inReplyTo":"20260827165134.848207-1-wesleys@opperschaap.net","subject":"[PATCH 1/2] git-svn: don't print v1-layout migration noise when there's nothing to migrate","fromName":"Wesley Schwengle","fromEmail":"wesleys@opperschaap.net","sentAt":"2026-08-27T16:51:33Z","receivedAt":"2026-08-27T17:01:24Z","isPatch":true,"body":"`migrate_from_v1()' unconditionally announced and created `.git/svn'\nwhen no legacy `refs/remotes/*' metadata existed to migrate. This\nhappens for example right after a `git init'.\n\nDefer the logic until an actual candidate is found, matching\nthe existing pattern of `migrate_from_v0'\n\nSigned-off-by: Wesley Schwengle <wesleys@opperschaap.net>\n---\n perl/Git/SVN/Migration.pm  | 16 ++++++++++------\n t/t9107-git-svn-migrate.sh |  7 +++++++\n 2 files changed, 17 insertions(+), 6 deletions(-)\n\ndiff --git a/perl/Git/SVN/Migration.pm b/perl/Git/SVN/Migration.pm\nindex ed96ac593e..a6de4b14a8 100644\n--- a/perl/Git/SVN/Migration.pm\n+++ b/perl/Git/SVN/Migration.pm\n@@ -84,35 +84,39 @@ sub migrate_from_v0 {\n \n sub migrate_from_v1 {\n \tmy $git_dir = $ENV{GIT_DIR};\n \tmy $migrated = 0;\n \treturn $migrated unless -d $git_dir;\n \tmy $svn_dir = Git::SVN::svn_dir();\n \n \t# just in case somebody used 'svn' as their $id at some point...\n \treturn $migrated if -d $svn_dir && ! -f \"$svn_dir/info/url\";\n \n-\tprint STDERR \"Migrating from a git-svn v1 layout...\\n\";\n-\tmkpath([$svn_dir]);\n-\tprint STDERR \"Data from a previous version of git-svn exists, but\\n\\t\",\n-\t             \"$svn_dir\\n\\t(required for this version \",\n-\t             \"($::VERSION) of git-svn) does not exist.\\n\";\n \tmy ($fh, $ctx) = command_output_pipe(qw/rev-parse --symbolic --all/);\n \twhile (<$fh>) {\n \t\tmy $x = $_;\n \t\tnext unless $x =~ s#^refs/remotes/##;\n \t\tchomp $x;\n \t\tmy $info_url = command_oneline(qw(rev-parse --git-path),\n \t\t\t\t\t\t\"$x/info/url\");\n \t\tnext unless -f $info_url;\n \t\tmy $u = eval { ::file_to_s($info_url) };\n \t\tnext unless $u;\n+\t\tunless ($migrated) {\n+\t\t\tprint STDERR \"Migrating from a git-svn v1 layout...\\n\";\n+\t\t\tmkpath([$svn_dir]);\n+\t\t\tprint STDERR \"Data from a previous version of \",\n+\t\t\t\t     \"git-svnexists, but\\n\\t\",\n+\t\t\t\t     \"$svn_dir\\n\\t(required for this version \",\n+\t\t\t\t     \"($::VERSION) of git-svn) does not \",\n+\t\t\t\t     \"exist.\\n\";\n+\t\t}\n \t\tmy $dn = dirname(\"$svn_dir/$x\");\n \t\tmkpath([$dn]) unless -d $dn;\n \t\tif ($x eq 'svn') { # they used 'svn' as GIT_SVN_ID:\n \t\t\tmkpath([\"$svn_dir/svn\"]);\n \t\t\tprint STDERR \" - $git_dir/$x/info => \",\n \t\t\t                \"$svn_dir/$x/info\\n\";\n \t\t\trename \"$git_dir/$x/info\", \"$svn_dir/$x/info\" or\n \t\t\t       croak \"$!: $x\";\n \t\t\t# don't worry too much about these, they probably\n \t\t\t# don't exist with repos this old (save for index,\n@@ -120,21 +124,21 @@ sub migrate_from_v1 {\n \t\t\tforeach my $f (qw/unhandled.log index .rev_db/) {\n \t\t\t\trename \"$git_dir/$x/$f\", \"$svn_dir/$x/$f\";\n \t\t\t}\n \t\t} else {\n \t\t\tprint STDERR \" - $git_dir/$x => $svn_dir/$x\\n\";\n \t\t\trename \"$git_dir/$x\", \"$svn_dir/$x\" or croak \"$!: $x\";\n \t\t}\n \t\t$migrated++;\n \t}\n \tcommand_close_pipe($fh, $ctx);\n-\tprint STDERR \"Done migrating from a git-svn v1 layout\\n\";\n+\tprint STDERR \"Done migrating from a git-svn v1 layout\\n\" if $migrated;\n \t$migrated;\n }\n \n sub read_old_urls {\n \tmy ($l_map, $pfx, $path) = @_;\n \tmy @dir;\n \tforeach (<$path/*>) {\n \t\tif (-r \"$_/info/url\") {\n \t\t\t$pfx .= '/' if $pfx && $pfx !~ m!/$!;\n \t\t\tmy $ref_id = $pfx . basename $_;\ndiff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh\nindex 6d7d2aa491..a27f7f6171 100755\n--- a/t/t9107-git-svn-migrate.sh\n+++ b/t/t9107-git-svn-migrate.sh\n@@ -1,15 +1,22 @@\n #!/bin/sh\n # Copyright (c) 2006 Eric Wong\n test_description='git svn metadata migrations from previous versions'\n . ./lib-git-svn.sh\n \n+test_expect_success 'migrate is silent when there is nothing to migrate' '\n+\tgit svn migrate 2>err.log &&\n+\ttest_grep ! \"Migrating from a git-svn v1 layout\" err.log &&\n+\ttest_grep ! \"Data from a previous version of git-svn exists\" err.log &&\n+\t! test -d \"$GIT_DIR\"/svn\n+\t'\n+\n test_expect_success 'setup old-looking metadata' '\n \tcp \"$GIT_DIR\"/config \"$GIT_DIR\"/config-old-git-svn &&\n \tmkdir import &&\n \t(\n \t\tcd import &&\n \t\tfor i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3\n \t\tdo\n \t\t\tmkdir -p $i &&\n \t\t\techo hello >>$i/README ||\n \t\t\texit 1\n-- \n2.55.0.827.g48ce2c92dc\n\n"},{"id":"551382","messageId":"xmqqy0dr8npo.fsf@gitster.g","threadId":"66229","inReplyTo":"20260827165134.848207-2-wesleys@opperschaap.net","subject":"Re: [PATCH 1/2] git-svn: don't print v1-layout migration noise when there's nothing to migrate","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-08-27T17:42:11Z","receivedAt":"2026-08-27T17:42:14Z","isPatch":true,"body":"Wesley Schwengle <wesleys@opperschaap.net> writes:\n\n> -\tprint STDERR \"Migrating from a git-svn v1 layout...\\n\";\n> -\tmkpath([$svn_dir]);\n> -\tprint STDERR \"Data from a previous version of git-svn exists, but\\n\\t\",\n> -\t             \"$svn_dir\\n\\t(required for this version \",\n> -\t             \"($::VERSION) of git-svn) does not exist.\\n\";\n>  \tmy ($fh, $ctx) = command_output_pipe(qw/rev-parse --symbolic --all/);\n>  \twhile (<$fh>) {\n>  \t\tmy $x = $_;\n>  \t\tnext unless $x =~ s#^refs/remotes/##;\n>  \t\tchomp $x;\n>  \t\tmy $info_url = command_oneline(qw(rev-parse --git-path),\n>  \t\t\t\t\t\t\"$x/info/url\");\n>  \t\tnext unless -f $info_url;\n>  \t\tmy $u = eval { ::file_to_s($info_url) };\n>  \t\tnext unless $u;\n> +\t\tunless ($migrated) {\n> +\t\t\tprint STDERR \"Migrating from a git-svn v1 layout...\\n\";\n> +\t\t\tmkpath([$svn_dir]);\n> +\t\t\tprint STDERR \"Data from a previous version of \",\n> +\t\t\t\t     \"git-svnexists, but\\n\\t\",\n> +\t\t\t\t     \"$svn_dir\\n\\t(required for this version \",\n> +\t\t\t\t     \"($::VERSION) of git-svn) does not \",\n> +\t\t\t\t     \"exist.\\n\";\n> +\t\t}\n\nDelaying the initialization and messaging is a reasonable idea, but\nyou lost a SP in the message (there might be other changes I failed\nto spot---I wasn't especially being careful).\n\n>  \t\tmy $dn = dirname(\"$svn_dir/$x\");\n>  \t\tmkpath([$dn]) unless -d $dn;\n>  \t\tif ($x eq 'svn') { # they used 'svn' as GIT_SVN_ID:\n>  \t\t\tmkpath([\"$svn_dir/svn\"]);\n>  \t\t\tprint STDERR \" - $git_dir/$x/info => \",\n>  \t\t\t                \"$svn_dir/$x/info\\n\";\n>  \t\t\trename \"$git_dir/$x/info\", \"$svn_dir/$x/info\" or\n>  \t\t\t       croak \"$!: $x\";\n>  \t\t\t# don't worry too much about these, they probably\n>  \t\t\t# don't exist with repos this old (save for index,\n> @@ -120,21 +124,21 @@ sub migrate_from_v1 {\n>  \t\t\tforeach my $f (qw/unhandled.log index .rev_db/) {\n>  \t\t\t\trename \"$git_dir/$x/$f\", \"$svn_dir/$x/$f\";\n>  \t\t\t}\n>  \t\t} else {\n>  \t\t\tprint STDERR \" - $git_dir/$x => $svn_dir/$x\\n\";\n>  \t\t\trename \"$git_dir/$x\", \"$svn_dir/$x\" or croak \"$!: $x\";\n>  \t\t}\n>  \t\t$migrated++;\n>  \t}\n>  \tcommand_close_pipe($fh, $ctx);\n> -\tprint STDERR \"Done migrating from a git-svn v1 layout\\n\";\n> +\tprint STDERR \"Done migrating from a git-svn v1 layout\\n\" if $migrated;\n>  \t$migrated;\n>  }\n>  \n>  sub read_old_urls {\n>  \tmy ($l_map, $pfx, $path) = @_;\n>  \tmy @dir;\n>  \tforeach (<$path/*>) {\n>  \t\tif (-r \"$_/info/url\") {\n>  \t\t\t$pfx .= '/' if $pfx && $pfx !~ m!/$!;\n>  \t\t\tmy $ref_id = $pfx . basename $_;\n> diff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh\n> index 6d7d2aa491..a27f7f6171 100755\n> --- a/t/t9107-git-svn-migrate.sh\n> +++ b/t/t9107-git-svn-migrate.sh\n> @@ -1,15 +1,22 @@\n>  #!/bin/sh\n>  # Copyright (c) 2006 Eric Wong\n>  test_description='git svn metadata migrations from previous versions'\n>  . ./lib-git-svn.sh\n>  \n> +test_expect_success 'migrate is silent when there is nothing to migrate' '\n> +\tgit svn migrate 2>err.log &&\n> +\ttest_grep ! \"Migrating from a git-svn v1 layout\" err.log &&\n> +\ttest_grep ! \"Data from a previous version of git-svn exists\" err.log &&\n> +\t! test -d \"$GIT_DIR\"/svn\n> +\t'\n> +\n>  test_expect_success 'setup old-looking metadata' '\n>  \tcp \"$GIT_DIR\"/config \"$GIT_DIR\"/config-old-git-svn &&\n>  \tmkdir import &&\n>  \t(\n>  \t\tcd import &&\n>  \t\tfor i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3\n>  \t\tdo\n>  \t\t\tmkdir -p $i &&\n>  \t\t\techo hello >>$i/README ||\n>  \t\t\texit 1\n"},{"id":"551396","messageId":"20260827234345.1037130-2-wesleys@opperschaap.net","threadId":"66229","inReplyTo":"20260827234345.1037130-1-wesleys@opperschaap.net","subject":"[PATCH v2 1/2] git-svn: don't print v1-layout migration noise when there's nothing to migrate","fromName":"Wesley Schwengle","fromEmail":"wesleys@opperschaap.net","sentAt":"2026-08-27T23:43:44Z","receivedAt":"2026-08-27T23:43:59Z","isPatch":true,"body":"`migrate_from_v1()' unconditionally announced and created `.git/svn'\nwhen no legacy `refs/remotes/*' metadata existed to migrate. This\nhappens for example right after a `git init'.\n\nDefer the logic until an actual candidate is found, matching\nthe existing pattern of `migrate_from_v0'\n\nSigned-off-by: Wesley Schwengle <wesleys@opperschaap.net>\n---\n perl/Git/SVN/Migration.pm  | 16 ++++++++++------\n t/t9107-git-svn-migrate.sh |  7 +++++++\n 2 files changed, 17 insertions(+), 6 deletions(-)\n\ndiff --git a/perl/Git/SVN/Migration.pm b/perl/Git/SVN/Migration.pm\nindex ed96ac593e..65f6b393a0 100644\n--- a/perl/Git/SVN/Migration.pm\n+++ b/perl/Git/SVN/Migration.pm\n@@ -84,35 +84,39 @@ sub migrate_from_v0 {\n \n sub migrate_from_v1 {\n \tmy $git_dir = $ENV{GIT_DIR};\n \tmy $migrated = 0;\n \treturn $migrated unless -d $git_dir;\n \tmy $svn_dir = Git::SVN::svn_dir();\n \n \t# just in case somebody used 'svn' as their $id at some point...\n \treturn $migrated if -d $svn_dir && ! -f \"$svn_dir/info/url\";\n \n-\tprint STDERR \"Migrating from a git-svn v1 layout...\\n\";\n-\tmkpath([$svn_dir]);\n-\tprint STDERR \"Data from a previous version of git-svn exists, but\\n\\t\",\n-\t             \"$svn_dir\\n\\t(required for this version \",\n-\t             \"($::VERSION) of git-svn) does not exist.\\n\";\n \tmy ($fh, $ctx) = command_output_pipe(qw/rev-parse --symbolic --all/);\n \twhile (<$fh>) {\n \t\tmy $x = $_;\n \t\tnext unless $x =~ s#^refs/remotes/##;\n \t\tchomp $x;\n \t\tmy $info_url = command_oneline(qw(rev-parse --git-path),\n \t\t\t\t\t\t\"$x/info/url\");\n \t\tnext unless -f $info_url;\n \t\tmy $u = eval { ::file_to_s($info_url) };\n \t\tnext unless $u;\n+\t\tunless ($migrated) {\n+\t\t\tprint STDERR \"Migrating from a git-svn v1 layout...\\n\";\n+\t\t\tmkpath([$svn_dir]);\n+\t\t\tprint STDERR \"Data from a previous version of \",\n+\t\t\t\t     \"git-svn exists, but\\n\\t\",\n+\t\t\t\t     \"$svn_dir\\n\\t(required for this version \",\n+\t\t\t\t     \"($::VERSION) of git-svn) does not \",\n+\t\t\t\t     \"exist.\\n\";\n+\t\t}\n \t\tmy $dn = dirname(\"$svn_dir/$x\");\n \t\tmkpath([$dn]) unless -d $dn;\n \t\tif ($x eq 'svn') { # they used 'svn' as GIT_SVN_ID:\n \t\t\tmkpath([\"$svn_dir/svn\"]);\n \t\t\tprint STDERR \" - $git_dir/$x/info => \",\n \t\t\t                \"$svn_dir/$x/info\\n\";\n \t\t\trename \"$git_dir/$x/info\", \"$svn_dir/$x/info\" or\n \t\t\t       croak \"$!: $x\";\n \t\t\t# don't worry too much about these, they probably\n \t\t\t# don't exist with repos this old (save for index,\n@@ -120,21 +124,21 @@ sub migrate_from_v1 {\n \t\t\tforeach my $f (qw/unhandled.log index .rev_db/) {\n \t\t\t\trename \"$git_dir/$x/$f\", \"$svn_dir/$x/$f\";\n \t\t\t}\n \t\t} else {\n \t\t\tprint STDERR \" - $git_dir/$x => $svn_dir/$x\\n\";\n \t\t\trename \"$git_dir/$x\", \"$svn_dir/$x\" or croak \"$!: $x\";\n \t\t}\n \t\t$migrated++;\n \t}\n \tcommand_close_pipe($fh, $ctx);\n-\tprint STDERR \"Done migrating from a git-svn v1 layout\\n\";\n+\tprint STDERR \"Done migrating from a git-svn v1 layout\\n\" if $migrated;\n \t$migrated;\n }\n \n sub read_old_urls {\n \tmy ($l_map, $pfx, $path) = @_;\n \tmy @dir;\n \tforeach (<$path/*>) {\n \t\tif (-r \"$_/info/url\") {\n \t\t\t$pfx .= '/' if $pfx && $pfx !~ m!/$!;\n \t\t\tmy $ref_id = $pfx . basename $_;\ndiff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh\nindex 6d7d2aa491..a27f7f6171 100755\n--- a/t/t9107-git-svn-migrate.sh\n+++ b/t/t9107-git-svn-migrate.sh\n@@ -1,15 +1,22 @@\n #!/bin/sh\n # Copyright (c) 2006 Eric Wong\n test_description='git svn metadata migrations from previous versions'\n . ./lib-git-svn.sh\n \n+test_expect_success 'migrate is silent when there is nothing to migrate' '\n+\tgit svn migrate 2>err.log &&\n+\ttest_grep ! \"Migrating from a git-svn v1 layout\" err.log &&\n+\ttest_grep ! \"Data from a previous version of git-svn exists\" err.log &&\n+\t! test -d \"$GIT_DIR\"/svn\n+\t'\n+\n test_expect_success 'setup old-looking metadata' '\n \tcp \"$GIT_DIR\"/config \"$GIT_DIR\"/config-old-git-svn &&\n \tmkdir import &&\n \t(\n \t\tcd import &&\n \t\tfor i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3\n \t\tdo\n \t\t\tmkdir -p $i &&\n \t\t\techo hello >>$i/README ||\n \t\t\texit 1\n-- \n2.55.0.975.g5fa7c85aff\n\n"},{"id":"551397","messageId":"20260827234345.1037130-3-wesleys@opperschaap.net","threadId":"66229","inReplyTo":"20260827234345.1037130-1-wesleys@opperschaap.net","subject":"[PATCH v2 2/2] Makefile: add NO_GIT_SVN knob to skip building/installing git-svn","fromName":"Wesley Schwengle","fromEmail":"wesleys@opperschaap.net","sentAt":"2026-08-27T23:43:45Z","receivedAt":"2026-08-27T23:44:00Z","isPatch":true,"body":"This option also implies that NO_SVN_TESTS is enabled.\n\nSigned-off-by: Wesley Schwengle <wesleys@opperschaap.net>\n---\n Makefile | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/Makefile b/Makefile\nindex d4b775953d..e4b2f5fa0b 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -81,20 +81,23 @@ include shared.mak\n #\n # Define NO_SYS_SELECT_H if you don't have sys/select.h.\n #\n # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.\n # Enable it on Windows.  By default, symrefs are still used.\n #\n # Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability\n # tests.  These tests take up a significant amount of the total test time\n # but are not needed unless you plan to talk to SVN repos.\n #\n+# Define NO_GIT_SVN if you don't want git-svn built or installed at all.\n+# Implies NO_SVN_TESTS.\n+#\n # Define NO_FINK if you are building on Darwin/Mac OS X, have Fink\n # installed in /sw, but don't want GIT to link against any libraries\n # installed there.  If defined you may specify your own (or Fink's)\n # include directories and library directories by defining CFLAGS\n # and LDFLAGS appropriately.\n #\n # Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X,\n # have DarwinPorts (which is an old name for MacPorts) installed\n # in /opt/local, but don't want GIT to\n # link against any libraries installed there.  If defined you may\n@@ -741,21 +744,23 @@ SCRIPT_SH += git-web--browse.sh\n \n SCRIPT_LIB += git-mergetool--lib\n SCRIPT_LIB += git-sh-i18n\n SCRIPT_LIB += git-sh-setup\n \n SCRIPT_PERL += git-archimport.perl\n SCRIPT_PERL += git-cvsexportcommit.perl\n SCRIPT_PERL += git-cvsimport.perl\n SCRIPT_PERL += git-cvsserver.perl\n SCRIPT_PERL += git-send-email.perl\n+ifndef NO_GIT_SVN\n SCRIPT_PERL += git-svn.perl\n+endif\n \n SCRIPT_PYTHON += git-p4.py\n \n # Generated files for scripts\n SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))\n SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))\n SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))\n \n # Individual rules to allow e.g.\n # \"make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script\"\n@@ -3408,20 +3413,23 @@ $(test_bindir_programs): bin-wrappers/%: bin-wrappers/wrap-for-bin.sh\n \t     -e 's|@GITPERLLIB@|$(shell pwd)/perl/build/lib|' \\\n \t     -e 's|@MERGE_TOOLS_DIR@|$(shell pwd)/mergetools|' \\\n \t     -e 's|@TEMPLATE_DIR@|$(shell pwd)/templates/blt|' \\\n \t     -e 's|@PROG@|$(shell pwd)/$(patsubst test-%,t/helper/test-%,$(@F))$(if $(filter-out $(BINDIR_PROGRAMS_NO_X),$(@F)),$(X),)|' < $< > $@ && \\\n \tchmod +x $@\n \n # GNU make supports exporting all variables by \"export\" without parameters.\n # However, the environment gets quite big, and some programs have problems\n # with that.\n \n+ifdef NO_GIT_SVN\n+NO_SVN_TESTS = YesPlease\n+endif\n export NO_SVN_TESTS\n export TEST_NO_MALLOC_CHECK\n \n ### Testing rules\n \n test: all\n \t$(MAKE) -C t/ all\n ifdef TEST_CONTRIB_TOO\n \t$(MAKE) -C contrib/ test\n endif\n-- \n2.55.0.975.g5fa7c85aff\n\n"},{"id":"551398","messageId":"20260827234345.1037130-1-wesleys@opperschaap.net","threadId":"66229","inReplyTo":"xmqqy0dr8npo.fsf@gitster.g","subject":"[PATCH v2 0/2] git-svn: don't print v1-layout migration noise when there's nothing to migrate","fromName":"Wesley Schwengle","fromEmail":"wesleys@opperschaap.net","sentAt":"2026-08-27T23:43:43Z","receivedAt":"2026-08-27T23:44:04Z","isPatch":true,"body":"Sorry, I missed the space when I reworked the patch a bit before sending it.\nHere is the new patch set for the change.\n\nWesley Schwengle (2):\n  git-svn: don't print v1-layout migration noise when there's nothing to\n    migrate\n  Makefile: add NO_GIT_SVN knob to skip building/installing git-svn\n\n Makefile                   |  8 ++++++++\n perl/Git/SVN/Migration.pm  | 16 ++++++++++------\n t/t9107-git-svn-migrate.sh |  7 +++++++\n 3 files changed, 25 insertions(+), 6 deletions(-)\n\n-- \n2.55.0.975.g5fa7c85aff\n\n"}]}