4 ms·
Can't git-bisect simply ignore commits with a commit message smaller than N characters?
by amelius 1y ago
Can't git-bisect simply ignore commits with a commit message smaller than N characters?
- lambdaone 1y agoThat might sound facile, but it's actually a great idea. Being able to ignore commits based on regexes would be even more powerful.
- s_gourichon 1y agoNot sure it really has huge benefits, but I guess something like this should work: ``` #!/bin/sh N=20 msg_len=$(git log -1 --pretty=%B | wc -c) if [ "$msg_len" -lt "$N" ]; then exit 125 fi # Here you would run your actual test and report 0 (good), 1 (bad) as needed exit 0 ```
- lmm 1y agoYes - or, being more principled, you can tell it to only use mainline commits (first parent) if landing on a whole PR is what you want.