From: Jakub Narebski <jnareb@gmail.com>
To: Yann Dirson <ydirson@altern.org>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] detection of directory renames
Date: Thu, 25 Sep 2008 16:19:20 -0700 (PDT) [thread overview]
Message-ID: <m3bpyb3jci.fsf@localhost.localdomain> (raw)
In-Reply-To: <20080925213819.27029.47944.stgit@gandelf.nowhere.earth>
Yann Dirson <ydirson@altern.org> writes:
> This is a first very preliminar patch, mostly so people can comment
> early on the big picture. It has a number of limitations, many but
> not all already listed as FIXME's in the patch itself. If anything in
> this patch seems so wrong it is not worth polishing it, it's the
> perfect time to say so :)
>
> The idea is to add a new pass to diffcore-rename, to group file renames
> looking like a full directory move, and then to hide those file
> renames which do not carry any additionnal information.
>
> Here is a sample run:
>
> $ ./git-diff-tree ee491 --factorize-renames -r
> [DBG] possible rename from arm/ to bar/
> [DBG] possible rename from ppc/ to moved/
> [DBG] discarding dir rename of arm/, mixing moved/ and bar/
> [DBG] ppc/* -> moved/* makes ppc/sha1ppc.S -> moved/sha1ppc.S uninteresting
> [DBG] ppc/* -> moved/* makes ppc/sha1.c -> moved/sha1.c uninteresting
> ee491a42190ec6e716f46a55fa0a7f4e307f1629
> :040000 040000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 R100 ppc/ moved/
> :100644 100644 9e3ae038e818f4e21bc50f864fc5204f6fa44daa 9e3ae038e818f4e21bc50f864fc5204f6fa44daa R100 arm/sha1.c bar/sha1.c
> :100644 100644 3952646349cf9d033177e69ba9433652a378c0e9 3952646349cf9d033177e69ba9433652a378c0e9 R100 arm/sha1.h bar/sha1.h
> :100644 100644 c3c51aa4d487f2e85c02b0257c1f0b57d6158d76 c065eeef7d68ea91863431788e20cd814c5ac52c R099 ppc/sha1.h moved/sha1.h
> :100644 100644 8c1cb99fb403875af85e4d1524d21f7eb818f59b 8c1cb99fb403875af85e4d1524d21f7eb818f59b R100 arm/sha1_arm.S moved/sha1_arm.S
Wonderfull!!!
I like it very much, and hope that it would get improved. And that you
would be able to use it in merges too, to allow for example for new
files to be created in renamed directory instead of old one which does
not exist any longer (c.f. http://www.markshuttleworth.com/archives/123
and following articles).
For the future, could you show examples with --abbrev option in use? TIA.
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2008-09-25 23:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 21:39 diffcore and directory renames Yann Dirson
2008-09-01 22:50 ` Junio C Hamano
2008-09-02 20:48 ` Yann Dirson
2008-09-25 21:47 ` [RFC PATCH] detection of " Yann Dirson
2008-09-25 21:47 ` [PATCH] Introduce patch factorization in diffcore Yann Dirson
2008-09-25 22:39 ` Andreas Ericsson
2008-09-26 19:21 ` Yann Dirson
2008-09-25 23:19 ` Jakub Narebski [this message]
2008-09-26 19:06 ` [RFC PATCH] detection of directory renames Yann Dirson
2008-10-27 13:35 ` Jakub Narebski
2008-10-27 19:13 ` Yann Dirson
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=m3bpyb3jci.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=ydirson@altern.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).