Re: Unable to shrink repository size

2014-03-05 Thread Elijah Newren
On Wed, Mar 5, 2014 at 6:55 PM, Robert Dailey rcdailey.li...@gmail.com wrote: What I'd like to do is somehow hunt down the largest commit (*not* blob) in the entire history of the repository to hopefully find out where huge directories have been checked in. I can't do a search for largest

Re: git reset for index restoration?

2014-05-22 Thread Elijah Newren
On Thu, May 22, 2014 at 9:22 AM, David Turner dtur...@twopensource.com wrote: If I have a git repository with a clean working tree, and I delete the index, then I can use git reset (with no arguments) to recreate it. However, when I do recreate it, it doesn't come back the same. I have not

Re: git-multimail: migration: Config is not iterable

2014-05-29 Thread Elijah Newren
On Thu, May 29, 2014 at 7:22 AM, Azat Khuzhin a3at.m...@gmail.com wrote: Hi there, Using the latest version of git-multimail there is an issue with migration: $ ~azat/git-multimail/git-multimail/migrate-mailhook-config --overwrite Traceback (most recent call last): ... File

Re: [RFC/PATCH 00/18] Add --index-only option to git merge

2016-04-08 Thread Elijah Newren
Hi, On Fri, Apr 8, 2016 at 11:08 AM, Junio C Hamano <gits...@pobox.com> wrote: > Elijah Newren <new...@gmail.com> writes: > > The goal is stated rather vaguely--when you have a working tree and > perform this "in index" merge, you would obviously update

Re: [RFC/PATCH 00/18] Add --index-only option to git merge

2016-04-09 Thread Elijah Newren
On Thu, Apr 7, 2016 at 11:58 PM, Elijah Newren <new...@gmail.com> wrote: > Luckily, I figured out that bug. So, that leaves just one case left > that I can't seem to figure out: read_tree_trivial. So much better, > right? Even it's name is sitting there, mocking m

[PATCH 4/6] merge-octopus: Abort if index does not match HEAD

2016-04-10 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- git-merge-octopus.sh | 6 ++ t/t6044-merge-unrelated-index-changes.sh | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index 8643f74..dc2fd1b

[PATCH 0/6] Miscellaneous merge fixes

2016-04-10 Thread Elijah Newren
these patches with my RFC series, I discovered our documentation used to explicitly state the expectation I enforced with these patches. I added a note about that in the commit message. The fifth and sixth patches test and fix a bug with trivial merges; these patches are new since my RFC series. Elijah

[PATCH 1/6] Remove duplicate code

2016-04-10 Thread Elijah Newren
file twice; removing it once is sufficient...especially since the intervening line was working with a different file entirely. Signed-off-by: Elijah Newren <new...@gmail.com> Reviewed-by: Junio C Hamano <gits...@pobox.com> --- merge-recursive.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH 2/6] Avoid checking working copy when creating a virtual merge base

2016-04-10 Thread Elijah Newren
, if not also a bit weird. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index d4292de..06d31ed 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@

[PATCH 6/6] builtin/merge.c: Fix a bug with trivial merges

2016-04-10 Thread Elijah Newren
erge_trivial() to fix this issue. Since the indirect call to write_locked_index() was conditional on cache_tree_fully_valid(), it won't be written twice. Signed-off-by: Elijah Newren <new...@gmail.com> --- builtin/merge.c | 8 t/t7605-merge-resolve.sh | 2 +- 2 files cha

[PATCH 3/6] Add merge testcases for when index doesn't match HEAD

2016-04-10 Thread Elijah Newren
-off-by: Elijah Newren <new...@gmail.com> --- t/t6044-merge-unrelated-index-changes.sh | 153 +++ 1 file changed, 153 insertions(+) create mode 100755 t/t6044-merge-unrelated-index-changes.sh diff --git a/t/t6044-merge-unrelated-index-changes.sh b/t/t6044

[PATCH 5/6] Add a testcase demonstrating a bug with trivial merges

2016-04-10 Thread Elijah Newren
as it was before the merge. Every attempt to repeat the merge beyond the first will leave the index in the same weird out-of-sync state. Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t7605-merge-resolve.sh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/t7605

Re: [RFC/PATCH 00/18] Add --index-only option to git merge

2016-04-08 Thread Elijah Newren
On Fri, Apr 8, 2016 at 6:01 AM, Michael J Gruber wrote: > I haven't looked at your series thoroughly but immediately had to think > of 'tr/remerge-diff' (on 'pu'), see > http://permalink.gmane.org/gmane.comp.version-control.git/256591 > > There, Thomas used index-only

[RFC/PATCH 13/18] Add --index-only support with read_tree_trivial merges, kind of

2016-04-08 Thread Elijah Newren
From: Elijah Newren <new...@palantir.com> This almost works. It creates the correct merge commit, updates the branch, but then if the repo is bare it leaves the index as it was before the merge (and if the repo is non-bare it updates the index). I'm totally lost as to why the testcase b

[RFC/PATCH 02/18] Avoid checking working copy when creating a virtual merge base

2016-04-08 Thread Elijah Newren
, if not also a bit weird. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index d4292de..06d31ed 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@

[RFC/PATCH 17/18] git-merge-resolve.sh: support --index-only option

2016-04-08 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- git-merge-resolve.sh| 12 ++-- t/t6043-merge-index-only.sh | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/git-merge-resolve.sh b/git-merge-resolve.sh index c9da747..ed4a25b 100755 --- a/git

[RFC/PATCH 05/18] Add testcase for --index-only merges needing the recursive strategy

2016-04-08 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-index-only.sh | 170 1 file changed, 170 insertions(+) create mode 100755 t/t6043-merge-index-only.sh diff --git a/t/t6043-merge-index-only.sh b/t/t6043-merge-index-only.sh ne

[RFC/PATCH 00/18] Add --index-only option to git merge

2016-04-08 Thread Elijah Newren
;Ha ha, I'm read_tree_*trivial* and you can't figure me out." read_tree_trivial is a jerk. Elijah Newren (18): Remove duplicate code Avoid checking working copy when creating a virtual merge base Document weird bug in octopus merges via testcases merge-octopus: Abort if i

[RFC/PATCH 03/18] Document weird bug in octopus merges via testcases

2016-04-08 Thread Elijah Newren
should add a testcase for unstaged and untracked changes for each merge strategy while I'm at it. Hmmm... Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6044-merge-unrelated-index-changes.sh | 165 +++ 1 file changed, 165 insertions(+) create mode 10

[RFC/PATCH 09/18] Add testcase for --index-only merges with the ours strategy

2016-04-08 Thread Elijah Newren
This is almost trivial to make work, because we already know that the working tree will need no modifications, but lets test it for completeness anyway. Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-index-only.sh | 32 1 file chang

[RFC/PATCH 16/18] git-merge-one-file.sh: support --index-only option

2016-04-08 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- git-merge-one-file.sh | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index 424b034..78efa00 100755 --- a/git-merge-one-file.sh

[RFC/PATCH 04/18] merge-octopus: Abort if index not clean

2016-04-08 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- git-merge-octopus.sh | 5 + t/t6044-merge-unrelated-index-changes.sh | 21 ++--- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index 8

[RFC/PATCH 07/18] Add testcase for --index-only merges with the resolve strategy

2016-04-08 Thread Elijah Newren
Including both tests which can be handled without calling the actual git-merge-resolve program (because the merge is trivially resolvable without worrying about 3-way file merges), and ones that do need it to be invoked. Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge

[RFC/PATCH 12/18] Add --index-only support for recursive merges

2016-04-08 Thread Elijah Newren
-only is passed or o->call_depth > 0, and make the portions of merge-recursive that are about operating only on the index look at o->index_only, and the portions that are about forcibly immediately resolving conflicts check o->call_depth. Signed-off-by: Elijah Newren <new...@gma

[RFC/PATCH 11/18] merge: Add a new --index-only option, not yet implemented

2016-04-08 Thread Elijah Newren
Subsequent commits will add implementation for each relevant merge strategy Signed-off-by: Elijah Newren <new...@gmail.com> --- Documentation/git-merge.txt | 14 ++ builtin/merge.c | 7 +++ git.c | 2 +- merge-recursive.c

[RFC/PATCH 06/18] Add testcase for --index-only merges needing an ff update

2016-04-08 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-index-only.sh | 70 + 1 file changed, 70 insertions(+) diff --git a/t/t6043-merge-index-only.sh b/t/t6043-merge-index-only.sh index b8b22ab..67c8e92 100755 --- a/t/t6043-merge

[RFC/PATCH 15/18] merge: Pass --index-only along to external merge strategy programs

2016-04-08 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- builtin/merge-index.c | 9 - builtin/merge.c | 2 +- cache.h | 2 +- merge.c | 4 +++- sequencer.c | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/builtin/merge-i

[RFC/PATCH 08/18] Add testcase for --index-only merges with the octopus strategy

2016-04-08 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-index-only.sh | 41 + 1 file changed, 41 insertions(+) diff --git a/t/t6043-merge-index-only.sh b/t/t6043-merge-index-only.sh index 4c3c40a..b01bf79 100755 --- a/t/t6043-merge-index-o

[RFC/PATCH 10/18] Add testcase for --index-only merges with the subtree strategy

2016-04-08 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-index-only.sh | 34 ++ 1 file changed, 34 insertions(+) diff --git a/t/t6043-merge-index-only.sh b/t/t6043-merge-index-only.sh index 84c6640..5eda6b3 100755 --- a/t/t6043-merge-index-only.sh +

[RFC/PATCH 01/18] Remove duplicate code

2016-04-08 Thread Elijah Newren
file twice; removing it once is sufficient...especially since the intervening line was working with a different file entirely. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c

[RFC/PATCH 18/18] git-merge-octopus.sh: support --index-only option

2016-04-08 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- git-merge-octopus.sh| 14 +++--- t/t6043-merge-index-only.sh | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index a1d7702..e7915dc 100755 --- a/git

[RFC/PATCH 14/18] Add --index-only support for ff_only merges

2016-04-08 Thread Elijah Newren
From: Elijah Newren <new...@palantir.com> Signed-off-by: Elijah Newren <new...@gmail.com> --- builtin/merge.c | 1 + builtin/pull.c | 4 ++-- cache.h | 1 + merge.c | 4 +++- sequencer.c | 2 +- t/t6043

Re: make test Unexpected passes

2016-04-22 Thread Elijah Newren
On Fri, Apr 22, 2016 at 1:05 PM, Ramsay Jones wrote: > Hi Ben, Junio, > > In the second case, t6036-*.sh, git bisect fingered commit b61f9d6e > ("ll-merge: use a longer conflict marker for internal merge", 14-04-2016). Yeah, the t6036 testcase 'git detects conflict

Re: make test Unexpected passes

2016-04-27 Thread Elijah Newren
On Wed, Apr 27, 2016 at 3:05 PM, Junio C Hamano wrote: > Isn't what the test expects bogus in the first place? I'd suggest > removing the test as "pointless waste of resource". > > Comments? > > -- >8 -- Yes, toss it; I find your arguments below compelling. > Manual merge

Re: [PATCH 0/6] Miscellaneous merge fixes

2016-04-15 Thread Elijah Newren
Hi, On Tue, Apr 12, 2016 at 6:23 PM, Junio C Hamano <gits...@pobox.com> wrote: > Elijah Newren <new...@gmail.com> writes: > >> Elijah Newren (6): >> Remove duplicate code >> Avoid checking working copy when creating a virtual merge base >> Add me

Re: What's cooking in git.git (Aug 2016, #03; Mon, 8)

2016-08-09 Thread Elijah Newren
Hi, On Mon, Aug 8, 2016 at 3:32 PM, Junio C Hamano wrote: > * js/am-3-merge-recursive-direct (2016-08-01) 16 commits > (merged to 'next' on 2016-08-05 at dc1c9bb) > + merge-recursive: flush output buffer even when erroring out > + merge_trees(): ensure that the callers

Re: [PATCH 11/30] directory rename detection: testcases exploring possibly suboptimal merges

2017-11-14 Thread Elijah Newren
On Tue, Nov 14, 2017 at 12:33 PM, Stefan Beller <sbel...@google.com> wrote: > On Fri, Nov 10, 2017 at 11:05 AM, Elijah Newren <new...@gmail.com> wrote: >> +# Possible Resolutions: >> +# Previous git: y/{a,b,f}, z/{c,d}, x/e >> +# Expected: y/{a,b,e,f}

Re: [PATCH 10/30] directory rename detection: more involved edge/corner testcases

2017-11-14 Thread Elijah Newren
On Mon, Nov 13, 2017 at 4:42 PM, Stefan Beller <sbel...@google.com> wrote: > On Fri, Nov 10, 2017 at 11:05 AM, Elijah Newren <new...@gmail.com> wrote: > "In my opinion" ... sounds like commit message? Sure, I can move it there. >> +# Testcase 7a, rename-di

Re: [PATCH 27/30] merge-recursive: Apply necessary modifications for directory renames

2017-11-15 Thread Elijah Newren
On Wed, Nov 15, 2017 at 12:23 PM, Stefan Beller wrote: >> + if (!strcmp(pair->one->path, pair->two->path)) { >> + /* >> +* Paths should only match if this was initially a >> +* non-rename that

Re: [PATCH] merge-recursive: ignore_case shouldn't reject intentional removals

2017-11-27 Thread Elijah Newren
[Removed cc's that just bounce] On Sun, Nov 26, 2017 at 7:40 PM, Junio C Hamano <gits...@pobox.com> wrote: > Elijah Newren <new...@gmail.com> writes: > >> In commit ae352c7f3 (merge-recursive.c: fix case-changing merge bug, >> 2014-05-01), it was observed that remov

Re: [PATCH v3 21/33] merge-recursive: add get_directory_renames()

2017-11-25 Thread Elijah Newren
On Sat, Nov 25, 2017 at 4:52 PM, Johannes Schindelin <johannes.schinde...@gmx.de> wrote: > On Tue, 21 Nov 2017, Elijah Newren wrote: > >> diff --git a/merge-recursive.c b/merge-recursive.c >> + if (old_len != new_len || strncmp(old_path, new_path, old_len)) { &

Re: [PATCH] merge-recursive: ignore_case shouldn't reject intentional removals

2017-11-25 Thread Elijah Newren
On Fri, Nov 24, 2017 at 7:29 PM, Junio C Hamano <gits...@pobox.com> wrote: > Elijah Newren <new...@gmail.com> writes: > >> But what it really is forced to do is more of a 4-way merge; a good >> chunk of its annoying complexity is based around this (undoc

Re: submodules and merging (Was: Re: [PATCH 02/30] merge-recursive: Fix logic ordering issue)

2017-11-25 Thread Elijah Newren
On Wed, Nov 15, 2017 at 9:13 AM, Jacob Keller wrote: > On Tue, Nov 14, 2017 at 10:13 AM, Stefan Beller wrote: >> But this line of though might be distracting from your original point, >> which was that we have so much to keep in mind when doing tree

Re: [PATCH v3 00/33] Add directory rename detection to git

2017-11-23 Thread Elijah Newren
On Thu, Nov 23, 2017 at 2:28 PM, Elijah Newren <new...@gmail.com> wrote: > On Thu, Nov 23, 2017 at 3:52 AM, Adam Dinwoodie <a...@dinwoodie.org> wrote: >> On Tuesday 21 November 2017 at 12:00 am -0800, Elijah Newren wrote: >>> >>> >>

Re: [PATCH v3 00/33] Add directory rename detection to git

2017-11-24 Thread Elijah Newren
On Thu, Nov 23, 2017 at 9:25 PM, Elijah Newren <new...@gmail.com> wrote: > On Thu, Nov 23, 2017 at 2:28 PM, Elijah Newren <new...@gmail.com> wrote: >> On Thu, Nov 23, 2017 at 3:52 AM, Adam Dinwoodie <a...@dinwoodie.org> wrote: >>> On Tuesday 21 November 2017 at

Re: [PATCH] merge-recursive: ignore_case shouldn't reject intentional removals

2017-11-24 Thread Elijah Newren
On Fri, Nov 24, 2017 at 12:04 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Fri, Nov 24, 2017 at 2:59 PM, Elijah Newren <new...@gmail.com> wrote: >> In commit ae352c7f3 (merge-recursive.c: fix case-changing merge bug, >> 2014-05-01), it was observe

[PATCH] merge-recursive: ignore_case shouldn't reject intentional removals

2017-11-24 Thread Elijah Newren
In commit ae352c7f3 (merge-recursive.c: fix case-changing merge bug, 2014-05-01), it was observed that removing files could be problematic on case insensitive file systems, because we could end up removing files that differed in case only rather than deleting the intended file -- something that

Re: [PATCH v3 00/33] Add directory rename detection to git

2017-11-22 Thread Elijah Newren
On Wed, Nov 22, 2017 at 11:24 AM, Stefan Beller <sbel...@google.com> wrote: > On Tue, Nov 21, 2017 at 5:12 PM, Elijah Newren <new...@gmail.com> wrote: >> On Tue, Nov 21, 2017 at 4:42 PM, Stefan Beller <sbel...@google.com> wrote: >>> On Tue, Nov 21, 2017 at 12:00

[PATCH v4 24/34] merge-recursive: add a new hashmap for storing file collisions

2017-11-28 Thread Elijah Newren
will be used for this purpose. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 23 +++ merge-recursive.h | 7 +++ 2 files changed, 30 insertions(+) diff --git a/merge-recursive.c b/merge-recursive.c index d92fba2775..6bd4f34d55 100644 --- a

[PATCH v4 15/34] merge-recursive: move the get_renames() function

2017-11-28 Thread Elijah Newren
I want to re-use some other functions in the file without moving those other functions or dealing with a handful of annoying split function declarations and definitions. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c

[PATCH v4 12/34] directory rename detection: miscellaneous testcases to complete coverage

2017-11-28 Thread Elijah Newren
references. :-) Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 536 +++- 1 file changed, 535 insertions(+), 1 deletion(-) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh

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

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 337 1 file changed, 337 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 42228a60aa..00b0ee7f08

[PATCH v4 18/34] merge-recursive: make !o->detect_rename codepath more obvious

2017-11-28 Thread Elijah Newren
Previously, if !o->detect_rename then get_renames() would return an empty string_list, and then process_renames() would have nothing to iterate over. It seems more straightforward to simply avoid calling either function in that case. Signed-off-by: Elijah Newren <new...@gmail.com> -

[PATCH v4 23/34] merge-recursive: check for directory level conflicts

2017-11-28 Thread Elijah Newren
Before trying to apply directory renames to paths within the given directories, we want to make sure that there aren't conflicts at the directory level. There will be additional checks at the individual file level too, which will be added later. Signed-off-by: Elijah Newren <new...@gmail.

[PATCH v4 00/34] Add directory rename detection to git

2017-11-28 Thread Elijah Newren
status == 'D') -+ if (pair->status == 'D' || pair->status == 'M') ++ if (pair->status != 'A' && pair->status != 'R') continue; dir_rename_ent = check_dir_renamed(pair->two->path,

[PATCH v4 28/34] merge-recursive: apply necessary modifications for directory renames

2017-11-28 Thread Elijah Newren
This commit hooks together all the directory rename logic by making the necessary changes to the rename struct, it's dst_entry, and the diff_filepair under consideration. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c

[PATCH v4 25/34] merge-recursive: add computation of collisions due to dir rename & merging

2017-11-28 Thread Elijah Newren
-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 123 -- 1 file changed, 120 insertions(+), 3 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index 6bd4f34d55..9e31baaf33 100644 --- a/merge-recursive.c +++ b

[PATCH v4 05/34] directory rename detection: directory splitting testcases

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 137 1 file changed, 137 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index d8ead7c56b..335aa1c145

[PATCH v4 04/34] directory rename detection: basic testcases

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 430 1 file changed, 430 insertions(+) create mode 100755 t/t6043-merge-rename-directories.sh diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-

[PATCH v4 06/34] directory rename detection: testcases to avoid taking detection too far

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 150 1 file changed, 150 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 335aa1c145..0ccabed4a2

[PATCH v4 33/34] merge-recursive: avoid spurious rename/rename conflict from dir renames

2017-11-28 Thread Elijah Newren
that a directory rename testcase that was previously reported as a rename/delete conflict will now be reported as a modify/delete conflict. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 4 +-- t/t6043-merge-rename-directories.s

[PATCH v4 14/34] directory rename detection: tests for handling overwriting dirty files

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 436 1 file changed, 436 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 00b0ee7f08..0644b95ec5

[PATCH v4 16/34] merge-recursive: introduce new functions to handle rename logic

2017-11-28 Thread Elijah Newren
of that function because they store the information referenced in the rename_conflict_info, which is used later in process_entry(). Thus the reason for a separate cleanup_renames(). Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 43 +---

[PATCH v4 26/34] merge-recursive: check for file level conflicts then get new name

2017-11-28 Thread Elijah Newren
Before trying to apply directory renames to paths within the given directories, we want to make sure that there aren't conflicts at the file level either. If there aren't any, then get the new name from any directory renames. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recur

[PATCH v4 21/34] merge-recursive: make a helper function for cleanup for handle_renames

2017-11-28 Thread Elijah Newren
we can't do all the cleanup at once. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index 0cb27c66e2..c5932d5c57 100644 --- a/merge-recur

[PATCH v4 10/34] directory rename detection: more involved edge/corner testcases

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 381 1 file changed, 381 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 5db2986de8..2c57a02c6d

[PATCH v4 27/34] merge-recursive: when comparing files, don't include trees

2017-11-28 Thread Elijah Newren
to files; the D/F conflict handling is done elsewhere. This code is just concerned with what entries existed for a given path on the different sides of the merge, so create a get_tree_entry_if_blob() helper function and use it. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.

[PATCH v4 32/34] directory rename detection: new testcases showcasing a pair of bugs

2017-11-28 Thread Elijah Newren
tch series, but which actually uncovered a bug. Round things out with a test that is a cross between the two testcases that showed existing bugs in order to make sure we aren't merely addressing problems in isolation but in general. Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6

[PATCH v4 03/34] merge-recursive: add explanation for src_entry and dst_entry

2017-11-28 Thread Elijah Newren
If I have to walk through the debugger and inspect the values found in here in order to figure out their meaning, despite having known these things inside and out some years back, then they probably need a comment for the casual reader to explain their purpose. Signed-off-by: Elijah Newren <

[PATCH v4 31/34] merge-recursive: fix remaining directory rename + dirty overwrite cases

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 26 +++--- t/t6043-merge-rename-directories.sh | 8 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index 2b8a

[PATCH v4 17/34] merge-recursive: fix leaks of allocated renames and diff_filepairs

2017-11-28 Thread Elijah Newren
-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index e95eac2c70..cdd0afa047 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1653,13 +1

[PATCH v4 11/34] directory rename detection: testcases exploring possibly suboptimal merges

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 394 1 file changed, 394 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 2c57a02c6d..fc9b13c37d

[PATCH v4 02/34] merge-recursive: fix logic ordering issue

2017-11-28 Thread Elijah Newren
demonstrating any bugs with the old ordering, but I suspect there were some for both normal renames and for directory renames. Fix the ordering. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/merge-recursi

[PATCH v4 22/34] merge-recursive: add get_directory_renames()

2017-11-28 Thread Elijah Newren
This populates a list of directory renames for us. The list of directory renames is not yet used, but will be in subsequent commits. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 155 -- 1 file changed, 152 inse

[PATCH v4 19/34] merge-recursive: split out code for determining diff_filepairs

2017-11-28 Thread Elijah Newren
Create a new function, get_diffpairs() to compute the diff_filepairs between two trees. While these are currently only used in get_renames(), I want them to be available to some new functions. No actual logic changes yet. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recur

[PATCH v4 09/34] directory rename detection: testcases checking which side did the rename

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 321 1 file changed, 321 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 29b2af7f19..5db2986de8

[PATCH v4 20/34] merge-recursive: add a new hashmap for storing directory renames

2017-11-28 Thread Elijah Newren
This just adds dir_rename_entry and the associated functions; code using these will be added in subsequent commits. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 35 +++ merge-recursive.h | 8 2 files changed, 43 inse

[PATCH v4 07/34] directory rename detection: partially renamed directory testcase/discussion

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 104 1 file changed, 104 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 0ccabed4a2..1dcf010aa6

[PATCH v4 30/34] merge-recursive: fix overwriting dirty files involved in renames

2017-11-28 Thread Elijah Newren
in a subsequent commit. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 85 - merge-recursive.h | 2 + t/t3501-revert-cherry-pick.sh | 2 +- t/t6043-merge-rename-directories.sh | 2 +- t/t7607

[PATCH v4 01/34] Tighten and correct a few testcases for merging and cherry-picking

2017-11-28 Thread Elijah Newren
t expected the merge to succeed. Fix that, and add a few more checks to make sure that the merge really does produce the expected results. Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t3501-revert-cherry-pick.sh | 7 +-- t/t7607-merge-overwrite.sh| 5 - 2 files changed, 9

[PATCH v4 34/34] merge-recursive: ensure we write updates for directory-renamed file

2017-11-28 Thread Elijah Newren
, we have to move the file to a new location and re-write it. Update the code that checks whether we can skip the update to also work in the presence of directory renames. Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 4 +--- t/t6043-merge-

[PATCH v4 29/34] merge-recursive: avoid clobbering untracked files with directory renames

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- merge-recursive.c | 42 +++-- t/t6043-merge-rename-directories.sh | 6 +++--- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c

[PATCH v4 08/34] directory rename detection: files/directories in the way of some renames

2017-11-28 Thread Elijah Newren
Signed-off-by: Elijah Newren <new...@gmail.com> --- t/t6043-merge-rename-directories.sh | 320 1 file changed, 320 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 1dcf010aa6..29b2af7f19

[PATCH] strbuf: Remove unused stripspace function alias

2017-11-28 Thread Elijah Newren
remove the old alias. Signed-off-by: Elijah Newren <new...@gmail.com> --- strbuf.h | 9 - 1 file changed, 9 deletions(-) diff --git a/strbuf.h b/strbuf.h index 0a74acb236..14c8c10d66 100644 --- a/strbuf.h +++ b/strbuf.h @@ -480,15 +480,6 @@ extern int strbuf_normalize_path(struct strb

Re: [PATCH on en/rename-progress v2] diffcore-rename: make diff-tree -l0 mean -l

2017-11-29 Thread Elijah Newren
t; > v2 is exactly the same as previously, except that the commit message is > changed following Elijah Newren's and Jonathan Nieder's comments. > --- > diffcore-rename.c | 2 ++ > t/t4001-diff-rename.sh | 15 +++ > 2 files changed, 17 insertions(+) Reviewed-by: Elijah Newren <new...@gmail.com> Thanks.

Re: [PATCH] merge-recursive: ignore_case shouldn't reject intentional removals

2017-11-27 Thread Elijah Newren
On Mon, Nov 27, 2017 at 3:39 PM, Junio C Hamano <gits...@pobox.com> wrote: > Elijah Newren <new...@gmail.com> writes: > >>> As a fix, this sorely wants something new in t/ directory. >> >> Well, then perhaps I was wrong to submit it independent of m

Re: [PATCH v3 00/33] Add directory rename detection to git

2017-11-23 Thread Elijah Newren
On Thu, Nov 23, 2017 at 3:52 AM, Adam Dinwoodie <a...@dinwoodie.org> wrote: > On Tuesday 21 November 2017 at 12:00 am -0800, Elijah Newren wrote: >> >> >> merge-recursive.c | 1243 +++- >> merge-recursive.h | 17 +

Re: [PATCH on en/rename-progress] diffcore-rename: make diff-tree -l0 mean -l

2017-11-29 Thread Elijah Newren
On Wed, Nov 29, 2017 at 10:32 AM, Jonathan Tan wrote: > In the documentation of diff-tree, it is stated that the -l option > "prevents rename/copy detection from running if the number of > rename/copy targets exceeds the specified number". The documentation > does not

Re: What's cooking in git.git (Dec 2017, #01; Mon, 4)

2017-12-04 Thread Elijah Newren
On Mon, Dec 4, 2017 at 1:46 PM, Junio C Hamano wrote: > * en/rename-directory-detection (2017-11-21) 33 commits > Rename detection logic in "diff" family that is used in "merge" has > learned to guess when all of x/a, x/b and x/c have moved to z/a, > z/b and z/c, it is

Re: [PATCH v4 00/34] Add directory rename detection to git

2017-12-13 Thread Elijah Newren
On Tue, Dec 12, 2017 at 6:01 PM, Junio C Hamano wrote: > OK, it seems that I managed to make this test pass under poison build > (see https://travis-ci.org/git/git/jobs/315658242) > > Please check > https://github.com/git/git/commit/e5c5e24ad91a75b5a70c056fe6c6e3bfb55b56fc >

Re: [RFC PATCH 4/9] Add testcases for improved file collision conflict handling

2017-11-11 Thread Elijah Newren
On Fri, Nov 10, 2017 at 2:21 PM, Elijah Newren <new...@gmail.com> wrote: > Adds testcases dealing with file collisions for the following types of > conflicts: > * add/add > * rename/add > * rename/rename(2to1) > --- > t/t6036-recursive-corner-cases.sh| 8 +-

Re: [PATCH 2/4] Remove silent clamp of renameLimit

2017-11-11 Thread Elijah Newren
Hi, On Fri, Nov 10, 2017 at 3:42 PM, brian m. carlson <sand...@crustytoothpaste.net> wrote: > On Fri, Nov 10, 2017 at 10:36:17AM -0800, Elijah Newren wrote: >> Further, the later patch used uint64_t instead of double. While >> double works, perhaps I should change the do

Re: [RFC PATCH 3/9] merge-recursive: New function for better colliding conflict resolutions

2017-11-11 Thread Elijah Newren
On Fri, Nov 10, 2017 at 2:21 PM, Elijah Newren <new...@gmail.com> wrote: > There are three conflict types that represent two (possibly entirely > unrelated) files colliding at the same location: > If the files are similar enough, the two-way merge is probably > preferab

Re: [PATCH 0/4] Fix issues with rename detection limits

2017-11-10 Thread Elijah Newren
On Fri, Nov 10, 2017 at 10:13 AM, Elijah Newren <new...@gmail.com> wrote: > In a repo with around 60k files with deep directory hierarchies (due to > Elijah Newren (4): > sequencer: Warn when internal merge may be suboptimal due to > renameLimit > Remove silent

[PATCH 4/4] sequencer: Show rename progress during cherry picks

2017-11-10 Thread Elijah Newren
When trying to cherry-pick a change that has lots of renames, it is somewhat unsettling to wait a really long time without any feedback. Signed-off-by: Elijah Newren <new...@gmail.com> --- sequencer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sequencer.c b/sequencer.c index 2b4c

Re: cherry-pick very slow on big repository

2017-11-10 Thread Elijah Newren
Interesting timing. I have some performance patches specifically developed because rename detection during merges made a small cherry-pick in a large repo rather slow...in my case, I dropped the time for the cherry pick by a factor of about 30 (no guarantees you'll see the same; it's very

[PATCH 2/4] Remove silent clamp of renameLimit

2017-11-10 Thread Elijah Newren
met with the same failure. Although large limits can make things slow, we have users who would be ecstatic to have a small five file change be correctly cherry picked even if they have to manually specify a large limit and it took git ten minutes to compute it. Signed-off-by: Elijah Newren <new...@gma

[PATCH 0/4] Fix issues with rename detection limits

2017-11-10 Thread Elijah Newren
thing higher." When they responded that merge.renameLimit didn't work, I didn't believe them. This patch series, along with two others that I will be sending shortly, represent my attempt to continue to not believe them. :-) Elijah Newren (4): sequencer: Warn when internal merge may be

[PATCH 0/4] Fix issues with rename detection limits

2017-11-10 Thread Elijah Newren
thing higher." When they responded that merge.renameLimit didn't work, I didn't believe them. This patch series, along with two others that I will be sending shortly, represent my attempt to continue to not believe them. :-) Elijah Newren (4): sequencer: Warn when internal merge may be

Re: [PATCH 2/4] Remove silent clamp of renameLimit

2017-11-10 Thread Elijah Newren
Thanks for taking a look! On Fri, Nov 10, 2017 at 10:26 AM, Stefan Beller wrote: >> - if (rename_limit <= 0 || rename_limit > 32767) >> - rename_limit = 32767; >> if ((num_create <= rename_limit || num_src <= rename_limit) && >> -

  1   2   3   4   5   6   7   8   9   10   >