Re: [PATCH] git-rebase.txt: update note about directory rename detection and am

2018-12-07 Thread Elijah Newren
On Fri, Dec 7, 2018 at 9:51 AM Johannes Sixt wrote: > > From: Elijah Newren > > In commit 6aba117d5cf7 ("am: avoid directory rename detection when > calling recursive merge machinery", 2018-08-29), the git-rebase manpage > probably should have also been

[PATCH] git-rebase.txt: update note about directory rename detection and am

2018-12-07 Thread Johannes Sixt
From: Elijah Newren In commit 6aba117d5cf7 ("am: avoid directory rename detection when calling recursive merge machinery", 2018-08-29), the git-rebase manpage probably should have also been updated to note the stronger incompatibility between git-am and directory rename detectio

Re: [PATCH 2/3] merge-recursive: add ability to turn off directory rename detection

2018-08-29 Thread Elijah Newren
On Wed, Aug 29, 2018 at 5:54 AM Johannes Schindelin wrote: > > Hi Elijah, > > On Wed, 29 Aug 2018, Elijah Newren wrote: > > > Signed-off-by: Elijah Newren > > --- > > merge-recursive.c | 18 +- > > merge-recursive.h | 1 + > > 2 files changed, 14 insertions(+), 5 deletions(-) >

Re: [PATCH 2/3] merge-recursive: add ability to turn off directory rename detection

2018-08-29 Thread Johannes Schindelin
Hi Elijah, On Wed, 29 Aug 2018, Elijah Newren wrote: > Signed-off-by: Elijah Newren > --- > merge-recursive.c | 18 +- > merge-recursive.h | 1 + > 2 files changed, 14 insertions(+), 5 deletions(-) > > diff --git a/merge-recursive.c b/merge-recursive.c > index

Re: [PATCH 3/3] am: avoid directory rename detection when calling recursive merge machinery

2018-08-29 Thread Johannes Schindelin
> The core problem is that am does not have access to the original trees; it > can only construct trees using the blobs involved in the patch. As such, > it is not safe to perform directory rename detection within am -3. I read through all three patches, and they look fine to me! Ciao, Dsc

[PATCH 3/3] am: avoid directory rename detection when calling recursive merge machinery

2018-08-29 Thread Elijah Newren
master as just adding both foo/file1 and foo/file2. As such, it ends up with goo/{file1, file2, file3} The core problem is that am does not have access to the original trees; it can only construct trees using the blobs involved in the patch. As such, it is not safe to perform directory rename det

[PATCH 0/3] Turn off directory rename detection in am -3

2018-08-29 Thread Elijah Newren
On Tue, Aug 28, 2018 at 9:58 AM Junio C Hamano wrote: > Elijah Newren writes: > > > - Add a flag to turn off directory rename detection, and set the > > flag for every call from am.c in order to avoid problems like this. > > I'd say this is the only practical soluti

[PATCH 2/3] merge-recursive: add ability to turn off directory rename detection

2018-08-29 Thread Elijah Newren
Signed-off-by: Elijah Newren --- merge-recursive.c | 18 +- merge-recursive.h | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index f110e1c5ec..bf3cb03d3a 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@

Re: [PATCH] RelNotes 2.18: clarify where directory rename detection applies

2018-06-13 Thread Junio C Hamano
Elijah Newren writes: > Also, since the directory rename detection from this cycle was > specifically added in merge-recursive and not diffcore-rename, remove the > 'in "diff" family" phrase from the note. Thanks.

[PATCH] RelNotes 2.18: clarify where directory rename detection applies

2018-06-12 Thread Elijah Newren
flags that imply either -m or -i). Also, since the directory rename detection from this cycle was specifically added in merge-recursive and not diffcore-rename, remove the 'in "diff" family" phrase from the note. (Folks have requested in the past that `git diff` detect directory rena

Re: [PATCH v3] add status config and command line options for rename detection

2018-05-14 Thread Ben Peart
diff.renames itself. I do wonder why there is a special need for the status command here The rename detection feature is nice and we'd like to leave it on whenever possible. The performance issues only occur when in the middle of a merge - normal status commands behave reasonably. As a result

Re: [PATCH v3] add status config and command line options for rename detection

2018-05-12 Thread Eckhard Maaß
On Fri, May 11, 2018 at 12:56:39PM +, Ben Peart wrote: > After performing a merge that has conflicts git status will, by default, > attempt to detect renames which causes many objects to be examined. In a > virtualized repo, those objects do not exist locally so the rename logic > triggers

[PATCH v4] add status config and command line options for rename detection

2018-05-11 Thread Ben Peart
taking hours to complete on very large repos vs seconds with this patch. Add a new config status.renames setting to enable turning off rename detection during status and commit. This setting will default to the value of diff.renames. Add a new config status.renamelimit setting to to enable

Re: [PATCH v3] add status config and command line options for rename detection

2018-05-11 Thread Elijah Newren
xist locally so the rename logic > triggers them to be fetched from the server. This results in the status call > taking hours to complete on very large repos vs seconds with this patch. > > Add a new config status.renames setting to enable turning off rename detection > during st

[PATCH v3] add status config and command line options for rename detection

2018-05-11 Thread Ben Peart
taking hours to complete on very large repos vs seconds with this patch. Add a new config status.renames setting to enable turning off rename detection during status and commit. This setting will default to the value of diff.renames. Add a new config status.renamelimit setting to to enable

Re: [PATCH v2] add status config and command line options for rename detection

2018-05-11 Thread Ben Peart
On 5/10/2018 6:31 PM, Elijah Newren wrote: Hi Ben, On Thu, May 10, 2018 at 12:09 PM, Ben Peart wrote: On 5/10/2018 12:19 PM, Elijah Newren wrote: On Thu, May 10, 2018 at 7:16 AM, Ben Peart wrote: Given the example perf impact is arbitrary

Re: [PATCH v2] add status config and command line options for rename detection

2018-05-11 Thread Junio C Hamano
Ben Peart writes: > Documentation/config.txt | 10 > Documentation/git-status.txt | 10 > builtin/commit.c | 41 > diff.c | 2 +- > diff.h | 1 + > t/t7525-status-rename.sh | 90

Re: [PATCH v2] add status config and command line options for rename detection

2018-05-10 Thread Junio C Hamano
Elijah Newren writes: >> Note: I removed the --no-breaks command line option from the original patch >> as >> it will no longer be needed once the default has been changed [1] to turn it >> off. >> >> [1] >>

Re: [PATCH v2] add status config and command line options for rename detection

2018-05-10 Thread Elijah Newren
Hi Ben, On Thu, May 10, 2018 at 12:09 PM, Ben Peart wrote: > On 5/10/2018 12:19 PM, Elijah Newren wrote: >> On Thu, May 10, 2018 at 7:16 AM, Ben Peart >> wrote: > Given the example perf impact is arbitrary (the actual example that > triggered this

Re: [PATCH v2] add status config and command line options for rename detection

2018-05-10 Thread Ben Peart
d repo, those objects do not exist locally so the rename logic triggers them to be fetched from the server. This results in the status call taking hours to complete on very large repos. Even in a small repo (the GVFS repo) turning off break and rename detection has a significant impact: It'd b

Re: [PATCH v2] add status config and command line options for rename detection

2018-05-10 Thread Elijah Newren
t exist locally so the rename logic triggers them to > be > fetched from the server. This results in the status call taking hours to > complete on very large repos. Even in a small repo (the GVFS repo) turning > off > break and rename detection has a significant impact: It'd be n

[PATCH v2] add status config and command line options for rename detection

2018-05-10 Thread Ben Peart
taking hours to complete on very large repos. Even in a small repo (the GVFS repo) turning off break and rename detection has a significant impact: git status --no-renames: 31 secs., 105 loose object downloads git status --no-breaks 7 secs., 17 loose object downloads git status --no-breaks

Re: [PATCH v1] add status config and command line options for rename detection

2018-05-09 Thread Ben Peart
On 5/9/2018 12:56 PM, Elijah Newren wrote: Hi Ben, Overall I think this is good, but I have lots of nit-picky things to bring up. :-) Thank you for the review. I appreciate the extra set of eyes on these changes. Especially when dealing with the merge logic and settings which I am

Re: [PATCH v1] add status config and command line options for rename detection

2018-05-09 Thread Ben Peart
On 5/9/2018 11:59 AM, Duy Nguyen wrote: On Wed, May 9, 2018 at 4:42 PM, Ben Peart <ben.pe...@microsoft.com> wrote: Add a new config status.renames setting to enable turning off rename detection during status. This setting will default to the value of diff.renames. Please add the reas

Re: [PATCH v1] add status config and command line options for rename detection

2018-05-09 Thread Elijah Newren
. Add --find-renames[=] to enable detecting > renames and optionaly setting the similarity index from the command line. s/optionaly/optionally/ > Notes: > Base Ref: No base ref? ;-) > +status.renameLimit:: > + The number of files to consider when

Re: [PATCH v1] add status config and command line options for rename detection

2018-05-09 Thread Duy Nguyen
On Wed, May 9, 2018 at 4:42 PM, Ben Peart <ben.pe...@microsoft.com> wrote: > Add a new config status.renames setting to enable turning off rename detection > during status. This setting will default to the value of diff.renames. Please add the reason you need this config key i

[PATCH v1] add status config and command line options for rename detection

2018-05-09 Thread Ben Peart
Add a new config status.renames setting to enable turning off rename detection during status. This setting will default to the value of diff.renames. Add a new config status.renamelimit setting to to enable bounding the time spent finding out inexact renames during status. This setting

[PATCH v4 3/3] merge: pass aggressive when rename detection is turned off

2018-05-02 Thread Ben Peart
Set aggressive flag in git_merge_trees() when rename detection is turned off. This allows read_tree() to auto resolve more cases that would have otherwise been handled by the rename detection. Reviewed-by: Johannes Schindelin <johannes.schinde...@gmx.de> Signed-off-by: Ben Peart

Re: [PATCH v3 3/3] merge: pass aggressive when rename detection is turned off

2018-04-26 Thread Elijah Newren
On Thu, Apr 26, 2018 at 1:52 PM, Ben Peart <ben.pe...@microsoft.com> wrote: > Set aggressive flag in git_merge_trees() when rename detection is turned off. > This allows read_tree() to auto resolve more cases that would have otherwise > been handled by the rename detectio

[PATCH v3 3/3] merge: pass aggressive when rename detection is turned off

2018-04-26 Thread Ben Peart
Set aggressive flag in git_merge_trees() when rename detection is turned off. This allows read_tree() to auto resolve more cases that would have otherwise been handled by the rename detection. Reviewed-by: Johannes Schindelin <johannes.schinde...@gmx.de> Signed-off-by: Ben Peart

Re: [PATCH v10 00/36] Add directory rename detection to git

2018-04-23 Thread Elijah Newren
r than a few different "Auto-merging >> " output lines (as expected due to patch 35/36) >> - 53 merged the same other than different "Checking out files: ..." >> output (I just did a plain merge; no flags like --no-progress) >> - the remaining 7 commit

Re: [PATCH v10 00/36] Add directory rename detection to git

2018-04-23 Thread Junio C Hamano
- 53 merged the same other than different "Checking out files: ..." > output (I just did a plain merge; no flags like --no-progress) > - the remaining 7 commits had non-trivial merge differences, all > attributable to directory rename detection kicking in > > So, i

Re: [PATCH v10 00/36] Add directory rename detection to git

2018-04-23 Thread Elijah Newren
Hi Junio, On Thu, Apr 19, 2018 at 8:05 PM, Junio C Hamano <gits...@pobox.com> wrote: >> On Thu, Apr 19, 2018 at 10:57 AM, Elijah Newren <new...@gmail.com> wrote: >>> This series is a reboot of the directory rename detection series that was >>> merged to maste

Re: [PATCH v10 00/36] Add directory rename detection to git

2018-04-23 Thread Elijah Newren
- 53 merged the same other than different "Checking out files: ..." output (I just did a plain merge; no flags like --no-progress) - the remaining 7 commits had non-trivial merge differences, all attributable to directory rename detection kicking in So, it looks good to me. If anyone

Re: [PATCH v10 00/36] Add directory rename detection to git

2018-04-19 Thread Junio C Hamano
Elijah Newren <new...@gmail.com> writes: > On Thu, Apr 19, 2018 at 10:57 AM, Elijah Newren <new...@gmail.com> wrote: >> This series is a reboot of the directory rename detection series that was >> merged to master and then reverted due to the final patch having a bug

Re: [PATCH v10 00/36] Add directory rename detection to git

2018-04-19 Thread Elijah Newren
On Thu, Apr 19, 2018 at 11:35 AM, Elijah Newren <new...@gmail.com> wrote: > On Thu, Apr 19, 2018 at 10:57 AM, Elijah Newren <new...@gmail.com> wrote: >> This series is a reboot of the directory rename detection series that was >> merged to master and then reverted du

Re: [PATCH v10 00/36] Add directory rename detection to git

2018-04-19 Thread Derrick Stolee
On 4/19/2018 2:41 PM, Stefan Beller wrote: On Thu, Apr 19, 2018 at 11:35 AM, Elijah Newren <new...@gmail.com> wrote: On Thu, Apr 19, 2018 at 10:57 AM, Elijah Newren <new...@gmail.com> wrote: This series is a reboot of the directory rename detection series that was merg

Re: [PATCH v10 00/36] Add directory rename detection to git

2018-04-19 Thread Stefan Beller
On Thu, Apr 19, 2018 at 11:35 AM, Elijah Newren <new...@gmail.com> wrote: > On Thu, Apr 19, 2018 at 10:57 AM, Elijah Newren <new...@gmail.com> wrote: >> This series is a reboot of the directory rename detection series that was >> merged to master and then reverted du

Re: [PATCH v10 00/36] Add directory rename detection to git

2018-04-19 Thread Elijah Newren
On Thu, Apr 19, 2018 at 10:57 AM, Elijah Newren <new...@gmail.com> wrote: > This series is a reboot of the directory rename detection series that was > merged to master and then reverted due to the final patch having a buggy > can-skip-update check, as noted at > https://pu

[PATCH v10 05/36] directory rename detection: files/directories in the way of some renames

2018-04-19 Thread Elijah Newren
er side adds files to original and target +# Commit O: z/{b,c}, y/d +# Commit A: z/{b,c,e_1,f}, y/{d,e_2} +# Commit B: y/{b,c,d} +# Expected: z/e_1, y/{b,c,d,e_2,f} + CONFLICT warning +# NOTE: While directory rename detection is active here causing z/f to +# become y/f

[PATCH v10 03/36] directory rename detection: testcases to avoid taking detection too far

2018-04-19 Thread Elijah Newren
ct \ + O:z/bO:z/cO:z/d && + test_cmp expect actual + ) +' + +# Testcase 3b, Avoid implicit rename if involved as source on other side +# (Related to testcases 5c and 7c, also kind of 1e and 1f) +# Commit O: z/{b,c,d} +# Commit A: y/

[PATCH v10 11/36] directory rename detection: tests for handling overwriting dirty files

2018-04-19 Thread Elijah Newren
ional +# codepaths that need special handling with directory renames. Add +# testcases for both renamed-by-directory-rename-detection and standard +# rename cases. +### + +# Testcase 11a, Avoid losing dirty contents with simple renam

[PATCH v10 01/36] directory rename detection: basic testcases

2018-04-19 Thread Elijah Newren
+# Expected: y/{b,c,d,e/f} + +test_expect_success '1a-setup: Simple directory rename detection' ' + test_create_repo 1a && + ( + cd 1a && + + mkdir z && + echo b >z/b && + echo c >z/c && +

[PATCH v10 02/36] directory rename detection: directory splitting testcases

2018-04-19 Thread Elijah Newren
Reviewed-by: Stefan Beller Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- t/t6043-merge-rename-directories.sh | 143 1 file changed, 143 insertions(+) diff --git

[PATCH v10 09/36] directory rename detection: miscellaneous testcases to complete coverage

2018-04-19 Thread Elijah Newren
I came up with the testcases in the first eight sections before coding up the implementation. The testcases in this section were mostly ones I thought of while coding/debugging, and which I was too lazy to insert into the previous sections because I didn't want to re-label with all the testcase

[PATCH v10 04/36] directory rename detection: partially renamed directory testcase/discussion

2018-04-19 Thread Elijah Newren
Add a long note about why we are not considering "partial directory renames" for the current directory rename detection implementation. Reviewed-by: Stefan Beller <sbel...@google.com> Signed-off-by: Elijah Newren <new...@gmail.com> Signed-off-by: Junio C Hamano <gits..

[PATCH v10 08/36] directory rename detection: testcases exploring possibly suboptimal merges

2018-04-19 Thread Elijah Newren
l or non-intuitive behavior. This section +# explores these cases. +# +# To be fair, we already had non-intuitive or suboptimal behavior for most +# of these cases in git before introducing implicit directory rename +# detection, but it'd be nice if there was a modified ruleset out there +# that h

[PATCH v10 06/36] directory rename detection: testcases checking which side did the rename

2018-04-19 Thread Elijah Newren
es -u >out && + test_line_count = 1 out && + git ls-files -o >out && + test_line_count = 1 out && + + git rev-parse >actual \ + :0:y/b :3:y/c && + git rev-p

[PATCH v10 10/36] directory rename detection: tests for handling overwriting untracked files

2018-04-19 Thread Elijah Newren
Reviewed-by: Stefan Beller Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- t/t6043-merge-rename-directories.sh | 367 1 file changed, 367 insertions(+) diff --git

[PATCH v10 27/36] directory rename detection: new testcases showcasing a pair of bugs

2018-04-19 Thread Elijah Newren
Add a testcase showing spurious rename/rename(1to2) conflicts occurring due to directory rename detection. Also add a pair of testcases dealing with moving directory hierarchies around that were suggested by Stefan Beller as "food for thought" during his review of an earlier pa

[PATCH v10 00/36] Add directory rename detection to git

2018-04-19 Thread Elijah Newren
This series is a reboot of the directory rename detection series that was merged to master and then reverted due to the final patch having a buggy can-skip-update check, as noted at https://public-inbox.org/git/xmqqmuya43cs@gitster-ct.c.googlers.com/ This series based on top of master

[PATCH v10 07/36] directory rename detection: more involved edge/corner testcases

2018-04-19 Thread Elijah Newren
Reviewed-by: Stefan Beller Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- t/t6043-merge-rename-directories.sh | 396 1 file changed, 396 insertions(+) diff --git

[RFC PATCH v9 0/30] Add directory rename detection to git

2018-04-13 Thread Elijah Newren
This series builds on commit febb3a86098f ("merge-recursive: avoid spurious rename/rename conflict from dir renames", 2018-02-14), also known as patch 29/30 of en/rename-directory-detection. That patch series has been reverted from master[1], due to a bug with patch 30/30, so does not apply to

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 <new...@gmail.com> 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 cons

[PATCH v8 10/29] directory rename detection: tests for handling overwriting untracked files

2018-02-14 Thread Elijah Newren
Reviewed-by: Stefan Beller Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 367 1 file changed, 367 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh

[PATCH v8 08/29] directory rename detection: testcases exploring possibly suboptimal merges

2018-02-14 Thread Elijah Newren
+# explores these cases. +# +# To be fair, we already had non-intuitive or suboptimal behavior for most +# of these cases in git before introducing implicit directory rename +# detection, but it'd be nice if there was a modified ruleset out there +# that handled these cases

[PATCH v8 27/29] directory rename detection: new testcases showcasing a pair of bugs

2018-02-14 Thread Elijah Newren
Add a testcase showing spurious rename/rename(1to2) conflicts occurring due to directory rename detection. Also add a pair of testcases dealing with moving directory hierarchies around that were suggested by Stefan Beller as "food for thought" during his review of an earlier pa

[PATCH v8 07/29] directory rename detection: more involved edge/corner testcases

2018-02-14 Thread Elijah Newren
Reviewed-by: Stefan Beller Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 396 1 file changed, 396 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh

[PATCH v8 03/29] directory rename detection: testcases to avoid taking detection too far

2018-02-14 Thread Elijah Newren
:z/d && + test_cmp expect actual + ) +' + +# Testcase 3b, Avoid implicit rename if involved as source on other side +# (Related to testcases 5c and 7c, also kind of 1e and 1f) +# Commit O: z/{b,c,d} +# Commit A: y/{b,c}, x/d +# Commit B: z/{b,c}, w/d +# Exp

[PATCH v8 06/29] directory rename detection: testcases checking which side did the rename

2018-02-14 Thread Elijah Newren
ne_count = 1 out && + git ls-files -o >out && + test_line_count = 1 out && + + git rev-parse >actual \ + :0:y/b :3:y/c && + git rev-parse >expect \ +O:z/b O

[PATCH v8 09/29] directory rename detection: miscellaneous testcases to complete coverage

2018-02-14 Thread Elijah Newren
I came up with the testcases in the first eight sections before coding up the implementation. The testcases in this section were mostly ones I thought of while coding/debugging, and which I was too lazy to insert into the previous sections because I didn't want to re-label with all the testcase

[PATCH v8 04/29] directory rename detection: partially renamed directory testcase/discussion

2018-02-14 Thread Elijah Newren
Add a long note about why we are not considering "partial directory renames" for the current directory rename detection implementation. Reviewed-by: Stefan Beller <sbel...@google.com> Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-renam

[PATCH v8 11/29] directory rename detection: tests for handling overwriting dirty files

2018-02-14 Thread Elijah Newren
tory renames. Add +# testcases for both renamed-by-directory-rename-detection and standard +# rename cases. +### + +# Testcase 11a, Avoid losing dirty contents with simple rename +# Commit O: z/{a,b_v1}, +# Commit A: z/{a,

[PATCH v8 01/29] directory rename detection: basic testcases

2018-02-14 Thread Elijah Newren
etup: Simple directory rename detection' ' + test_create_repo 1a && + ( + cd 1a && + + mkdir z && + echo b >z/b && + echo c >z/c && + git add z && + test

[PATCH v8 05/29] directory rename detection: files/directories in the way of some renames

2018-02-14 Thread Elijah Newren
mmit O: z/{b,c}, y/d +# Commit A: z/{b,c,e_1,f}, y/{d,e_2} +# Commit B: y/{b,c,d} +# Expected: z/e_1, y/{b,c,d,e_2,f} + CONFLICT warning +# NOTE: While directory rename detection is active here causing z/f to +# become y/f, we did not apply this for z/e_1 because that would +#

[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

[PATCH v8 02/29] directory rename detection: directory splitting testcases

2018-02-14 Thread Elijah Newren
Reviewed-by: Stefan Beller Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 143 1 file changed, 143 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh

[PATCH v7 09/31] directory rename detection: miscellaneous testcases to complete coverage

2018-01-30 Thread Elijah Newren
I came up with the testcases in the first eight sections before coding up the implementation. The testcases in this section were mostly ones I thought of while coding/debugging, and which I was too lazy to insert into the previous sections because I didn't want to re-label with all the testcase

[PATCH v7 07/31] directory rename detection: more involved edge/corner testcases

2018-01-30 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 396 1 file changed, 396 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index fbeb8f4316..68bd86f555 100755 ---

[PATCH v7 08/31] directory rename detection: testcases exploring possibly suboptimal merges

2018-01-30 Thread Elijah Newren
ad non-intuitive or suboptimal behavior for most +# of these cases in git before introducing implicit directory rename +# detection, but it'd be nice if there was a modified ruleset out there +# that handled these cases a bit

[PATCH v7 03/31] directory rename detection: testcases to avoid taking detection too far

2018-01-30 Thread Elijah Newren
) +' + +# Testcase 3b, Avoid implicit rename if involved as source on other side +# (Related to testcases 5c and 7c, also kind of 1e and 1f) +# Commit O: z/{b,c,d} +# Commit A: y/{b,c}, x/d +# Commit B: z/{b,c}, w/d +# Expected: y/{b,c}, CONFLICT:(z/d -> x/d vs. w/d) +#

[PATCH v7 29/31] directory rename detection: new testcases showcasing a pair of bugs

2018-01-30 Thread Elijah Newren
Add a testcase showing spurious rename/rename(1to2) conflicts occurring due to directory rename detection. Also add a pair of testcases dealing with moving directory hierarchies around that were suggested by Stefan Beller as "food for thought" during his review of an earlier pa

[PATCH v7 01/31] directory rename detection: basic testcases

2018-01-30 Thread Elijah Newren
e able to handle +### + +# Testcase 1a, Basic directory rename. +# Commit O: z/{b,c} +# Commit A: y/{b,c} +# Commit B: z/{b,c,d,e/f} +# Expected: y/{b,c,d,e/f} + +test_expect_success '1a-setup: Simple directory rename detection' ' + tes

[PATCH v7 02/31] directory rename detection: directory splitting testcases

2018-01-30 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 143 1 file changed, 143 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index d045f0e31e..b22a9052b3 100755 ---

[PATCH v7 04/31] directory rename detection: partially renamed directory testcase/discussion

2018-01-30 Thread Elijah Newren
merge. ### + +### +# SECTION 4: Partially renamed directory; still exists on both sides of merge +# +# What if we were to attempt to do directory rename detection when someone +# "mostly" moved a directory but still

[PATCH v7 00/31] Add directory rename detection to git

2018-01-30 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.), and follow-up series can be found at https://public-inbox.org/git

[PATCH v7 11/31] directory rename detection: tests for handling overwriting dirty files

2018-01-30 Thread Elijah Newren
enamed-by-directory-rename-detection and standard +# rename cases. +### + +# Testcase 11a, Avoid losing dirty contents with simple rename +# Commit O: z/{a,b_v1}, +# Commit A: z/{a,c_v1}, and z/c_v1 has uncommitted mods +# Commi

[PATCH v7 10/31] directory rename detection: tests for handling overwriting untracked files

2018-01-30 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 367 1 file changed, 367 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index b730256653..aa9af49edc 100755 ---

[PATCH v7 06/31] directory rename detection: testcases checking which side did the rename

2018-01-30 Thread Elijah Newren
es -o >out && + test_line_count = 1 out && + + git rev-parse >actual \ + :0:y/b :3:y/c && + git rev-parse >expect \ +O:z/b O:z/c && + test_cmp expect actu

[PATCH v7 05/31] directory rename detection: files/directories in the way of some renames

2018-01-30 Thread Elijah Newren
,f}, y/{d,e_2} +# Commit B: y/{b,c,d} +# Expected: z/e_1, y/{b,c,d,e_2,f} + CONFLICT warning +# NOTE: While directory rename detection is active here causing z/f to +# become y/f, we did not apply this for z/e_1 because that would +# give us an add/add conflict for y/e_1 vs

Re: [PATCH v7 00/31] Add directory rename detection to git

2018-01-30 Thread Elijah Newren
On Tue, Jan 30, 2018 at 3:25 PM, Elijah Newren <new...@gmail.com> wrote: > This patchset introduces directory rename detection to merge-recursive. See And a meta question: Should I be trying to submit this feature some other way? I've really appreciated all the reviews[1], and the

Re: [PATCHv6 03/31] directory rename detection: testcases to avoid taking detection too far

2018-01-26 Thread Elijah Newren
On Fri, Jan 26, 2018 at 3:37 AM, SZEDER Gábor wrote: > On Fri, Jan 5, 2018 at 9:26 PM, Elijah Newren wrote: >> Signed-off-by: Elijah Newren >> --- >> t/t6043-merge-rename-directories.sh | 153 >> >>

Re: [PATCHv6 03/31] directory rename detection: testcases to avoid taking detection too far

2018-01-26 Thread SZEDER Gábor
O:z/b O:z/c O:z/d O:z/d O:z/d && > + test_cmp expect actual && > + > + test_path_is_missing z/d && > + git hash-object >actual \ > + x/d w/d && > +

Re: [PATCH v5 13/34] directory rename detection: tests for handling overwriting untracked files

2018-01-05 Thread Elijah Newren
On Fri, Jan 5, 2018 at 12:31 PM, Thomas Gummerer wrote: > On 01/04, Elijah Newren wrote: >> On Wed, Jan 3, 2018 at 5:52 PM, SZEDER Gábor wrote: >> >> >> + test $(git rev-parse :0:y/b) = $(git rev-parse O:z/b) && >> > >> > There is a test

[PATCHv6 03/31] directory rename detection: testcases to avoid taking detection too far

2018-01-05 Thread Elijah Newren
) +' + +# Testcase 3b, Avoid implicit rename if involved as source on other side +# (Related to testcases 5c and 7c, also kind of 1e and 1f) +# Commit O: z/{b,c,d} +# Commit A: y/{b,c}, x/d +# Commit B: z/{b,c}, w/d +# Expected: y/{b,c}, CONFLICT:(z/d -> x/d vs. w/d) +#

[PATCHv6 02/31] directory rename detection: directory splitting testcases

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 143 1 file changed, 143 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index c68ae87f1..f36493289 100755 ---

[PATCHv6 11/31] directory rename detection: tests for handling overwriting dirty files

2018-01-05 Thread Elijah Newren
ectory-rename-detection and standard +# rename cases. +### + +# Testcase 11a, Avoid losing dirty contents with simple rename +# Commit O: z/{a,b_v1}, +# Commit A: z/{a,c_v1}, and z/c_v1 has uncommitted mods +# Commit B: z/{

[PATCHv6 04/31] directory rename detection: partially renamed directory testcase/discussion

2018-01-05 Thread Elijah Newren
merge. ### + +### +# SECTION 4: Partially renamed directory; still exists on both sides of merge +# +# What if we were to attempt to do directory rename detection when someone +# "mostly" moved a directory but still

[PATCHv6 09/31] directory rename detection: miscellaneous testcases to complete coverage

2018-01-05 Thread Elijah Newren
I came up with the testcases in the first eight sections before coding up the implementation. The testcases in this section were mostly ones I thought of while coding/debugging, and which I was too lazy to insert into the previous sections because I didn't want to re-label with all the testcase

[PATCHv6 06/31] directory rename detection: testcases checking which side did the rename

2018-01-05 Thread Elijah Newren
iles -o >out && + test_line_count = 1 out && + + git rev-parse >actual \ + :0:y/b :3:y/c && + git rev-parse >expect \ + O:z/b O:z/c && + test_cmp expect actu

[PATCHv6 10/31] directory rename detection: tests for handling overwriting untracked files

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 367 1 file changed, 367 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 717cf1483..5a2a4449d 100755 ---

Re: [PATCH v5 13/34] directory rename detection: tests for handling overwriting untracked files

2018-01-05 Thread Thomas Gummerer
On 01/04, Elijah Newren wrote: > On Wed, Jan 3, 2018 at 5:52 PM, SZEDER Gábor wrote: > > >> + test $(git rev-parse :0:y/b) = $(git rev-parse O:z/b) && > > > > There is a test helper for that :) > > > > test_cmp_rev :0:y/b O:z/b > > > > Note, that this is not

[PATCHv6 29/31] directory rename detection: new testcases showcasing a pair of bugs

2018-01-05 Thread Elijah Newren
Add a testcase showing spurious rename/rename(1to2) conflicts occurring due to directory rename detection. Also add a pair of testcases dealing with moving directory hierarchies around that were suggested by Stefan Beller as "food for thought" during his review of an earlier pa

[PATCHv6 01/31] directory rename detection: basic testcases

2018-01-05 Thread Elijah Newren
e able to handle +### + +# Testcase 1a, Basic directory rename. +# Commit O: z/{b,c} +# Commit A: y/{b,c} +# Commit B: z/{b,c,d,e/f} +# Expected: y/{b,c,d,e/f} + +test_expect_success '1a-setup: Simple directory rename detection' ' + tes

[PATCHv6 08/31] directory rename detection: testcases exploring possibly suboptimal merges

2018-01-05 Thread Elijah Newren
ad non-intuitive or suboptimal behavior for most +# of these cases in git before introducing implicit directory rename +# detection, but it'd be nice if there was a modified ruleset out there +# that handled these cases a bit

[PATCHv6 00/31] Add directory rename detection to git

2018-01-05 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.), and follow-up series can be found at https://public-inbox.org/git

[PATCHv6 07/31] directory rename detection: more involved edge/corner testcases

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 396 1 file changed, 396 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index dc3fc66e5..38ca791e9 100755 ---

[PATCHv6 05/31] directory rename detection: files/directories in the way of some renames

2018-01-05 Thread Elijah Newren
, y/{d,e_2} +# Commit B: y/{b,c,d} +# Expected: z/e_1, y/{b,c,d,e_2,f} + CONFLICT warning +# NOTE: While directory rename detection is active here causing z/f to +# become y/f, we did not apply this for z/e_1 because that would +# give us an add/add conflict for y/e_1 vs

Re: [PATCH v5 13/34] directory rename detection: tests for handling overwriting untracked files

2018-01-05 Thread SZEDER Gábor
On Thu, Jan 4, 2018 at 10:10 PM, Elijah Newren wrote: > On Wed, Jan 3, 2018 at 5:52 PM, SZEDER Gábor wrote: > >>> + test $(git rev-parse :0:y/b) = $(git rev-parse O:z/b) && >> >> There is a test helper for that :) >> >> test_cmp_rev :0:y/b

Re: [PATCH v5 13/34] directory rename detection: tests for handling overwriting untracked files

2018-01-04 Thread Elijah Newren
On Wed, Jan 3, 2018 at 5:52 PM, SZEDER Gábor wrote: >> + test $(git rev-parse :0:y/b) = $(git rev-parse O:z/b) && > > There is a test helper for that :) > > test_cmp_rev :0:y/b O:z/b > > Note, that this is not only a matter of useful output on failure, but >

  1   2   3   >