Revision ed58d8088b570e7629bfc94b87e433f05229ef3c authored by Jeff King on 06 January 2017, 04:18:08 UTC, committed by Junio C Hamano on 08 January 2017, 03:34:54 UTC
You can already ask blame for full sha1s with "-l" or with "--abbrev=40". But for consistency with other parts of Git, we should support "--no-abbrev". Worse, blame already accepts --no-abbrev, but it's totally broken. When we see --no-abbrev, the abbrev variable is set to 0, which is then used as a printf precision. For regular sha1s, that means we print nothing at all (which is very wrong). For boundary commits we decrement it to "-1", which printf interprets as "no limit" (which is almost correct, except it misses the 39-length magic explained in the previous commit). Let's detect --no-abbrev and behave as if --abbrev=40 was given. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 9122983
File | Mode | Size |
---|---|---|
xdiff.h | -rw-r--r-- | 3.6 KB |
xdiffi.c | -rw-r--r-- | 16.5 KB |
xdiffi.h | -rw-r--r-- | 2.0 KB |
xemit.c | -rw-r--r-- | 7.5 KB |
xemit.h | -rw-r--r-- | 1.2 KB |
xhistogram.c | -rw-r--r-- | 9.0 KB |
xinclude.h | -rw-r--r-- | 1.2 KB |
xmacros.h | -rw-r--r-- | 1.9 KB |
xmerge.c | -rw-r--r-- | 17.0 KB |
xpatience.c | -rw-r--r-- | 9.9 KB |
xprepare.c | -rw-r--r-- | 12.0 KB |
xprepare.h | -rw-r--r-- | 1.1 KB |
xtypes.h | -rw-r--r-- | 1.6 KB |
xutils.c | -rw-r--r-- | 11.0 KB |
xutils.h | -rw-r--r-- | 1.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...