git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [RFC PATCH 0/2] extend --abbrev support to diff-patch format
Date: Mon, 10 Aug 2020 19:31:48 +0700	[thread overview]
Message-ID: <20200810123148.GB17119@danh.dev> (raw)
In-Reply-To: <20200810100038.GB37030@coredump.intra.peff.net>

On 2020-08-10 06:00:38-0400, Jeff King <peff@peff.net> wrote:
> On Sun, Aug 09, 2020 at 12:01:35PM -0700, Junio C Hamano wrote:
> 
> > Đoàn Trần Công Danh  <congdanhqx@gmail.com> 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

  reply	other threads:[~2020-08-10 12:31 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-09  2:19 Đoàn Trần Công Danh
2020-08-09  2:19 ` [RFC PATCH 1/2] revision: differentiate if --no-abbrev asked explicitly Đoàn Trần Công Danh
2020-08-09  2:19 ` [RFC PATCH 2/2] diff: extend --abbrev support to diff-patch format Đoàn Trần Công Danh
2020-08-09 19:01 ` [RFC PATCH 0/2] " Junio C Hamano
2020-08-10 10:00   ` Jeff King
2020-08-10 12:31     ` Đoàn Trần Công Danh [this message]
2020-08-10 15:15       ` Junio C Hamano
2020-08-10 15:27         ` Jeff King
2020-08-11  0:33           ` Đoàn Trần Công Danh
2020-08-11  5:22             ` Jeff King
2020-08-11 12:07               ` Đoàn Trần Công Danh
2020-08-10 15:06     ` Junio C Hamano
2020-08-11 11:49 ` [PATCH v2 0/2] diff: index-line: respect --abbrev in object's name Đoàn Trần Công Danh
2020-08-11 11:49   ` [PATCH v2 1/2] revision: differentiate if --no-abbrev asked explicitly Đoàn Trần Công Danh
2020-08-11 18:54     ` Junio C Hamano
2020-08-11 11:49   ` [PATCH v2 2/2] diff: index-line: respect --abbrev in object's name Đoàn Trần Công Danh
2020-08-14  0:23 ` [PATCH v3 0/2] " Đoàn Trần Công Danh
2020-08-14  0:23   ` [PATCH v3 1/2] revision: differentiate if --no-abbrev asked explicitly Đoàn Trần Công Danh
2020-08-14  0:50     ` Junio C Hamano
2020-08-14  0:59       ` Đoàn Trần Công Danh
2020-08-14  1:06         ` Junio C Hamano
2020-08-14 14:50           ` Đoàn Trần Công Danh
2020-08-19 22:50             ` Junio C Hamano
2020-08-14  0:23   ` [PATCH v3 2/2] diff: index-line: respect --abbrev in object's name Đoàn Trần Công Danh
2020-08-14 15:18     ` SZEDER Gábor
2020-08-14 17:00       ` Junio C Hamano
2020-08-14 18:59         ` Junio C Hamano
2020-08-15  0:21           ` brian m. carlson
2020-08-15  2:27             ` Đoàn Trần Công Danh
2020-08-17 16:17               ` Junio C Hamano
2020-08-20  4:56               ` Junio C Hamano
2020-08-20 12:35 ` [PATCH v4 0/2] " Đoàn Trần Công Danh
2020-08-20 12:35   ` [PATCH v4 1/2] t4013: improve diff-post-processor logic Đoàn Trần Công Danh
2020-08-20 19:49     ` Junio C Hamano
2020-08-21 12:05       ` Đoàn Trần Công Danh
2020-08-21 15:44         ` Junio C Hamano
2020-08-20 12:35   ` [PATCH v4 2/2] diff: index-line: respect --abbrev in object's name Đoàn Trần Công Danh
2020-08-20 19:58     ` Junio C Hamano
2020-08-21 11:51 ` [PATCH v5 0/2] " Đoàn Trần Công Danh
2020-08-21 11:51   ` [PATCH v5 1/2] t4013: improve diff-post-processor logic Đoàn Trần Công Danh
2020-08-21 11:51   ` [PATCH v5 2/2] diff: index-line: respect --abbrev in object's name Đoàn Trần Công Danh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200810123148.GB17119@danh.dev \
    --to=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --subject='Re: [RFC PATCH 0/2] extend --abbrev support to diff-patch format' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).