On Sun, Jul 10, 2016 at 2:05 PM, Linus Torvalds
<[email protected]> wrote:
>
> I'm getting "extra" being -1 in strbuf_grow(). Let me dog deeper.
"dog deeper"? My typing skills are deteriorating.
Anyway, I dug deeper, and the reason is that "tabwidth" is -1, and then
pretty.c:1669: strbuf_add_tabexpand():
strbuf_addchars(sb, ' ', tabwidth - (width % tabwidth));
ends up having the number be -1.
I'm not sure why it doesn't happen in current git master, because that
function is the same, and the logic around expand_tabs_in_log looks
similar too.
That all came from
fe37a9c586a6 (:pretty: allow tweaking tabwidth in --expand-tabs")
and I suspect the code just needs to protect against negative or zero,
rather than just zero.
Junio?
Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html