Skip to content

Commit 7a43c55

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5034fde commit 7a43c55

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

Documentation/gitremote-helpers.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ ref.
174174
This capability can be advertised multiple times. The first
175175
applicable refspec takes precedence. The left-hand of refspecs
176176
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 *:*`.
179179

180180
'bidi-import'::
181181
This modifies the 'import' capability.

t/t5801-remote-helpers.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,21 +120,6 @@ test_expect_failure 'pushing without refspecs' '
120120
compare_refs local2 HEAD server HEAD
121121
'
122122

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-
138123
test_expect_success 'pulling without marks' '
139124
(cd local2 &&
140125
GIT_REMOTE_TESTGIT_NO_MARKS=1 git pull) &&

transport-helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ static int fetch_with_import(struct transport *transport,
469469
* were fetching.
470470
*
471471
* (If no "refspec" capability was specified, for historical
472-
* reasons we default to *:*.)
472+
* reasons we default to the equivalent of *:*.)
473473
*
474474
* Store the result in to_fetch[i].old_sha1. Callers such
475475
* as "git fetch" can use the value to write feedback to the

0 commit comments

Comments
 (0)