Re: [PATCH v8 00/29] Add directory rename detection to git

2018-02-14 Thread Stefan Beller
On Wed, Feb 14, 2018 at 10:51 AM, Elijah Newren  wrote:
> This patchset introduces directory rename detection to merge-recursive.  See
>   https://public-inbox.org/git/20171110190550.27059-1-new...@gmail.com/
> for the first series (including design considerations, etc.)  This series
> continues to depend on en/merge-recursive-fixes in next, at least
> contextually.  For the curious, follow-up series and comments can also be
> found at
>   https://public-inbox.org/git/20171120220209.15111-1-new...@gmail.com/
>   https://public-inbox.org/git/20171121080059.32304-1-new...@gmail.com/
>   https://public-inbox.org/git/20171129014237.32570-1-new...@gmail.com/
>   https://public-inbox.org/git/20171228041352.27880-1-new...@gmail.com/
>   https://public-inbox.org/git/20180105202711.24311-1-new...@gmail.com/
>   https://public-inbox.org/git/20180130232533.25846-1-new...@gmail.com/
>
> Also, as a reminder, this series fixes a few bugs somewhat as a side effect:
>   * a bug causing dirty files involved in a rename to be overwritten
>   * a few memory leaks
>
> Changes since v7 (full tbdiff follows below):
>   * Added Stefan's Reviewed-by.
>   * Squashed commits introducing new hash structs and associated functions
> into the commit that used them to avoid unused function
> warnings/errors.
>   * Added or clarified a number of comments where things were unclear
>   * Minor stuff:
> * Style (and typo) fixes for commit message and comments
> * Avoiding casting with hash initialization function
> * s/malloc/xmalloc/
> * struct assignment
> * s/20/GIT_MAX_RAWSZ/

Even the interdiff has Stefan's Reviewed-by.

Thanks for being persistent,
Stefan


[PATCH v8 00/29] Add directory rename detection to git

2018-02-14 Thread Elijah Newren
This patchset introduces directory rename detection to merge-recursive.  See
  https://public-inbox.org/git/20171110190550.27059-1-new...@gmail.com/
for the first series (including design considerations, etc.)  This series
continues to depend on en/merge-recursive-fixes in next, at least
contextually.  For the curious, follow-up series and comments can also be
found at
  https://public-inbox.org/git/20171120220209.15111-1-new...@gmail.com/
  https://public-inbox.org/git/20171121080059.32304-1-new...@gmail.com/
  https://public-inbox.org/git/20171129014237.32570-1-new...@gmail.com/
  https://public-inbox.org/git/20171228041352.27880-1-new...@gmail.com/
  https://public-inbox.org/git/20180105202711.24311-1-new...@gmail.com/
  https://public-inbox.org/git/20180130232533.25846-1-new...@gmail.com/

Also, as a reminder, this series fixes a few bugs somewhat as a side effect:
  * a bug causing dirty files involved in a rename to be overwritten
  * a few memory leaks

Changes since v7 (full tbdiff follows below):
  * Added Stefan's Reviewed-by.
  * Squashed commits introducing new hash structs and associated functions
into the commit that used them to avoid unused function
warnings/errors.
  * Added or clarified a number of comments where things were unclear
  * Minor stuff:
* Style (and typo) fixes for commit message and comments
* Avoiding casting with hash initialization function
* s/malloc/xmalloc/
* struct assignment
* s/20/GIT_MAX_RAWSZ/

Elijah Newren (29):
  directory rename detection: basic testcases
  directory rename detection: directory splitting testcases
  directory rename detection: testcases to avoid taking detection too
far
  directory rename detection: partially renamed directory
testcase/discussion
  directory rename detection: files/directories in the way of some
renames
  directory rename detection: testcases checking which side did the
rename
  directory rename detection: more involved edge/corner testcases
  directory rename detection: testcases exploring possibly suboptimal
merges
  directory rename detection: miscellaneous testcases to complete
coverage
  directory rename detection: tests for handling overwriting untracked
files
  directory rename detection: tests for handling overwriting dirty files
  merge-recursive: move the get_renames() function
  merge-recursive: introduce new functions to handle rename logic
  merge-recursive: fix leaks of allocated renames and diff_filepairs
  merge-recursive: make !o->detect_rename codepath more obvious
  merge-recursive: split out code for determining diff_filepairs
  merge-recursive: make a helper function for cleanup for handle_renames
  merge-recursive: add get_directory_renames()
  merge-recursive: check for directory level conflicts
  merge-recursive: add computation of collisions due to dir rename &
merging
  merge-recursive: check for file level conflicts then get new name
  merge-recursive: when comparing files, don't include trees
  merge-recursive: apply necessary modifications for directory renames
  merge-recursive: avoid clobbering untracked files with directory
renames
  merge-recursive: fix overwriting dirty files involved in renames
  merge-recursive: fix remaining directory rename + dirty overwrite
cases
  directory rename detection: new testcases showcasing a pair of bugs
  merge-recursive: avoid spurious rename/rename conflict from dir
renames
  merge-recursive: ensure we write updates for directory-renamed file

 merge-recursive.c   | 1243 ++-
 merge-recursive.h   |   27 +
 strbuf.c|   16 +
 strbuf.h|   16 +
 t/t3501-revert-cherry-pick.sh   |2 +-
 t/t6043-merge-rename-directories.sh | 3998 +++
 t/t7607-merge-overwrite.sh  |2 +-
 unpack-trees.c  |4 +-
 unpack-trees.h  |4 +
 9 files changed, 5197 insertions(+), 115 deletions(-)
 create mode 100755 t/t6043-merge-rename-directories.sh

Full tbdiff (the biggest code changes come from commit squashing):

 1: 5ba69c9c7b !  1: 9f1d894d89 directory rename detection: basic testcases
@@ -2,6 +2,7 @@
 
 directory rename detection: basic testcases
 
+Reviewed-by: Stefan Beller 
 Signed-off-by: Elijah Newren 
 
 diff --git a/t/t6043-merge-rename-directories.sh 
b/t/t6043-merge-rename-directories.sh
 2: e1d23f7f95 !  2: 36a4b05757 directory rename detection: directory splitting 
testcases
@@ -2,6 +2,7 @@
 
 directory rename detection: directory splitting testcases
 
+Reviewed-by: Stefan Beller 
 Signed-off-by: Elijah Newren 
 
 diff --git a/t/t6043-merge-rename-directories.sh 
b/t/t6043-merge-rename-directories.sh
 3: b10cb49cf9 !  3: 031a835801 directory