mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-03 15:33:13 +03:00
Merge pull request #1464 from gitbutlerapp/handle-missing-default-target
🔧 fix: handle case when default target is not set
This commit is contained in:
commit
b896c34b70
@ -94,7 +94,12 @@ impl HandlerInner {
|
||||
user.as_ref(),
|
||||
)
|
||||
.context("failed to open repository")?;
|
||||
let default_target = gb_repo.default_target()?.context("target not set")?;
|
||||
|
||||
let default_target = if let Some(target) = gb_repo.default_target()? {
|
||||
target
|
||||
} else {
|
||||
return Ok(vec![]);
|
||||
};
|
||||
|
||||
let credentials = git::credentials::Factory::new(
|
||||
&project,
|
||||
|
Loading…
Reference in New Issue
Block a user