git test
#643
arxanas
started this conversation in
Show and tell
`git test`
#643
Replies: 1 comment 2 replies
-
Here's an example of caching in practice. Notice that we still cache the results of the last commit in the stack because results are cached by tree hash rather than commit hash. git-test-cached.mov |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In v0.6.0-rc.1,
git test
is a sort of replacement for pre-commit hooks. You can use it to run checks on an arbitrary set of commits. For example, in this video, I run the Rust formatter to verify that all commits in the current stack are correctly formatted:git-test.mov
I find this useful in patch-stack workflows, where I want to make sure that all commits in the stack pass formatting/linting/testing. You can find the documentation at Command: git test. I also find it useful if I want to run a check without switching away from the current commit, as
git test
knows how to create a worktree to run the test with. It also knows how to run commands in parallel, which is useful for low-concurrency or I/O-bound checks.Currently not implemented:
Beta Was this translation helpful? Give feedback.
All reactions