File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -111,14 +111,6 @@ fn fetch_needed(
111
111
head_ref : Option < & str > ,
112
112
head_ref_resolved : Option < & str > ,
113
113
) -> Result < bool , FetchError > {
114
- if let Some ( head_ref) = head_ref {
115
- if head_ref != "HEAD" && !head_ref. starts_with ( "refs/" ) {
116
- // If the request is for fetching a sha, don't fetch, as most upstreams
117
- // don't support that. The rev should have been fetched previously by reference.
118
- return Ok ( false ) ;
119
- }
120
- }
121
-
122
114
let fetch_timer_ok = {
123
115
if let Some ( last) = service. fetch_timers . read ( ) ?. get ( remote_url) {
124
116
let since = std:: time:: Instant :: now ( ) . duration_since ( * last) ;
Original file line number Diff line number Diff line change 54
54
55
55
$ cd $ {TESTTMP}
56
56
57
- $ git ls-remote http: // localhost: 8002 / real_repo. git | tr ' \t' ' '
58
- bb282e9cdc1b972fffd08fd21eead43bc0c83cb8 HEAD
59
- 36 c6ab9d481503e14a88f783e87f3791aa8cef99 refs/ heads/ branch-1
60
- bb282e9cdc1b972fffd08fd21eead43bc0c83cb8 refs/ heads/ master
61
-
62
57
Checks the following:
63
58
64
59
1 ) Two different formats for separating origin ref in the remote URL
@@ -135,6 +130,7 @@ Check (2) and (3) but with a branch ref
135
130
| | `-- upstream
136
131
| | `-- real_repo. git
137
132
| | | -- HEAD
133
+ | | | -- bb282e9cdc1b972fffd08fd21eead43bc0c83cb8
138
134
| | `-- refs
139
135
| | `-- heads
140
136
| | | -- branch-1
@@ -154,5 +150,5 @@ Check (2) and (3) but with a branch ref
154
150
| -- namespaces
155
151
`-- tags
156
152
157
- 35 directories, 22 files
153
+ 35 directories, 23 files
158
154
You can’t perform that action at this time.
0 commit comments