mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-11-10 12:09:33 +01:00
don't check ignored files when checking for uncommitted changes
This commit is contained in:
parent
85ee804919
commit
b2eec654b8
1 changed files with 3 additions and 1 deletions
|
@ -684,7 +684,9 @@ async fn checkout_pr(
|
|||
|
||||
let local_repo = git2::Repository::open(".").unwrap();
|
||||
|
||||
let has_no_uncommited = local_repo.statuses(None).unwrap().is_empty();
|
||||
let mut options = git2::StatusOptions::new();
|
||||
options.include_ignored(false);
|
||||
let has_no_uncommited = local_repo.statuses(Some(&mut options)).unwrap().is_empty();
|
||||
eyre::ensure!(
|
||||
has_no_uncommited,
|
||||
"Cannot checkout PR, working directory has uncommited changes"
|
||||
|
|
Loading…
Reference in a new issue