diff options
| author | Soispha Peetz <soispha@b-peetz.de> | 2026-12-02 18:22:37 +0100 |
|---|---|---|
| committer | Soispha Peetz <soispha@b-peetz.de> | 2026-12-03 23:17:01 +0100 |
| commit | b28137d8f89a4f532a9e830931159077e31584f3 (patch) | |
| tree | 8c707f34066eef124b9773eca6111fa8332d6582 /pkgs/by-name/ro/rollup/src | |
| parent | treewide: Update (diff) | |
| download | nixos-config-b28137d8f89a4f532a9e830931159077e31584f3.zip | |
pkgs/rollup: Also check if the `owner`'s tree is dirty in the general check
Otherwise, we already advance the tag but refuse to apply the patches.
Diffstat (limited to 'pkgs/by-name/ro/rollup/src')
| -rw-r--r-- | pkgs/by-name/ro/rollup/src/main.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/by-name/ro/rollup/src/main.rs b/pkgs/by-name/ro/rollup/src/main.rs index 0150ca4b..7b7343a4 100644 --- a/pkgs/by-name/ro/rollup/src/main.rs +++ b/pkgs/by-name/ro/rollup/src/main.rs @@ -268,16 +268,6 @@ fn apply_patches( eprintln!("Successfully parsed all {} patch files.", patches.len()); - { - let (stdout, _) = git!(in applies_to; "status", "--porcelain"); - if !stdout.is_empty() { - bail!( - "`--to` (`{}`) workspace is dirty, refusing to continue.", - applies_to.display() - ); - } - } - for (idx, patch) in patches.iter().enumerate() { eprintln!( "Applying {}. patch: `{}`... ", @@ -405,6 +395,17 @@ fn check_owner(owner: &Owner) -> Result<()> { bail!("To directory (`{}`) is not readable", to.display()); } + { + let (stdout, _) = git!(in owner.applies_to; "status", "--porcelain"); + if !stdout.is_empty() { + bail!( + "owners (`{}`) workspace (`{}`) is dirty, refusing to continue.", + owner.name, + owner.applies_to.display() + ); + } + } + Ok(()) } |
