Closed scottjacobsen closed 1 month ago
It appears it is a conflict with overcommit
which clobbers the hooks installed by this project. Is it possible to "namespace" hooks so they don't collide, or is this a git limitation?
@scottjacobsen The lack of support for multiple hooks of a given kind is a Git limitation, but sounds like overcommit
itself is the solution for that?
git-branchless assumes that the hook is a shell script and then tries pretty hard to insert its own configuration without disturbing other configuration: https://github.com/arxanas/git-branchless/blob/ce1aa49015eacf68e1c3bfdd9dd0635bba9c5069/git-branchless-init/src/lib.rs#L151-L173
There is in principle support for using different hook management systems, if you wanted to try to add support for overcommit
: https://github.com/arxanas/git-branchless/blob/ce1aa49015eacf68e1c3bfdd9dd0635bba9c5069/git-branchless-init/src/lib.rs#L107-L121
As an ad-hoc solution, it seems like you should be able to add the git-branchless hooks to overcommit
: https://github.com/sds/overcommit?tab=readme-ov-file#adding-existing-git-hooks
I believe they're all invoked via git-branchless hook <name> <args>
. The hook interface can be found in the Git docs, or inferred from the CLI configuration here: https://github.com/arxanas/git-branchless/blob/ce1aa49015eacf68e1c3bfdd9dd0635bba9c5069/git-branchless-opts/src/lib.rs#L181-L236
Description of the bug
When I commit a few times and then run
git sl
I see this: ┃ ◯ aba6ab9 3m test ┃ ┃ ┃ ◯ b147149 2m test2 ┃ ┃ ┃ ● e37e0ee 6s test3Then when I run
git prev
I see this: ┃ ◯ aba6ab9 6m test ┃ ┃ ┃ ● b147149 4m test2Here I would still expect to see
e37e0ee
as the next commit but it seems hiddenThen I do:
And then I see: ┃ ◯ aba6ab9 8m test ┃ ┃ ┃ ● b147149 6m test2 ┃ ┃ ┃ ◯ e37e0ee 4m test3
After than I can do
git next
andgit prev
as usual. So it seems like new commits are defaulting to thehidden
state.Expected behavior
I expect new commits not to be hidden.
Actual behavior
New commits appear to be hidden after switching to a different commit.
Version of
rustc
No response
Automated bug report
No response
Version of
git-branchless
git-branchless-opts 0.8.0
Version of
git
git version 2.45.1