Re: [PATCH] diff_unique_abbrev(): document its assumtion and limitation

2016-10-03 Thread Junio C Hamano
Jeff King writes: > I guess my point was that the poor name may have contributed to the need > to explain it. The comment was not about "it may not be obvious but this tries to pad and align", but to say "the way this tries to pad and align is based on an unsaid assumption that leads to this lim

Re: [PATCH] diff_unique_abbrev(): document its assumtion and limitation

2016-10-01 Thread Jeff King
On Fri, Sep 30, 2016 at 12:19:51PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > ... Now that function _would_ > > want to be updated as a result of the other conversation (it would need > > to do something sensible with "-1", like turning it into "7", or > > whatever else is deemed rea

Re: [PATCH] diff_unique_abbrev(): document its assumtion and limitation

2016-09-30 Thread Junio C Hamano
Jeff King writes: > ... Now that function _would_ > want to be updated as a result of the other conversation (it would need > to do something sensible with "-1", like turning it into "7", or > whatever else is deemed reasonable outside of a repository). > > Anyway. I just wonder if you want to gi

Re: [PATCH] diff_unique_abbrev(): document its assumtion and limitation

2016-09-30 Thread Jeff King
On Fri, Sep 30, 2016 at 10:54:53AM -0700, Junio C Hamano wrote: > This function is used to add "..." to displayed object names in > "diff --raw --abbrev[=]" output. It bases its behaviour on an > untold assumption that the abbreviation length requested by the > caller is "reasonble", i.e. most of

[PATCH] diff_unique_abbrev(): document its assumtion and limitation

2016-09-30 Thread Junio C Hamano
This function is used to add "..." to displayed object names in "diff --raw --abbrev[=]" output. It bases its behaviour on an untold assumption that the abbreviation length requested by the caller is "reasonble", i.e. most of the objects will abbreviate within the requested length and the resultin