Re: [PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-27 Thread Johannes Schindelin
Hi Junio,

On Tue, 27 Mar 2018, Junio C Hamano wrote:

> Johannes Schindelin  writes:
> 
> > This iteration, with the SQUASH??? I proposed (and that Junio will
> > hopefully pick up soon), works well on Windows.
> 
> Thanks; is that the "call it fn, as main is macro-ed away by us?"
> change?

Precisely.

Thanks,
Dscho


Re: [PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-27 Thread Junio C Hamano
Johannes Schindelin  writes:

> This iteration, with the SQUASH??? I proposed (and that Junio will
> hopefully pick up soon), works well on Windows.

Thanks; is that the "call it fn, as main is macro-ed away by us?"
change?


Re: [PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-27 Thread Johannes Schindelin
Hi Duy,

On Sat, 24 Mar 2018, Nguyễn Thái Ngọc Duy wrote:

> v2 fixes a couple of typos in commit messages and use the cmd__ prefix
> for test commands instead of test_, which avoids a naming conflict
> with the existing function test_lazy_init_name_hash
> 
> [the previous v2 send out was aborted because I messed it up with some
> other patches]

This iteration, with the SQUASH??? I proposed (and that Junio will
hopefully pick up soon), works well on Windows.

Thank you,
Dscho

Re: [PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-25 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy   writes:

> v2 fixes a couple of typos in commit messages and use the cmd__ prefix
> for test commands instead of test_, which avoids a naming conflict
> with the existing function test_lazy_init_name_hash
>
> [the previous v2 send out was aborted because I messed it up with some
> other patches]

Yeah, I was wondering if the 7 v4 patches for --keep-pack should be
picked up, or I should just wait for a proper resubmission under its
own cover letter.


Re: [PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-24 Thread Duy Nguyen
On Sat, Mar 24, 2018 at 1:50 PM, Ævar Arnfjörð Bjarmason
 wrote:
>
> On Sat, Mar 24 2018, Nguyễn Thái Ngọc Duy wrote:
>
>> v2 fixes a couple of typos in commit messages and use the cmd__ prefix
>> for test commands instead of test_, which avoids a naming conflict
>> with the existing function test_lazy_init_name_hash
>>
>> [the previous v2 send out was aborted because I messed it up with some
>> other patches]
>
> This whole thing looks good to me, and I've applied it to my own build
> and run several modes (normal, split index etc.) of the test suite with
> it. Didn't get any problems.
>
> Micronit: If you M-x sort-lines (and I assume similar in other editors
> that have a function to sort stuff in ASCII order) the test-tool.c list
> you get this diff on top:
>
> diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
> index cd5e28b045..c38939b93e 100644
> --- a/t/helper/test-tool.c
> +++ b/t/helper/test-tool.c
> @@ -32,8 +32,8 @@ static struct test_cmd cmds[] = {
> { "revision-walking", cmd__revision_walking },
> { "run-command", cmd__run_command },
> { "scrap-cache-tree", cmd__scrap_cache_tree },
> -   { "sha1-array", cmd__sha1_array },
> { "sha1", cmd__sha1 },
> +   { "sha1-array", cmd__sha1_array },
> { "sigchain", cmd__sigchain },
> { "strcmp-offset", cmd__strcmp_offset },
> { "string-list", cmd__string_list },
>
> I think it makes sense to keep such lists in ASCII order (" before -)
> for subsequent edits where one or more things are added to the list and
> then sorted before submission.

Yeah, my brain just failed to see that sha1-array should be behind
sha1. Bad brain!
-- 
Duy


Re: [PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-24 Thread Ævar Arnfjörð Bjarmason

On Sat, Mar 24 2018, Nguyễn Thái Ngọc Duy wrote:

> v2 fixes a couple of typos in commit messages and use the cmd__ prefix
> for test commands instead of test_, which avoids a naming conflict
> with the existing function test_lazy_init_name_hash
>
> [the previous v2 send out was aborted because I messed it up with some
> other patches]

This whole thing looks good to me, and I've applied it to my own build
and run several modes (normal, split index etc.) of the test suite with
it. Didn't get any problems.

Micronit: If you M-x sort-lines (and I assume similar in other editors
that have a function to sort stuff in ASCII order) the test-tool.c list
you get this diff on top:

diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index cd5e28b045..c38939b93e 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -32,8 +32,8 @@ static struct test_cmd cmds[] = {
{ "revision-walking", cmd__revision_walking },
{ "run-command", cmd__run_command },
{ "scrap-cache-tree", cmd__scrap_cache_tree },
-   { "sha1-array", cmd__sha1_array },
{ "sha1", cmd__sha1 },
+   { "sha1-array", cmd__sha1_array },
{ "sigchain", cmd__sigchain },
{ "strcmp-offset", cmd__strcmp_offset },
{ "string-list", cmd__string_list },

I think it makes sense to keep such lists in ASCII order (" before -)
for subsequent edits where one or more things are added to the list and
then sorted before submission.


[PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-24 Thread Nguyễn Thái Ngọc Duy
v2 fixes a couple of typos in commit messages and use the cmd__ prefix
for test commands instead of test_, which avoids a naming conflict
with the existing function test_lazy_init_name_hash

[the previous v2 send out was aborted because I messed it up with some
other patches]

Nguyễn Thái Ngọc Duy (36):
  t/helper: add an empty test-tool program
  t/helper: merge test-chmtime into test-tool
  t/helper: merge test-sha1 into test-tool
  t/helper: merge test-lazy-init-name-hash into test-tool
  t/helper: merge test-config into test-tool
  t/helper: merge test-ctype into test-tool
  t/helper: merge test-date into test-tool
  t/helper: merge (unused) test-delta into test-tool
  t/helper: merge test-drop-caches into test-tool
  t/helper: merge test-dump-cache-tree into test-tool
  t/helper: merge test-dump-split-index into test-tool
  t/helper: merge test-example-decorate into test-tool
  t/helper: merge test-genrandom into test-tool
  t/helper: merge test-hashmap into test-tool
  t/helper: merge test-index-version into test-tool
  t/helper: merge (unused) test-match-trees into test-tool
  t/helper: merge (unused) test-mergesort into test-tool
  t/helper: merge test-mktemp into test-tool
  t/helper: merge test-online-cpus into test-tool
  t/helper: merge test-path-utils into test-tool
  t/helper: merge test-prio-queue into test-tool
  t/helper: merge test-read-cache into test-tool
  t/helper: merge test-ref-store into test-tool
  t/helper: merge test-regex into test-tool
  t/helper: merge test-revision-walking into test-tool
  t/helper: merge test-run-command into test-tool
  t/helper: merge test-scrap-cache-tree into test-tool
  t/helper: merge test-sha1-array into test-tool
  t/helper: merge test-sigchain into test-tool
  t/helper: merge test-strcmp-offset into test-tool
  t/helper: merge test-string-list into test-tool
  t/helper: merge test-submodule-config into test-tool
  t/helper: merge test-subprocess into test-tool
  t/helper: merge test-urlmatch-normalization into test-tool
  t/helper: merge test-wildmatch into test-tool
  t/helper: merge test-write-cache into test-tool

 .../howto/recover-corrupted-object-harder.txt |   2 +-
 Makefile  |  79 +++---
 t/helper/test-chmtime.c   |  15 +-
 t/helper/test-config.c|   5 +-
 t/helper/test-ctype.c |   3 +-
 t/helper/test-date.c  |  17 +-
 t/helper/test-delta.c |   5 +-
 t/helper/test-drop-caches.c   |   3 +-
 t/helper/test-dump-cache-tree.c   |   3 +-
 t/helper/test-dump-split-index.c  |   3 +-
 t/helper/test-example-decorate.c  |   3 +-
 t/helper/test-genrandom.c |   3 +-
 t/helper/test-hashmap.c   |   5 +-
 t/helper/test-index-version.c |   3 +-
 t/helper/test-lazy-init-name-hash.c   |  13 +-
 t/helper/test-match-trees.c   |   3 +-
 t/helper/test-mergesort.c |   3 +-
 t/helper/test-mktemp.c|   3 +-
 t/helper/test-online-cpus.c   |   3 +-
 t/helper/test-path-utils.c|   3 +-
 t/helper/test-prio-queue.c|   3 +-
 t/helper/test-read-cache.c|   3 +-
 t/helper/test-ref-store.c |   3 +-
 t/helper/test-regex.c |   7 +-
 t/helper/test-revision-walking.c  |   3 +-
 t/helper/test-run-command.c   |   3 +-
 t/helper/test-scrap-cache-tree.c  |   3 +-
 t/helper/test-sha1-array.c|   3 +-
 t/helper/test-sha1.c  |   3 +-
 t/helper/test-sha1.sh |   4 +-
 t/helper/test-sigchain.c  |   3 +-
 t/helper/test-strcmp-offset.c |   3 +-
 t/helper/test-string-list.c   |   3 +-
 t/helper/test-submodule-config.c  |   3 +-
 t/helper/test-subprocess.c|   3 +-
 t/helper/test-tool.c  |  62 
 t/helper/test-tool.h  |  40 +++
 t/helper/test-urlmatch-normalization.c|   5 +-
 t/helper/test-wildmatch.c |   3 +-
 t/helper/test-write-cache.c   |   3 +-
 t/lib-git-p4.sh   |   2 +-
 t/lib-git-svn.sh  |   2 +-
 t/lib-pack.sh |   2 +-
 t/perf/p0002-read-cache.sh|   2 +-
 t/perf/p0004-lazy-init-name-hash.sh   |   8 +-
 t/perf/p0007-write-cache.sh   |   2 +-
 t/perf/p0071-sort.sh  |   2 +-
 t/perf/p7519-fsmonitor.sh |  12 +-
 t/t0005-signals.sh|   6 +-
 t/t0006-date.sh   |   8 +-
 t/t0009-prio-queue.sh |   6 +-
 t/t0011-hashmap.sh 

[PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-24 Thread Nguyễn Thái Ngọc Duy
v2 fixes a couple of typos in commit messages and use the cmd__ prefix
for test commands instead of test_, which avoids a naming conflict
with the existing function test_lazy_init_name_hash

Nguyễn Thái Ngọc Duy (36):
  t/helper: add an empty test-tool program
  t/helper: merge test-chmtime into test-tool
  t/helper: merge test-sha1 into test-tool
  t/helper: merge test-lazy-init-name-hash into test-tool
  t/helper: merge test-config into test-tool
  t/helper: merge test-ctype into test-tool
  t/helper: merge test-date into test-tool
  t/helper: merge (unused) test-delta into test-tool
  t/helper: merge test-drop-caches into test-tool
  t/helper: merge test-dump-cache-tree into test-tool
  t/helper: merge test-dump-split-index into test-tool
  t/helper: merge test-example-decorate into test-tool
  t/helper: merge test-genrandom into test-tool
  t/helper: merge test-hashmap into test-tool
  t/helper: merge test-index-version into test-tool
  t/helper: merge (unused) test-match-trees into test-tool
  t/helper: merge (unused) test-mergesort into test-tool
  t/helper: merge test-mktemp into test-tool
  t/helper: merge test-online-cpus into test-tool
  t/helper: merge test-path-utils into test-tool
  t/helper: merge test-prio-queue into test-tool
  t/helper: merge test-read-cache into test-tool
  t/helper: merge test-ref-store into test-tool
  t/helper: merge test-regex into test-tool
  t/helper: merge test-revision-walking into test-tool
  t/helper: merge test-run-command into test-tool
  t/helper: merge test-scrap-cache-tree into test-tool
  t/helper: merge test-sha1-array into test-tool
  t/helper: merge test-sigchain into test-tool
  t/helper: merge test-strcmp-offset into test-tool
  t/helper: merge test-string-list into test-tool
  t/helper: merge test-submodule-config into test-tool
  t/helper: merge test-subprocess into test-tool
  t/helper: merge test-urlmatch-normalization into test-tool
  t/helper: merge test-wildmatch into test-tool
  t/helper: merge test-write-cache into test-tool

 .../howto/recover-corrupted-object-harder.txt |   2 +-
 Makefile  |  79 +++---
 t/helper/test-chmtime.c   |  15 +-
 t/helper/test-config.c|   5 +-
 t/helper/test-ctype.c |   3 +-
 t/helper/test-date.c  |  17 +-
 t/helper/test-delta.c |   5 +-
 t/helper/test-drop-caches.c   |   3 +-
 t/helper/test-dump-cache-tree.c   |   3 +-
 t/helper/test-dump-split-index.c  |   3 +-
 t/helper/test-example-decorate.c  |   3 +-
 t/helper/test-genrandom.c |   3 +-
 t/helper/test-hashmap.c   |   5 +-
 t/helper/test-index-version.c |   3 +-
 t/helper/test-lazy-init-name-hash.c   |  13 +-
 t/helper/test-match-trees.c   |   3 +-
 t/helper/test-mergesort.c |   3 +-
 t/helper/test-mktemp.c|   3 +-
 t/helper/test-online-cpus.c   |   3 +-
 t/helper/test-path-utils.c|   3 +-
 t/helper/test-prio-queue.c|   3 +-
 t/helper/test-read-cache.c|   3 +-
 t/helper/test-ref-store.c |   3 +-
 t/helper/test-regex.c |   7 +-
 t/helper/test-revision-walking.c  |   3 +-
 t/helper/test-run-command.c   |   3 +-
 t/helper/test-scrap-cache-tree.c  |   3 +-
 t/helper/test-sha1-array.c|   3 +-
 t/helper/test-sha1.c  |   3 +-
 t/helper/test-sha1.sh |   4 +-
 t/helper/test-sigchain.c  |   3 +-
 t/helper/test-strcmp-offset.c |   3 +-
 t/helper/test-string-list.c   |   3 +-
 t/helper/test-submodule-config.c  |   3 +-
 t/helper/test-subprocess.c|   3 +-
 t/helper/test-tool.c  |  62 
 t/helper/test-tool.h  |  40 +++
 t/helper/test-urlmatch-normalization.c|   5 +-
 t/helper/test-wildmatch.c |   3 +-
 t/helper/test-write-cache.c   |   3 +-
 t/lib-git-p4.sh   |   2 +-
 t/lib-git-svn.sh  |   2 +-
 t/lib-pack.sh |   2 +-
 t/perf/p0002-read-cache.sh|   2 +-
 t/perf/p0004-lazy-init-name-hash.sh   |   8 +-
 t/perf/p0007-write-cache.sh   |   2 +-
 t/perf/p0071-sort.sh  |   2 +-
 t/perf/p7519-fsmonitor.sh |  12 +-
 t/t0005-signals.sh|   6 +-
 t/t0006-date.sh   |   8 +-
 t/t0009-prio-queue.sh |   6 +-
 t/t0011-hashmap.sh|   4 +-
 t/t0013-sha1dc.sh |   2