Skip to content

Commit 9f03176

Browse files
committed
Merge branch 'jk/drop-rsync-transport'
It turns out "git clone" over rsync transport has been broken when the source repository has packed references for a long time, and nobody noticed nor complained about it. * jk/drop-rsync-transport: transport: drop support for git-over-rsync
2 parents 4943984 + 0d0bac6 commit 9f03176

File tree

10 files changed

+10
-395
lines changed

10 files changed

+10
-395
lines changed

Documentation/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,7 @@ pack.indexVersion::
21222122
larger than 2 GB.
21232123
+
21242124
If you have an old Git that does not understand the version 2 `*.idx` file,
2125-
cloning or fetching over a non native protocol (e.g. "http" and "rsync")
2125+
cloning or fetching over a non native protocol (e.g. "http")
21262126
that will copy both `*.pack` file and corresponding `*.idx` file from the
21272127
other side may give you a repository that cannot be accessed with your
21282128
older version of Git. If the `*.pack` file is smaller than 2 GB, however,

Documentation/git-bundle.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DESCRIPTION
2020
Some workflows require that one or more branches of development on one
2121
machine be replicated on another machine, but the two machines cannot
2222
be directly connected, and therefore the interactive Git protocols (git,
23-
ssh, rsync, http) cannot be used. This command provides support for
23+
ssh, http) cannot be used. This command provides support for
2424
'git fetch' and 'git pull' to operate by packaging objects and references
2525
in an archive at the originating machine, then importing those into
2626
another repository using 'git fetch' and 'git pull'

Documentation/git-clone.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ objects from the source repository into a pack in the cloned repository.
115115
--quiet::
116116
-q::
117117
Operate quietly. Progress is not reported to the standard
118-
error stream. This flag is also passed to the `rsync'
119-
command when given.
118+
error stream.
120119

121120
--verbose::
122121
-v::

Documentation/git-repack.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ By default, the command passes `--delta-base-offset` option to
133133
'git pack-objects'; this typically results in slightly smaller packs,
134134
but the generated packs are incompatible with versions of Git older than
135135
version 1.4.4. If you need to share your repository with such ancient Git
136-
versions, either directly or via the dumb http or rsync protocol, then you
136+
versions, either directly or via the dumb http protocol, then you
137137
need to set the configuration variable `repack.UseDeltaBaseOffset` to
138138
"false" and repack. Access from old Git versions over the native protocol
139139
is unaffected by this option as the conversion is performed on the fly

Documentation/git.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,8 +1124,6 @@ of clones and fetches.
11241124
- `ssh`: git over ssh (including `host:path` syntax,
11251125
`git+ssh://`, etc).
11261126

1127-
- `rsync`: git over rsync
1128-
11291127
- `http`: git over http, both "smart http" and "dumb http".
11301128
Note that this does _not_ include `https`; if you want both,
11311129
you should specify both as `http:https`.

Documentation/gitcore-tutorial.txt

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ files).
710710
Again, this can all be simplified with
711711

712712
----------------
713-
$ git clone rsync://rsync.kernel.org/pub/scm/git/git.git/ my-git
713+
$ git clone git://git.kernel.org/pub/scm/git/git.git/ my-git
714714
$ cd my-git
715715
$ git checkout
716716
----------------
@@ -1011,20 +1011,6 @@ $ git fetch <remote-repository>
10111011
One of the following transports can be used to name the
10121012
repository to download from:
10131013

1014-
Rsync::
1015-
`rsync://remote.machine/path/to/repo.git/`
1016-
+
1017-
Rsync transport is usable for both uploading and downloading,
1018-
but is completely unaware of what git does, and can produce
1019-
unexpected results when you download from the public repository
1020-
while the repository owner is uploading into it via `rsync`
1021-
transport. Most notably, it could update the files under
1022-
`refs/` which holds the object name of the topmost commits
1023-
before uploading the files in `objects/` -- the downloader would
1024-
obtain head commit object name while that object itself is still
1025-
not available in the repository. For this reason, it is
1026-
considered deprecated.
1027-
10281014
SSH::
10291015
`remote.machine:/path/to/repo.git/` or
10301016
+
@@ -1430,7 +1416,7 @@ while, depending on how active your project is.
14301416

14311417
When a repository is synchronized via `git push` and `git pull`
14321418
objects packed in the source repository are usually stored
1433-
unpacked in the destination, unless rsync transport is used.
1419+
unpacked in the destination.
14341420
While this allows you to use different packing strategies on
14351421
both ends, it also means you may need to repack both
14361422
repositories every once in a while.

Documentation/gittutorial.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ perform clones and pulls using the ssh protocol:
451451
bob$ git clone alice.org:/home/alice/project myrepo
452452
-------------------------------------
453453

454-
Alternatively, Git has a native protocol, or can use rsync or http;
454+
Alternatively, Git has a native protocol, or can use http;
455455
see linkgit:git-pull[1] for details.
456456

457457
Git can also be used in a CVS-like mode, with a central repository

Documentation/urls.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ Depending on the transport protocol, some of this information may be
77
absent.
88

99
Git supports ssh, git, http, and https protocols (in addition, ftp,
10-
and ftps can be used for fetching and rsync can be used for fetching
11-
and pushing, but these are inefficient and deprecated; do not use
12-
them).
10+
and ftps can be used for fetching, but this is inefficient and
11+
deprecated; do not use it).
1312

1413
The native transport (i.e. git:// URL) does no authentication and
1514
should be used with caution on unsecured networks.
@@ -20,7 +19,6 @@ The following syntaxes may be used with them:
2019
- git://host.xz{startsb}:port{endsb}/path/to/repo.git/
2120
- http{startsb}s{endsb}://host.xz{startsb}:port{endsb}/path/to/repo.git/
2221
- ftp{startsb}s{endsb}://host.xz{startsb}:port{endsb}/path/to/repo.git/
23-
- rsync://host.xz/path/to/repo.git/
2422

2523
An alternative scp-like syntax may also be used with the ssh protocol:
2624

t/t5510-fetch.sh

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -314,42 +314,6 @@ test_expect_success 'bundle should be able to create a full history' '
314314
315315
'
316316

317-
! rsync --help > /dev/null 2> /dev/null &&
318-
say 'Skipping rsync tests because rsync was not found' || {
319-
test_expect_success 'fetch via rsync' '
320-
git pack-refs &&
321-
mkdir rsynced &&
322-
(cd rsynced &&
323-
git init --bare &&
324-
git fetch "rsync:../.git" master:refs/heads/master &&
325-
git gc --prune &&
326-
test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
327-
git fsck --full)
328-
'
329-
330-
test_expect_success 'push via rsync' '
331-
mkdir rsynced2 &&
332-
(cd rsynced2 &&
333-
git init) &&
334-
(cd rsynced &&
335-
git push "rsync:../rsynced2/.git" master) &&
336-
(cd rsynced2 &&
337-
git gc --prune &&
338-
test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
339-
git fsck --full)
340-
'
341-
342-
test_expect_success 'push via rsync' '
343-
mkdir rsynced3 &&
344-
(cd rsynced3 &&
345-
git init) &&
346-
git push --all "rsync:rsynced3/.git" &&
347-
(cd rsynced3 &&
348-
test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
349-
git fsck --full)
350-
'
351-
}
352-
353317
test_expect_success 'fetch with a non-applying branch.<name>.merge' '
354318
git config branch.master.remote yeti &&
355319
git config branch.master.merge refs/heads/bigfoot &&

0 commit comments

Comments
 (0)