git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Bulk move and some of its close relatives

From
YDYann Dirson <ydirson@free.fr>
Date
Oct 26, 2010, 18:13 UTC
Message-ID
<20101026181314.GA5695@home.lan>
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
Previous: Yann DirsonNext: Yann Dirson
Message 5 of 11 in “Detection of directory renames”
  1. 0/3 Detection of directory renamesYann Dirson, Oct 23, 2010
  2. 1/3 Introduce bulk-move detection in diffcore.Yann Dirson, Oct 23, 2010
  3. Junio C HamanoOct 25, 2010
  4. Yann DirsonOct 25, 2010
  5. Bulk move and some of its close relativesYann Dirson, Oct 26, 2010
  6. Yann DirsonOct 27, 2010
  7. Junio C HamanoOct 28, 2010
  8. Yann DirsonOct 28, 2010
  9. 2/3 Add testcases for the --detect-bulk-moves diffcore flag.Yann Dirson, Oct 23, 2010
  10. 3/3 [WIP] Allow hiding renames of individual files involved in a directory rename.Yann Dirson, Oct 23, 2010
  11. [RFC] Add --detect-bulk-moves output to unidiff format.Yann Dirson, Oct 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.