From: Yann Dirson <ydirson@free.fr>
To: git@vger.kernel.org
Subject: Bulk move and some of its close relatives
Date: Tue, 26 Oct 2010 20:13:14 +0200 [thread overview]
Message-ID: <20101026181314.GA5695@home.lan> (raw)
In-Reply-To: <20101025201227.GB3347@home.lan>
On Mon, Oct 25, 2010 at 10:12:27PM +0200, Yann Dirson wrote:
> It is only later that I realized that the larger picture was about
> bulk moves, and directory renames were only a subset of those.
I had a couple of thoughts about this dir-rename -> bulk-moves shift
today while riding to/from work. So here are some of the fresh air I
got...
Is a bulk-move finally so special ? There is a close relative to it
which may be of interest too: bulk deletion. If we implement
detection of bulk deletion, we can build on it to get:
* detection of a new type of conflict: addition in a branch of a new
file in a dir which is deleted in the other branch (quite similar to
the one we were talking about, of a new file in a dir that got moved in
other branch)
* split a good part of the current bulk-move patch in a standalone
patch, which is something I wondered how to do
* probably a much better base for directory-split detection
Then, since a bulk-move is made of a bulk deletion, and addition
somewhere else of those deleted files, it became tempting to
contemplate the concept of "bulk addition". At first sight it seems
awkward, I confess, especially "bulk addition into a preexisting dir",
which is a bit hard to define with precision. OTOH, "bulk addition of
a brand new dir" could bring goodies as well:
* new conflict type: creation in both branches of a new directory with
same name
That confict type made me think of another one. Some of you may have
noticed in the v7 commit message a suggestion for future developments
labelled "support other types of bluk-grouping, like prefixes, and
maybe config-specified patterns". Now if we get the capability of
specifying how we define a "group of files" with something other than
the directory hierarchy (let's say eg. that in t/ every "t[0-9]{4}-"
is a prefix), the "bulk-add/bulk-add" conflict generated by 2 tests
with same numeric ID would be detected as a conflict.
Another grouping example would be by file suffix - source-code reorgs
eg. bulk-moving header files into their own dir are not rare either.
Does that sound sane ?
--
Yann
next prev parent reply other threads:[~2010-10-26 18:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-23 21:06 [PATCH v7 0/3] Detection of directory renames Yann Dirson
2010-10-23 21:07 ` [PATCH v7 1/3] Introduce bulk-move detection in diffcore Yann Dirson
2010-10-25 8:08 ` Junio C Hamano
2010-10-25 20:12 ` Yann Dirson
2010-10-26 18:13 ` Yann Dirson [this message]
2010-10-27 7:05 ` Bulk move and some of its close relatives Yann Dirson
2010-10-28 20:20 ` [PATCH v7 1/3] Introduce bulk-move detection in diffcore Junio C Hamano
2010-10-28 21:42 ` Yann Dirson
2010-10-23 21:07 ` [PATCH v7 2/3] Add testcases for the --detect-bulk-moves diffcore flag Yann Dirson
2010-10-23 21:07 ` [PATCH v7 3/3] [WIP] Allow hiding renames of individual files involved in a directory rename Yann Dirson
2010-10-24 21:10 ` [PATCH] [RFC] Add --detect-bulk-moves output to unidiff format 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=20101026181314.GA5695@home.lan \
--to=ydirson@free.fr \
--cc=git@vger.kernel.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).