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

2018-01-30 Thread Elijah Newren
When a file is present in HEAD before the merge and the other side of the merge does not modify that file, we try to avoid re-writing the file and making it stat-dirty. However, when a file is present in HEAD before the merge and was in a directory that was renamed by the other side of the merge,

[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/20171120220209.15111

[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 --- a/t/t6043-merge-renam

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

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

[PATCH v7 19/31] merge-recursive: add get_directory_renames()

2018-01-30 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 --- merge-recursive.c | 155 -- 1 file changed, 152 insertions(+), 3 deletions(-)

[PATCH v7 18/31] merge-recursive: make a helper function for cleanup for handle_renames

2018-01-30 Thread Elijah Newren
In anticipation of more involved cleanup to come, make a helper function for doing the cleanup at the end of handle_renames. Rename the already existing cleanup_rename[s]() to final_cleanup_rename[s](), name the new helper initial_cleanup_rename(), and leave the big comment in the code about why w

[PATCH v7 13/31] merge-recursive: introduce new functions to handle rename logic

2018-01-30 Thread Elijah Newren
The amount of logic in merge_trees() relative to renames was just a few lines, but split it out into new handle_renames() and cleanup_renames() functions to prepare for additional logic to be added to each. No code or logic changes, just a new place to put stuff for when the rename detection gains

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

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

[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 patch series, but whic

[PATCH v7 17/31] merge-recursive: add a new hashmap for storing directory renames

2018-01-30 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 --- merge-recursive.c | 35 +++ merge-recursive.h | 8 2 files changed, 43 insertions(+) diff --git a/merge-

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

2018-01-30 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 442 1 file changed, 442 insertions(+) create mode 100755 t/t6043-merge-rename-directories.sh diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh new f

[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 --- a/t/t6043-merge-renam

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

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

[PATCH v7 21/31] merge-recursive: add a new hashmap for storing file collisions

2018-01-30 Thread Elijah Newren
Directory renames with the ability to merge directories opens up the possibility of add/add/add/.../add conflicts, if each of the N directories being merged into one target directory all had a file with the same name. We need a way to check for and report on such collisions; this hashmap will be u

[PATCH v7 27/31] merge-recursive: fix overwriting dirty files involved in renames

2018-01-30 Thread Elijah Newren
This fixes an issue that existed before my directory rename detection patches that affects both normal renames and renames implied by directory rename detection. Additional codepaths that only affect overwriting of directy files that are involved in directory rename detection will be added in a su

[PATCH v7 26/31] merge-recursive: avoid clobbering untracked files with directory renames

2018-01-30 Thread Elijah Newren
Signed-off-by: Elijah Newren --- 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 index 7c78dc2dc1..39e161e094 1006

[PATCH v7 12/31] merge-recursive: move the get_renames() function

2018-01-30 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 --- merge-recursive.c | 139 +++--- 1 file change

[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 re

Re: [PATCH 00/37] removal of some c++ keywords

2018-01-30 Thread Duy Nguyen
On Wed, Jan 31, 2018 at 6:01 AM, Stefan Beller wrote: > On Tue, Jan 30, 2018 at 2:36 PM, Junio C Hamano wrote: >> Duy Nguyen writes: >> >>> Is it simpler (though hacky) to just do >>> >>> #ifdef __cplusplus >>> #define new not_new >>> #define try really_try >>> ... >>> >>> somewhere in git-comp

Re: [PATCH 00/37] removal of some c++ keywords

2018-01-30 Thread Stefan Beller
On Tue, Jan 30, 2018 at 4:48 PM, Duy Nguyen wrote: > On Wed, Jan 31, 2018 at 6:01 AM, Stefan Beller wrote: >> On Tue, Jan 30, 2018 at 2:36 PM, Junio C Hamano wrote: >>> Duy Nguyen writes: >>> Is it simpler (though hacky) to just do #ifdef __cplusplus #define new not_new >>>

Re: [RFC PATCH 0/2] alternate hash test

2018-01-30 Thread Stefan Beller
On Sun, Jan 28, 2018 at 9:06 AM, brian m. carlson wrote: > This series wires up an alternate hash implementation, namely > BLAKE2b-160. The goal is to allow us to identify tests which rely on > the hash algorithm in use so that we can fix those tests. > > For this test, I picked BLAKE2b-160 for a

Re: [PATCH 00/37] removal of some c++ keywords

2018-01-30 Thread Duy Nguyen
On Wed, Jan 31, 2018 at 7:57 AM, Stefan Beller wrote: >> There's also C99 designator in builtin/clean.c (I thought we avoided >> C99, I can start using this specific feature more now :D) > > That was a test balloon? See 512f41cfac > (clean.c: use designated initializer, 2017-07-14) Aww.. I though

[ANNOUNCE] tig-2.3.3

2018-01-30 Thread Jonas Fonseca
Hello, A regression in 2.3.1 (and 2.3.2) related with the detection of busy loops has been revisited in version 2.3.3. Release notes - Bug fixes: - Revert "Handle \n like \r (#758)". (GH #769) - Fix GH #164 by catching SIGHUP. - Change `refs_tags` type to `size_t`. Change summar

Re: [PATCH v2 02/14] graph: add commit graph design document

2018-01-30 Thread Stefan Beller
On Tue, Jan 30, 2018 at 1:39 PM, Derrick Stolee wrote: > Add Documentation/technical/commit-graph.txt with details of the planned > commit graph feature, including future plans. > > Signed-off-by: Derrick Stolee > --- > Documentation/technical/commit-graph.txt | 189 > ++

Re: [PATCH v2 06/14] commit-graph: implement git-commit-graph --read

2018-01-30 Thread Stefan Beller
> +static void free_commit_graph(struct commit_graph **g) > +{ > + if (!g || !*g) > + return; > + > + close_commit_graph(*g); > + > + free(*g); > + *g = NULL; nit: You may want to use FREE_AND_NULL(*g) instead.

Re: [PATCH RFC 01/24] ref-filter: get rid of goto

2018-01-30 Thread Оля Тележная
2018-01-30 23:49 GMT+03:00 Junio C Hamano : > Оля Тележная writes: > >>> one place improves readability. If better readability is the >>> purpose, I would even say >>> >>> for (i = 0; i < used_atom_cnt; i++) { >>> if (...) >>> - goto need_obj; >>> +

<    1   2