Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx> writes: > Reading both of your two's emails, I think this one could be used: > I'll resend this serie if this serie is deemed useful with this > explaination. > > diff: index-line: make object name's abbrev length configurable > > There are some projects that want to archive and track only > released version of other software projects. They also want > to backport some changes into those versions unsupported by > upstream. Most of git hosting services support some method to > download patches without cloning the full (potentially large) > repository and/or fiddling with git partial-clone or > sparse-checkout. > > Most of those git hosting services generate those patches with > git-format-patch(1) or something alike. Due to its large > amount of objects, their object names' abbreviation in the > index-line is usually long but not full. > > A lot of those patches couldn't be applied cleanly to old > versions of said software, thus requires some changes from > developer and they needs to be regenerated from their trimmed > tree. Because the archive tree has significantly fewer > objects, the abbreviation in the index line is usually shorter > than the original patch. Thus, it generates some noise when > said developers try to compare the new patch with the original > patch if there's an exact file-hunk match. > > Make the object name's abbreviation length configurable to > lower those noise. I agree with Peff that with the above as the sole motivating use case, the "--full-index" option is the right approach. It is a much more robust solution than "--abbrev=16 would be long enough for all project participants to avoid length drift". IOW these four paragraphs do not argue _for_ this change, at least to me. On the other hand, I think you could argue that "--full-index" is merely a synonym for "--abbrev=40", and the patch fixes the inconsistency between the object names on the "index" line, which can choose only between the default abbrev length and the full abbrev length, and all the other places we show object names, which uniformly honor the "--abbrev" option. > <Below is the note in 2/2, I don't know if it's worth put > into commit message> > > To preserve backward compatibility with old script that specify > both --full-index and --abbrev, always shows full object id > if --full-index is specified.