Re: ds/reachable (was Re: What's cooking in git.git (Jul 2018, #03; Wed, 25))

2018-08-01 Thread Junio C Hamano
Derrick Stolee  writes:

>>   Stuck in review?
>>   cf. <20180723203500.231932-1-jonathanta...@google.com>
>
> This comments on the initial values of 'struct ref_filter' (that are
> not used). All we need is the diff below squashed into "test-reach:
> test commit_contains".
>
>>   cf. <20180723204112.233274-1-jonathanta...@google.com>
> This comment asks why "parse_commit()" instead of
> "parse_commit_or_die()" but the _or_die() would create a change in
> behavior that is not the purpose of the series.
>>   cf. 
>
> I just responded to Stefan's comment about sorting. I don't believe
> any change is needed. Some tests output multiple results and the order
> is not defined by the method contract, so 'test-tool reach '
> will always sort the output (by OID).

Just to let everybody know, there is no point responding to all of
"cf. " comments in "What's cooking" report.  Because it is
*NOT* meant as an exhaustive list of things that need to be fixed,
refuting each and every one of them would not make the topic
"objection free" anyway.  The list of cf.'s are there to have just
enough of them to remind me to refrain from merging a topic to
'next' too hurriedly.  The discussion thread in the list archive is
the authoritative record of the discussion; treat "What's cooking"
as my personal note, nothing more.

> (Sorry for the delay. I'm on vacation.)

That's OK, and enjoy your time off.  We are not in a hurry.


> Thanks,
> -Stolee
>
> ---
>
> diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c
> index eb21103998..ca30059117 100644
> --- a/t/helper/test-reach.c
> +++ b/t/helper/test-reach.c
> @@ -117,6 +117,7 @@ int cmd__reach(int ac, const char **av)
>     struct ref_filter filter;
>     struct contains_cache cache;
>     init_contains_cache(&cache);
> +    memset(&filter, 0, sizeof(filter));
>
>     if (ac > 2 && !strcmp(av[2], "--tag"))
>         filter.with_commit_tag_algo = 1;


ds/reachable (was Re: What's cooking in git.git (Jul 2018, #03; Wed, 25))

2018-08-01 Thread Derrick Stolee

On 7/25/2018 6:13 PM, Junio C Hamano wrote:

* ds/reachable (2018-07-20) 18 commits
  - commit-reach: use can_all_from_reach
  - commit-reach: make can_all_from_reach... linear
  - commit-reach: replace ref_newer logic
  - test-reach: test commit_contains
  - test-reach: test can_all_from_reach_with_flags
  - test-reach: test reduce_heads
  - test-reach: test get_merge_bases_many
  - test-reach: test is_descendant_of
  - test-reach: test in_merge_bases
  - test-reach: create new test tool for ref_newer
  - commit-reach: move can_all_from_reach_with_flags
  - upload-pack: generalize commit date cutoff
  - upload-pack: refactor ok_to_give_up()
  - upload-pack: make reachable() more generic
  - commit-reach: move commit_contains from ref-filter
  - commit-reach: move ref_newer from remote.c
  - commit.h: remove method declarations
  - commit-reach: move walk methods from commit.c
  (this branch uses ds/commit-graph-fsck, jt/commit-graph-per-object-store and 
sb/object-store-lookup; is tangled with ds/commit-graph-with-grafts.)

  The code for computing history reachability has been shuffled,
  obtained a bunch of new tests to cover them, and then being
  improved.

  Stuck in review?
  cf. <20180723203500.231932-1-jonathanta...@google.com>


This comments on the initial values of 'struct ref_filter' (that are not 
used). All we need is the diff below squashed into "test-reach: test 
commit_contains".



  cf. <20180723204112.233274-1-jonathanta...@google.com>
This comment asks why "parse_commit()" instead of 
"parse_commit_or_die()" but the _or_die() would create a change in 
behavior that is not the purpose of the series.

  cf. 


I just responded to Stefan's comment about sorting. I don't believe any 
change is needed. Some tests output multiple results and the order is 
not defined by the method contract, so 'test-tool reach ' will 
always sort the output (by OID).


(Sorry for the delay. I'm on vacation.)

Thanks,
-Stolee

---

diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c
index eb21103998..ca30059117 100644
--- a/t/helper/test-reach.c
+++ b/t/helper/test-reach.c
@@ -117,6 +117,7 @@ int cmd__reach(int ac, const char **av)
    struct ref_filter filter;
    struct contains_cache cache;
    init_contains_cache(&cache);
+    memset(&filter, 0, sizeof(filter));

    if (ac > 2 && !strcmp(av[2], "--tag"))
        filter.with_commit_tag_algo = 1;