remotemobprogramming / mob

Tool for smooth git handover.
https://mob.sh
MIT License
1.66k stars 149 forks source link

MOB_GIT_HOOKS_ENABLED not respected? #396

Closed mightyiam closed 12 months ago

mightyiam commented 1 year ago

Either I'm doing something silly or MOB_GIT_HOOKS_ENABLED is not respected.

I'm issuing mob start on some new branch. As expected, mob issues git commit --allow-empty -m 'mob start [ci-skip] [ci skip] [skip ci]'. But the --no-verify is missing, causing some hook to run (which is not desired) and fail (which is blocking).

This, I figured by looking at the error line:

ERROR git commit --allow-empty -m mob start [ci-skip] [ci skip] [skip ci]

And I figured that MOB_GIT_HOOKS_ENABLED is false by default by running mob config:

MOB_CLI_NAME="mob"
MOB_REMOTE_NAME="origin"
MOB_WIP_COMMIT_MESSAGE="mob next [ci-skip] [ci skip] [skip ci]"
MOB_START_COMMIT_MESSAGE="mob start [ci-skip] [ci skip] [skip ci]"
MOB_GIT_HOOKS_ENABLED=false
MOB_REQUIRE_COMMIT_MESSAGE=false
MOB_VOICE_COMMAND="/nix/store/wbh0fq67p1anmw2m0i9p0pjzg15n8m61-espeak-ng-1.51.1/bin/espeak"
MOB_VOICE_MESSAGE="mob next"
MOB_NOTIFY_COMMAND="notify-send \"%s\""
MOB_NOTIFY_MESSAGE="mob next"
MOB_NEXT_STAY=true
MOB_STASH_NAME="mob-stash-name"
MOB_WIP_BRANCH_QUALIFIER=""
MOB_WIP_BRANCH_QUALIFIER_SEPARATOR="-"
MOB_WIP_BRANCH_PREFIX="mob/"
MOB_DONE_SQUASH=squash
MOB_OPEN_COMMAND=""
MOB_TIMER=""
MOB_TIMER_ROOM="standard-with-typescript"
MOB_TIMER_ROOM_USE_WIP_BRANCH_QUALIFIER=false
MOB_TIMER_LOCAL=true
MOB_TIMER_USER=""
MOB_TIMER_URL="https://timer.mob.sh/"
MOB_TIMER_INSECURE=false

A workaround would be to disable the hooks... which I don't like. Or to find an older version of mob that doesn't suffer this problem. But I'm not sure yet what version introduced this.

By the way, #374 may be the same issue.

hollesse commented 1 year ago

Hey @mightyiam thank you for that well described bug report. I think this bug was introduced with version 4.2.0. May you could check if it works with version 4.1.2. I think I also identified the line I need to change. But unfortunately I am on a weekend trip right now and do not have my computer with me. I will have a deeper look on Monday when I am back.

mightyiam commented 12 months ago

Thank you!