On 2020-08-10 06:00:38-0400, Jeff King <peff@xxxxxxxx> wrote: > On Sun, Aug 09, 2020 at 12:01:35PM -0700, Junio C Hamano wrote: > > > Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx> writes: > > > > > Đoàn Trần Công Danh (2): > > > revision: differentiate if --no-abbrev asked explicitly > > > diff: extend --abbrev support to diff-patch format > > > > It was not clear, at least to me at all, what these patches are > > trying to achieve (i.e. what end-users appreciate) until I saw the > > code change X-<. > > > > The changes to fill_metainfo() make sense to me. It just needs log > > messages that explain the intent better. They do not even make it > > clear that they want to make the abbreviation length of the object > > names on the "index $from..$to $mode" lines configurable. > > After reading the original including cover letter, I'm still confused > using why --full-index is not the solution for most cases. Perhaps that > would be worth touching on, as well. At that time, I'm not really sure what should be written there. The commit message was inspired by --abbrev documentation. 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. <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. -- Danh