transport-helper: clarify *:* refspec

The *:* refspec doesn't work, and never has, clarify the code and documentation to reflect that. This in effect reverts commit 9e7673e (gitremote-helpers(1): clarify refspec behaviour). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed Apr 17, 2013 at 23:14 UTC 7a43c55415a224039a41684cbadd5b94be6f1a8e
3 files changed +3 -18
Documentation/gitremote-helpers.txt
+2 -2
@@ -174,8 +174,8 @@ ref.
174 This capability can be advertised multiple times. The first
175 applicable refspec takes precedence. The left-hand of refspecs
176 advertised with this capability must cover all refs reported by
177 -the list command. If a helper does not need a specific 'refspec'
178 -capability then it should advertise `refspec *:*`.
177 +the list command. If no 'refspec' capability is advertised,
178 +there is an implied `refspec *:*`.
179
180 'bidi-import'::
181 This modifies the 'import' capability.
t/t5801-remote-helpers.sh
-15
@@ -120,21 +120,6 @@ test_expect_failure 'pushing without refspecs' '
120 compare_refs local2 HEAD server HEAD
121 '
122
123 -test_expect_success 'pulling with straight refspec' '
124 - (cd local2 &&
125 - GIT_REMOTE_TESTGIT_REFSPEC="*:*" git pull) &&
126 - compare_refs local2 HEAD server HEAD
127 -'
128 -
129 -test_expect_failure 'pushing with straight refspec' '
130 - test_when_finished "(cd local2 && git reset --hard origin)" &&
131 - (cd local2 &&
132 - echo content >>file &&
133 - git commit -a -m eleven &&
134 - GIT_REMOTE_TESTGIT_REFSPEC="*:*" git push) &&
135 - compare_refs local2 HEAD server HEAD
136 -'
137 -
123 test_expect_success 'pulling without marks' '
124 (cd local2 &&
125 GIT_REMOTE_TESTGIT_NO_MARKS=1 git pull) &&
transport-helper.c
+1 -1
@@ -469,7 +469,7 @@ static int fetch_with_import(struct transport *transport,
469 * were fetching.
470 *
471 * (If no "refspec" capability was specified, for historical
472 - * reasons we default to *:*.)
472 + * reasons we default to the equivalent of *:*.)
473 *
474 * Store the result in to_fetch[i].old_sha1. Callers such
475 * as "git fetch" can use the value to write feedback to the