mirror of
https://github.com/msfjarvis/gitice.git
synced 2024-06-03 03:58:56 +05:30
Unwrap upstream URL to prevent obscure panics
Signed-off-by: ATechnoHazard <amolele@gmail.com>
This commit is contained in:
parent
ed35930562
commit
7b3d457c62
19
gitice.lock
Normal file
19
gitice.lock
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
["../gitice"]
|
||||||
|
path = "../gitice"
|
||||||
|
remote_url = "git@github.com:msfjarvis/gitice.git"
|
||||||
|
head = "refs/heads/persist-into-lockfile"
|
||||||
|
|
||||||
|
["../katbin"]
|
||||||
|
path = "../katbin"
|
||||||
|
remote_url = "git@github.com:ATechnoHazard/katbin.git"
|
||||||
|
head = "refs/heads/master"
|
||||||
|
|
||||||
|
["../rust-rocket-template"]
|
||||||
|
path = "../rust-rocket-template"
|
||||||
|
remote_url = "git@github.com:GDGVIT/rust-rocket-template.git"
|
||||||
|
head = "refs/heads/master"
|
||||||
|
|
||||||
|
["../healthchecks-rs"]
|
||||||
|
path = "../healthchecks-rs"
|
||||||
|
remote_url = "git@github.com:ATechnoHazard/healthchecks-rs.git"
|
||||||
|
head = "refs/heads/develop"
|
|
@ -37,11 +37,7 @@ fn main() -> anyhow::Result<()> {
|
||||||
if let Ok(remote) = repo.find_remote(
|
if let Ok(remote) = repo.find_remote(
|
||||||
// This is a rather ugly hack, but not sure how else to get the required name
|
// This is a rather ugly hack, but not sure how else to get the required name
|
||||||
// doesn't seem to work with the full name such as `refs/remotes/origin/master`
|
// doesn't seem to work with the full name such as `refs/remotes/origin/master`
|
||||||
upstream
|
upstream.as_str().unwrap().split('/').collect::<Vec<&str>>()[2],
|
||||||
.as_str()
|
|
||||||
.unwrap_or("None")
|
|
||||||
.split('/')
|
|
||||||
.collect::<Vec<&str>>()[2],
|
|
||||||
) {
|
) {
|
||||||
let path = entry.path().to_string_lossy().to_string();
|
let path = entry.path().to_string_lossy().to_string();
|
||||||
repos.insert(
|
repos.insert(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user