[Feature Request] Add commit being operated on as an arg to 'git test' #1346
-
So far as I know, there is no way to refer to the commit that a # Fail any commits that still have "TODO_BEFORE_SUBMIT" in their changes:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi there. It looks like this may already be supported via the
Although in this case, I wonder if you could bypass the env var entirely and just do Fair warning: I didn't test either of these, but maybe they're worth a shot. |
Beta Was this translation helpful? Give feedback.
Hi there. It looks like this may already be supported via the
$BRANCHLESS_TEST_COMMIT
env var. (I didn't see that mentioned in the wiki docs, but it looks like it's being injected in the code: https://github.com/arxanas/git-branchless/blob/master/git-branchless-test/src/lib.rs#L2645) Can you try this and see if it works for you:Although in this case, I wonder if you could bypass the env var entirely and just do
git diff @^
to get the diff for the current commit and its parent.Fair warning: I …