auto-rebase: add -f to the filter-branch invocation#432514
Conversation
...because it tells me to do so:
+ git filter-branch --parent-filter 'sed '\''s/2140bf39e41767f25a395d20fb0d5698b8934b33/374e6bcc403e02a35e07b650463c01a52b13a7c8/'\''' --tree-filter 'nix-shell --run treefmt' 374e6bc..HEAD
Cannot create a new backup.
A previous backup already exists in refs/original/
Force overwriting the backup with -f
|
That beign said, I get unrelated conflicts in Nix snippets in markdown files. So it seems the treefmt.toml is somewhat off? |
|
Yeah, the first commit from the patchset I rebased contains every single Nix-in-markdown snippet reformatted 🤡 |
This means you likely ran an outdated version of Edit: Although... if you get the reformatting for the codeblocks, but their format changes.. that looks more like "latest treefmt, but outdated |
Probably. I guess I should revise my entire dev setup for nixpkgs now to avoid further of these issues. The change itself should still be valid, no? @wolfgangwalther |
|
tbh, I don't know whether that's the correct change or whether it should not even get there, so something else would be off. I have never used that script myself either. |
|
ping @infinisil then. |
|
ping @NixOS/nix-formatting |
|
I didn't manage to reproduce the issue What's the diff you're actually encountering in the markdown files? |
|
Iirc the script also failed for me when I actually wanted to use it in practice. Pretty disappointing because I even wrote a test for it :/ Regardless, this change is fine imo |
jfly
left a comment
There was a problem hiding this comment.
Honestly have very little context on this codepath, but it seems low-risk to me, as we have branch protection enabled in this repo.
| # - The tree filter runs the command on each of our own commits, | ||
| # effectively reapplying it. | ||
| FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch \ | ||
| FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch -f \ |
There was a problem hiding this comment.
Personally I'd prefer to use verbose CLI flags in script sources, as they add additional self-documenting context.
| FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch -f \ | |
| FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --force \ |
...because it tells me to do so:
If this is the wrong thing to do, feel free to propose a better solution. I just want this to work somewhat reliably.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.