We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f095112 + f0847fc commit a3b90cbCopy full SHA for a3b90cb
src/remote.rs
@@ -147,7 +147,7 @@ impl<'repo> Remote<'repo> {
147
148
/// Get the remote's URL as a byte array.
149
pub fn url_bytes(&self) -> &[u8] {
150
- unsafe { crate::opt_bytes(self, raw::git_remote_url(&*self.raw)).unwrap() }
+ unsafe { crate::opt_bytes(self, raw::git_remote_url(&*self.raw)).unwrap_or(&[]) }
151
}
152
153
/// Get the remote's pushurl.
0 commit comments