I’m not sure I understand what issue Linus et al. are trying to solve. If the full hash is used whenever a commit reference is saved somewhere, then why does it matter how core.abbrev
is configured? In particular, why use a static value, when git’s default behavior is to compute a value based on the current number of objects in the repository? (Edit: just noticed this post is over 10 years old. Maybe git didn’t have this automatic default behavior back then.)
For what it’s worth, jj
has an even better solution, which is to highlight the shortest unique prefix in each specific hash it displays.
I think you missed the last sentence of the post:
The git config is just for display purposes in terminal output. That only needs to be unique as of the time it’s displayed; and as I noted, the current default behavior is to adjust the size dynamically, so the displayed hash segment is always unique no matter how big the repo is.