Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Documentation/config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ include::config/status.adoc[]

include::config/submodule.adoc[]

include::config/svn.adoc[]

include::config/tag.adoc[]

include::config/tar.adoc[]
Expand Down
2 changes: 1 addition & 1 deletion Documentation/config/fastimport.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fastimport.unpackLimit::
`fastimport.unpackLimit`::
If the number of objects imported by linkgit:git-fast-import[1]
is below this limit, then the objects will be unpacked into
loose object files. However, if the number of imported objects
Expand Down
175 changes: 175 additions & 0 deletions Documentation/config/svn.adoc
Original file line number Diff line number Diff line change
@@ -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`.
Loading
Loading