We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bc646ee + 09bb3a7 commit 7b7be43Copy full SHA for 7b7be43
src/remote.rs
@@ -152,12 +152,14 @@ impl<'repo> Remote<'repo> {
152
153
/// Get the remote's pushurl.
154
///
155
- /// Returns `None` if the pushurl is not valid utf-8
+ /// Returns `None` if the pushurl is not valid utf-8 or no special url for pushing is set.
156
pub fn pushurl(&self) -> Option<&str> {
157
self.pushurl_bytes().and_then(|s| str::from_utf8(s).ok())
158
}
159
160
/// Get the remote's pushurl as a byte array.
161
+ ///
162
+ /// Returns `None` if no special url for pushing is set.
163
pub fn pushurl_bytes(&self) -> Option<&[u8]> {
164
unsafe { crate::opt_bytes(self, raw::git_remote_pushurl(&*self.raw)) }
165
0 commit comments