From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jeff King <peff@peff.net>, "Dmitry V. Levin" <ldv@altlinux.org>,
"Shawn O. Pearce" <spearce@spearce.org>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] git-commit: Disallow unchanged tree in non-merge mode
Date: Fri, 14 Sep 2007 11:24:08 -0700 [thread overview]
Message-ID: <7vsl5h9kc7.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: alpine.LFD.0.999.0709132215250.16478@woody.linux-foundation.org
Linus Torvalds <torvalds@linux-foundation.org> writes:
> Yeah, we should probably:
> - default to something larger but still reasonably sane (ie not 100, but
> perhaps 1000)
> - special-case the "identical rename", and have a higher limit for that
> (we already handle the identicals as a separate pass before we even
> start doing the similarity analysis - and it's the similarity analysis
> that can be the really expensive part)
>
> There's really no point in trying to do rename analysis for tons and tons
> of files - even if we find perfect renames, the diff is going to be
> unreadable by a human, so realistically nobody is ever going to care! A
> machine won't care whether it was done as a create/delete or a rename, and
> a human won't be bothered to read about thousands of renames, so we're
> just wasting time trying to make it prettier.
>
> So quite arguably, the only case we really care about for renames is when
> the numbers are small enough to be human-readable.
I agree with that. At the same time we might want to revisit
the earlier "build a full matrix and pick the best ones"
approach commit 5c97558c9a813a0a775c438a79cfc438def00c22 (Detect
renames in diff family) introduced.
A tangent.
I've been thinking about updating the diffcore-rename for some
time to give bonus points to a filepair whose neighbors are
detected to be renames. E.g. if you have this pair of preimage
and postimage:
(preimage) (postimage)
arch/i386/foo.c arch/x86/foo-32.c
arch/i386/bar.c arch/x86/bar-32.c
arch/i386/baz.c arch/x86/baz-32.c
and if foo.c and bar.c are found to be very similar to foo-32.c
and bar-32.c while baz.c and baz-32.c are not that much, we may
want to take hints from the movement of neighbouring files and
boost the similarity score between baz.c and baz-32.c pair.
It would be a quite an interesting coding challenge for anybody
who wants to get his hands dirty. Would this be worth it in
practice? I dunno.
prev parent reply other threads:[~2007-09-14 18:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-05 23:49 [PATCH 1/2] git-commit: Disallow unchanged tree in non-merge mode Dmitry V. Levin
2007-09-06 2:25 ` Shawn O. Pearce
2007-09-06 10:16 ` Dmitry V. Levin
[not found] ` <20070909044648.GH18160@spearce.org>
[not found] ` <7vir6fjmuv.fsf@gitster.siamese.dyndns.org>
[not found] ` <20070913035137.GM3099@spearce.org>
[not found] ` <7vr6l2gxyw.fsf@gitster.siamese.dyndns.org>
[not found] ` <20070914000108.GE3619@basalt.office.altlinux.org>
[not found] ` <7vr6l2f6k1.fsf@gitster.siamese.dyndns.org>
[not found] ` <alpine.LFD.0.999.0709131850060.16478@woody.linux-foundation.org>
[not found] ` <20070914024303.GH3619@basalt.office.altlinux.org>
[not found] ` <alpine.LFD.0.999.0709132123570.16478@woody.linux-foundation.org>
2007-09-14 17:14 ` Linus Torvalds
2007-09-14 17:17 ` [PATCH 1/2] Fix "git diff" setup code Linus Torvalds
2007-09-14 17:39 ` [PATCH 2/2] Fix the rename detection limit checking Linus Torvalds
2007-09-14 18:44 ` Linus Torvalds
2007-09-14 18:49 ` Linus Torvalds
2007-09-14 18:19 ` [PATCH 1/2] Fix "git diff" setup code Junio C Hamano
2007-09-14 18:30 ` Linus Torvalds
2007-09-14 19:11 ` Junio C Hamano
2007-09-14 19:46 ` Linus Torvalds
[not found] ` <20070914050410.GA11402@coredump.intra.peff.net>
[not found] ` <alpine.LFD.0.999.0709132215250.16478@woody.linux-foundation.org>
2007-09-14 18:24 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vsl5h9kc7.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ldv@altlinux.org \
--cc=peff@peff.net \
--cc=spearce@spearce.org \
--cc=torvalds@linux-foundation.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).