All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Jean-Noël Avila" <jn.avila@free.fr>,
	"Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH 2/4] doc: git-svn: add missing config options to the documentation
Date: Tue, 24 Nov 2026 21:48:58 +0000	[thread overview]
Message-ID: <b6063c41e563697340d000969f61ce23f962d73b.1795556940.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2324.git.1795556940.gitgitgadget@gmail.com>

From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>

The configuration options of git-svn are not treated like the other
configuration options in the documentation. They are not listed in the
config.adoc file and they are not documented in a dedicated file.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
 Documentation/config.adoc     |   2 +
 Documentation/config/svn.adoc | 175 ++++++++++++++++++++++++++++++++++
 Documentation/git-svn.adoc    |  87 +----------------
 3 files changed, 178 insertions(+), 86 deletions(-)
 create mode 100644 Documentation/config/svn.adoc

diff --git a/Documentation/config.adoc b/Documentation/config.adoc
index aa6360e230..c853578cac 100644
--- a/Documentation/config.adoc
+++ b/Documentation/config.adoc
@@ -610,6 +610,8 @@ include::config/status.adoc[]
 
 include::config/submodule.adoc[]
 
+include::config/svn.adoc[]
+
 include::config/tag.adoc[]
 
 include::config/tar.adoc[]
diff --git a/Documentation/config/svn.adoc b/Documentation/config/svn.adoc
new file mode 100644
index 0000000000..19df43cf58
--- /dev/null
+++ b/Documentation/config/svn.adoc
@@ -0,0 +1,175 @@
+`svn.addAuthorFrom`::
+	Append a `From:` line based on the Git commit's author string when
+	committing to SVN from Git (as part of `set-tree` or `dcommit`
+	operations), if the existing log message doesn't already have a `From:`
+	or `Signed-off-by` trailer.  Using this together with `svn.useLogAuthor`
+	will retrieve a valid author string for all commits.
+
+`svn.authorsfile`::
+	Specify the path to the authors file used to map SVN committer names to
+	Git author identities.  The file uses the same syntax as `git cvsimport`,
+	with an optional empty email address written as `<>`.  If set and `git svn`
+	encounters an SVN committer name not present in the file, the operation
+	is aborted until the entry is added.
+
+`svn.authorsProg`::
+	Specify a program to execute for each SVN committer name not found in
+	the authors file.  The committer name is passed as the first argument;
+	the program must return a single line of the form `Name <email>` or
+	`Name <>`, which is treated as if it were an entry in the authors file.
++
+Due to historical reasons a relative filename is first searched relative
+to the current directory for `init` and `clone` and relative to the root
+of the working tree for `fetch`. If the filename is not found, it is
+searched like any other command in `$PATH`.
+
+`svn.edit`::
+	Open an editor for the commit message before committing to SVN.
+	This is off by default for commit objects and forced on when
+	committing tree objects.  Used with the `dcommit`, `set-tree` and
+	`commit-diff` commands.
+
+`svn.findcopiesharder`::
+`svn.l`::
+	Pass `--find-copies-harder` and `-l<num>` directly to
+	linkgit:git-diff-tree[1].  Used with the `dcommit`, `set-tree` and
+	`commit-diff` commands.
+
+`svn.followparent`::
+	Track the copy history of each tracked branch to determine a suitable
+	parent for the first Git commit on the branch.  This is especially
+	helpful when tracking a directory that has been moved around within the
+	repository.  Disabling this feature may speed up cloning.
+	Enabled by default; set to `false` to disable.
+
+`svn.noMetadata`::
+`svn-remote.<name>.noMetadata`::
+	Remove the `git-svn-id:` lines at the end of every commit.
++
+This option can only be used for one-shot imports as `git svn`
+will not be able to fetch again without metadata. Additionally,
+if you lose your `$GIT_DIR/svn/**/.rev_map.*` files, `git svn` will not
+be able to rebuild them.
++
+The `git svn log` command will not work on repositories using
+this, either.  Using this conflicts with the `useSvmProps`
+option for (hopefully) obvious reasons.
++
+This option is NOT recommended as it makes it difficult to track down
+old references to SVN revision numbers in existing documentation, bug
+reports, and archives.  If you plan to eventually migrate from SVN to
+Git and are certain about dropping SVN history, consider
+https://github.com/newren/git-filter-repo[git-filter-repo] instead.
+filter-repo also allows reformatting of metadata for ease-of-reading
+and rewriting authorship info for non-"svn.authorsFile" users.
+
+`svn.pushmergeinfo`::
+	Cause `git svn` to attempt to automatically populate the
+	`svn:mergeinfo` property in the SVN repository when possible.
+	Currently this can only be done when dcommitting non-fast-forward
+	merges where all parents but the first have already been pushed into SVN.
+
+`svn.rmdir`::
+	Remove directories from the SVN tree when they contain no files.
+	SVN can version empty directories; they are not removed by default
+	when all files are deleted.  Since Git cannot track empty directories,
+	enabling this flag makes commits to SVN behave more like Git.
+	Used with the `dcommit`, `set-tree` and `commit-diff` commands.
+
+`svn.useLogAuthor`::
+	Use the first `From:` line or `Signed-off-by` trailer found in the
+	log message as the author string when retrieving SVN commits into Git
+	(as part of `fetch`, `rebase`, or `dcommit` operations).
+
+`svn.useSvmProps`::
+`svn-remote.<name>.useSvmProps`::
+	Re-map repository URLs and UUIDs from mirrors created using SVN::Mirror
+	(or svk) for metadata.
++
+If an SVN revision has a property, `svm:headrev`, it is likely
+that the revision was created by SVN::Mirror (also used by SVK).
+The property contains a repository UUID and a revision.  We want
+to make it look like we are mirroring the original URL, so
+introduce a helper function that returns the original identity
+URL and UUID, and use it when generating metadata in commit
+messages.
+
+`svn.useSvnsyncProps`::
+`svn-remote.<name>.useSvnsyncprops`::
+	Re-map repository URLs and UUIDs for users of the `svnsync`(1) command
+	distributed with SVN 1.4.x and later, similar to the `useSvmProps` option.
+
+`svn.brokenSymlinkWorkaround`::
+	Disable potentially expensive checks to workaround broken symlinks checked
+	into SVN by broken clients.  Set this option to `false` if you track a
+	SVN repository with many empty blobs that are not symlinks.  This option
+	may be changed while `git svn` is running and take effect on the next
+	revision fetched.  If unset, `git svn` assumes this option to be `true`.
+
+`svn.pathnameencoding`::
+	Recode pathnames to a given encoding.
+	It can be used by Windows users and by those who work in non-UTF-8
+	locales to avoid corrupted file names with non-ASCII characters.
+	Valid encodings are the ones supported by Perl's Encode module.
+
+`svn-remote.<name>.automkdirs`::
+	Recreate empty directories that are in the Subversion repository.
+	Normally, the `git svn clone` and `git svn rebase` commands attempt to
+	do this automatically.  If this option is set to `false`, then empty
+	directories will only be created if the `git svn mkdirs` command is run
+	explicitly.  If unset, `git svn` assumes this option to be `true`.
+
+`svn-remote.<name>.commiturl`::
+`svn.commiturl`::
+	Specify the URL to use when committing to SVN (the full path).
+	`svn.commiturl` overrides the value for all `svn-remote.<name>.commiturl`
+	entries.  This allows repositories created with one transport method
+	(e.g. `svn://` or `http://` for anonymous read) to commit via an alternate
+	transport (e.g. `svn+ssh://` or `https://`).
++
+Note that the SVN URL of `commiturl` includes the SVN branch.  To set the
+commit URL for an entire SVN repository use `svn-remote.<name>.pushurl` instead.
++
+Using this option for any other purpose (don't ask) is very strongly discouraged.
+
+`svn-remote.<name>.ignore-paths`::
+	Specify a Perl regular expression to skip matching paths when
+	checking out from SVN.  The pattern is applied on every `fetch`,
+	including automatic fetches triggered by `clone`, `dcommit`,
+	`rebase`, etc.  If both this key and the `--ignore-paths` command-line
+	option are given, both regular expressions are applied.
+
+`svn-remote.<name>.ignore-refs`::
+	Specify a Perl regular expression to ignore matching branch or tag refs
+	when fetching.  A negative look-ahead assertion such as
+	`^refs/remotes/origin/(?!tags/wanted-tag|wanted-branch).*$`
+	can be used to allow only certain refs.  If both this key and the
+	`--ignore-refs` command-line option are given, both regular expressions
+	are applied.
+
+`svn-remote.<name>.include-paths`::
+	Specify a Perl regular expression so that only matching paths are
+	included when checking out from SVN.  The pattern is applied on every
+	`fetch`, including automatic fetches triggered by `clone`, `dcommit`,
+	`rebase`, etc.  `svn-remote.<name>.ignore-paths` takes precedence over
+	this key.
+
+`svn-remote.<name>.pushurl`::
+	Provide an alternate read/write transport for the SVN repository,
+	similar to Git's `remote.<name>.pushurl`.  This key is designed
+	to be used in cases where `url` points to an SVN repository
+	via a read-only transport. It is assumed that both keys point to the same
+	repository. Unlike `commiturl`, `pushurl` is a base path. If
+	either `commiturl` or `pushurl` could be used, `commiturl`
+	takes precedence.
+
+`svn-remote.<name>.rewriteRoot`::
+	Create repositories from alternate URLs.  For example, an administrator
+	could run `git svn` on the server locally (accessing via `file://`) but
+	wish to distribute the repository with a public `http://` or `svn://` URL
+	in the metadata so users of it will see the public URL.
+
+`svn-remote.<name>.rewriteUUID`::
+	Remap the UUID manually, similar to the `useSvmProps` option.
+	This may be useful in situations where the original UUID is not available
+	via either `useSvmProps` or `useSvnsyncProps`.
diff --git a/Documentation/git-svn.adoc b/Documentation/git-svn.adoc
index 597697d42d..ff8a3c2d39 100644
--- a/Documentation/git-svn.adoc
+++ b/Documentation/git-svn.adoc
@@ -756,92 +756,7 @@ config key: `svn.followparent`
 CONFIG FILE-ONLY OPTIONS
 ------------------------
 
-`svn.noMetadata`::
-`svn-remote.<name>.noMetadata`::
-	Remove the `git-svn-id:` lines at the end of every commit.
-+
-This option can only be used for one-shot imports as `git svn`
-will not be able to fetch again without metadata. Additionally,
-if you lose your `$GIT_DIR/svn/\**/.rev_map.*` files, `git svn` will not
-be able to rebuild them.
-+
-The `git svn log` command will not work on repositories using
-this, either.  Using this conflicts with the `useSvmProps`
-option for (hopefully) obvious reasons.
-+
-This option is NOT recommended as it makes it difficult to track down
-old references to SVN revision numbers in existing documentation, bug
-reports, and archives.  If you plan to eventually migrate from SVN to
-Git and are certain about dropping SVN history, consider
-https://github.com/newren/git-filter-repo[git-filter-repo] instead.
-filter-repo also allows reformatting of metadata for ease-of-reading
-and rewriting authorship info for non-"svn.authorsFile" users.
-
-`svn.useSvmProps`::
-`svn-remote.<name>.useSvmProps`::
-	Re-map repository URLs and UUIDs from
-	mirrors created using SVN::Mirror (or svk) for metadata.
-+
-If an SVN revision has a property, `svm:headrev`, it is likely
-that the revision was created by SVN::Mirror (also used by SVK).
-The property contains a repository UUID and a revision.  We want
-to make it look like we are mirroring the original URL, so
-introduce a helper function that returns the original identity
-URL and UUID, and use it when generating metadata in commit
-messages.
-
-`svn.useSvnsyncProps`::
-`svn-remote.<name>.useSvnsyncprops`::
-	Re-map repository URLs and UUIDs for users
-	of the `svnsync`(1) command distributed with SVN 1.4.x and
-	later, similar to the useSvmProps option.
-
-`svn-remote.<name>.rewriteRoot`::
-	Create repositories from alternate
-	URLs.  For example, an administrator could run `git svn` on the
-	server locally (accessing via `file://`) but wish to distribute
-	the repository with a public `http://` or `svn://` URL in the
-	metadata so users of it will see the public URL.
-
-`svn-remote.<name>.rewriteUUID`::
-	Remap the UUID manually, similar to the useSvmProps option.
-	This may be useful in situations
-	where the original UUID is not available via either useSvmProps
-	or useSvnsyncProps.
-
-`svn-remote.<name>.pushurl`::
-
-	Provide an alternate read/write transport for the SVN repository,
-	similar to Git's `remote.<name>.pushurl`.  This key is designed
-	to be used in cases where `url` points to an SVN repository
-	via a read-only transport. It is assumed that both keys point to the same
-	repository. Unlike `commiturl`, `pushurl` is a base path. If
-	either `commiturl` or `pushurl` could be used, `commiturl`
-	takes precedence.
-
-`svn.brokenSymlinkWorkaround`::
-	Disable potentially expensive checks to workaround
-	broken symlinks checked into SVN by broken clients.  Set this
-	option to "false" if you track a SVN repository with many
-	empty blobs that are not symlinks.  This option may be changed
-	while `git svn` is running and take effect on the next
-	revision fetched.  If unset, `git svn` assumes this option to
-	be "true".
-
-`svn.pathnameencoding`::
-	Recode pathnames to a given encoding.
-	It can be used by windows users and by those who work in non-utf8
-	locales to avoid corrupted file names with non-ASCII characters.
-	Valid encodings are the ones supported by Perl's Encode module.
-
-`svn-remote.<name>.automkdirs`::
-	Recreate empty directories that are in the
-	Subversion repository.  Normally, the `git svn clone` and
-	`git svn rebase` commands
-	attempt to do this automatically.  If this option is set to "false", then
-	empty directories will only be created if the `git svn mkdirs`
-	command is run explicitly.  If unset, `git svn` assumes this
-	option to be "true".
+include::config/svn.adoc[]
 
 Since the `noMetadata`, `rewriteRoot`, `rewriteUUID`, `useSvnsyncProps` and `useSvmProps`
 options all affect the metadata generated and used by `git svn`; they
-- 
gitgitgadget


  parent reply	other threads:[~2026-11-24 21:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 21:48 [PATCH 0/4] doc: convert git-svn, git-fast-{import,export} to synopsis Jean-Noël Avila via GitGitGadget
2026-11-24 21:48 ` [PATCH 1/4] doc: apply synopsis style conversion with git-svn Jean-Noël Avila via GitGitGadget
2026-11-25 16:27   ` Junio C Hamano
2026-11-24 21:48 ` Jean-Noël Avila via GitGitGadget [this message]
2026-11-25 14:14   ` [PATCH 2/4] doc: git-svn: add missing config options to the documentation Junio C Hamano
2026-11-24 21:48 ` [PATCH 3/4] doc: convert git-fast-import.adoc to synopsis style Jean-Noël Avila via GitGitGadget
2026-11-25 15:17   ` Junio C Hamano
2026-11-24 21:49 ` [PATCH 4/4] doc: convert git-fast-export.adoc " Jean-Noël Avila via GitGitGadget
2026-11-25  5:07   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6063c41e563697340d000969f61ce23f962d73b.1795556940.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jn.avila@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.