Search code examples
gitgit-bisect

Can I make git bisect display shortened commit SHAs?


Running git bisect generates output like this after each bisection:

Bisecting: 22 revisions left to test after this (roughly 5 steps)
[123fedacc728b985d4f8d010e2a69dcbdcbf3e8e] use binascii module for hex/binary conversions

Can I make it use partial commit name prefixes, similar to those used in git log --abbrev-commit? Something like this:

Bisecting: 22 revisions left to test after this (roughly 5 steps)
[123feda] use binascii module for hex/binary conversions

Solution

  • No. The source for git bisect allots memory for a full hash and a terminator. It'd probably be easy to patch in a flag, however. You might try sending one to the git list if you think it's a worthy addition to git.