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(
111111 head_ref : Option < & str > ,
112112 head_ref_resolved : Option < & str > ,
113113) -> 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-
122114 let fetch_timer_ok = {
123115 if let Some ( last) = service. fetch_timers . read ( ) ?. get ( remote_url) {
124116 let since = std:: time:: Instant :: now ( ) . duration_since ( * last) ;
Original file line number Diff line number Diff line change 5454
5555 $ cd $ {TESTTMP}
5656
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-
6257Checks the following:
6358
64591 ) Two different formats for separating origin ref in the remote URL
@@ -135,6 +130,7 @@ Check (2) and (3) but with a branch ref
135130 | | `-- upstream
136131 | | `-- real_repo. git
137132 | | | -- HEAD
133+ | | | -- bb282e9cdc1b972fffd08fd21eead43bc0c83cb8
138134 | | `-- refs
139135 | | `-- heads
140136 | | | -- branch-1
@@ -154,5 +150,5 @@ Check (2) and (3) but with a branch ref
154150 | -- namespaces
155151 `-- tags
156152
157- 35 directories, 22 files
153+ 35 directories, 23 files
158154
You can’t perform that action at this time.
0 commit comments