@@ -2,7 +2,9 @@ use crate::{bstr::BStr, remote, Remote};
2
2
3
3
/// Builder methods
4
4
impl Remote < ' _ > {
5
- /// Set the `url` to be used when fetching data from a remote.
5
+ /// Override the `url` to be used when fetching data from a remote.
6
+ ///
7
+ /// Note that this URL is typically set during instantiation with [`crate::Repository::remote_at()`].
6
8
pub fn with_url < Url , E > ( self , url : Url ) -> Result < Self , remote:: init:: Error >
7
9
where
8
10
Url : TryInto < gix_url:: Url , Error = E > ,
@@ -16,6 +18,8 @@ impl Remote<'_> {
16
18
17
19
/// Set the `url` to be used when fetching data from a remote, without applying rewrite rules in case these could be faulty,
18
20
/// eliminating one failure mode.
21
+ ///
22
+ /// Note that this URL is typically set during instantiation with [`crate::Repository::remote_at_without_url_rewrite()`].
19
23
pub fn with_url_without_url_rewrite < Url , E > ( self , url : Url ) -> Result < Self , remote:: init:: Error >
20
24
where
21
25
Url : TryInto < gix_url:: Url , Error = E > ,
@@ -28,7 +32,17 @@ impl Remote<'_> {
28
32
}
29
33
30
34
/// Set the `url` to be used when pushing data to a remote.
35
+ #[ deprecated = "Use `with_push_url()` instead" ]
31
36
pub fn push_url < Url , E > ( self , url : Url ) -> Result < Self , remote:: init:: Error >
37
+ where
38
+ Url : TryInto < gix_url:: Url , Error = E > ,
39
+ gix_url:: parse:: Error : From < E > ,
40
+ {
41
+ self . with_push_url ( url)
42
+ }
43
+
44
+ /// Set the `url` to be used when pushing data to a remote.
45
+ pub fn with_push_url < Url , E > ( self , url : Url ) -> Result < Self , remote:: init:: Error >
32
46
where
33
47
Url : TryInto < gix_url:: Url , Error = E > ,
34
48
gix_url:: parse:: Error : From < E > ,
@@ -41,7 +55,18 @@ impl Remote<'_> {
41
55
42
56
/// Set the `url` to be used when pushing data to a remote, without applying rewrite rules in case these could be faulty,
43
57
/// eliminating one failure mode.
58
+ #[ deprecated = "Use `with_push_url_without_rewrite()` instead" ]
44
59
pub fn push_url_without_url_rewrite < Url , E > ( self , url : Url ) -> Result < Self , remote:: init:: Error >
60
+ where
61
+ Url : TryInto < gix_url:: Url , Error = E > ,
62
+ gix_url:: parse:: Error : From < E > ,
63
+ {
64
+ self . with_push_url_without_url_rewrite ( url)
65
+ }
66
+
67
+ /// Set the `url` to be used when pushing data to a remote, without applying rewrite rules in case these could be faulty,
68
+ /// eliminating one failure mode.
69
+ pub fn with_push_url_without_url_rewrite < Url , E > ( self , url : Url ) -> Result < Self , remote:: init:: Error >
45
70
where
46
71
Url : TryInto < gix_url:: Url , Error = E > ,
47
72
gix_url:: parse:: Error : From < E > ,
0 commit comments