-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git test fix
loses new files that the fix command creates, even when git add
ed
#1406
Comments
git test fix
does not record new files command createsgit test fix
does not record new files that the fix command creates
git test fix
does not record new files that the fix command createsgit test fix
loses new files that the fix command creates
For a simpler reproduction, I'm also getting weird results with Another, closer, reproduction is to pick some |
I'm seeing the same issue on Linux with nix |
The intended design was to behave as if
Instead, the bug is about It's also more or less by design that files aren't cleaned up after running the command, specifically so that any build artifacts can be reused on subsequent invocations.
|
$ git branchless test fix 'HEAD' -x 'touch qq; git add qq'
branchless: running command: git diff --quiet
Calling Git for on-disk rebase...
branchless: running command: git rebase --continue
Stopped at f1d9556fd (merge_with_dbgonskipped)
Using command execution strategy: working-copy
2024-10-06T02:41:07.331950Z WARN git_branchless_test: There were staged changes or conflicts in the resulting working copy changes_type=Staged
branchless: running command: git rebase --abort
✓ Passed: f1d9556 merge_with_dbgonskipped
Ran command on 1 commit: touch qq; git add qq
1 passed, 0 failed, 0 skipped
No commits to fix. See also git-branchless/git-branchless-test/src/lib.rs Lines 2745 to 2754 in db7cc71
Note that the commit hasn't been changed in spite of
Indeed, if the intention was to act like
That makes sense to me, or rather it would make perfect sense if |
Looking at the warning message, I'm pretty sure that I just didn't implement it for staged changes. For the merge-conflict case, it's probably most pragmatic to produce an error. It might be ideal to warn about untracked changes (not sure if it would be noisy in practice?), but I suspect that our call to |
git test fix
loses new files that the fix command createsgit test fix
loses new files that the fix command creates, even when git add
ed
Description of the bug
I am on the
branchless-bug
branch of this repo: https://github.com/ilyagr/diffedit3/tree/branchless-bugI run:
Expected behavior
The second command should be a no-op.
Actual behavior
The second command creates two untracked files,
webapp/dist/assets/{index-Cpjzx5ek.js,index-Cpjzx5ek.js.map}
.For context,
npm run build
usesvite
, which usually includes a hash based on the file contents in the file name. So, runningnpm run build
normally replaces a filewebapp/dist/assets/index-RANDOM_HASH.js
withwebapp/dist/assets/index-DIFFERENT_RANDOM_HASH.js
.I also tried adjusting the first command to
git branchless test fix '0004d:dev' -x "npm ci && npm run build && git add :/"
, but that did not help (it did cause a warning about staged files to appear).Version of
rustc
No response
Automated bug report
Software version
git-branchless 0.9.0 (bc8aae7)
Operating system
macOS 14.7 (Darwin 23.6.0)
Command-line
Environment variables
Git version
Hooks
Show 7 hooks
Hook
post-applypatch
Hook
post-checkout
Hook
post-commit
Hook
post-merge
Hook
post-rewrite
Hook
pre-auto-gc
Hook
reference-transaction
Events
Show 5 events
Event ID: 1, transaction ID: 3 (message: test run)
WorkingCopySnapshot { timestamp: 1727575286.612582, event_tx_id: Id(3), head_oid: 77ca83fcdb9302631323bbd613d6810f9b8d6b54, commit_oid: NonZeroOid(822e98b30dffc26fa7171681a974181732669b8f), ref_name: None }
There are no previous available events.
There are no previous available events.
There are no previous available events.
There are no previous available events.
Version of
git-branchless
No response
Version of
git
No response
The text was updated successfully, but these errors were encountered: