On 9/21/2018 7:56 PM, Jeff King wrote:
On Fri, Sep 21, 2018 at 08:05:26AM -0700, Derrick Stolee via GitGitGadget wrote:
+               if (!from_one || from_one->type != OBJ_COMMIT) {
+                       /* no way to tell if this is reachable by
+                        * looking at the ancestry chain alone, so
+                        * leave a note to ourselves not to worry about
+                        * this object anymore.
+                        */
A minor nit, but the original comment you restored here has a style
violation. Might be worth fixing up (but certainly not worth a re-roll
on its own).

@@ -600,7 +622,7 @@ int can_all_from_reach_with_flag(struct object_array *from,
        }
cleanup:
-       for (i = 0; i < from->nr; i++) {
+       for (i = 0; i < nr_commits; i++) {
                clear_commit_marks(list[i], RESULT);
                clear_commit_marks(list[i], assign_flag);
Also, a minor aside, but I think it would be slightly more efficient for
those final two lines to do:

   clear_commit_marks(list[i], RESULT | assign_flag);

Of course, that's totally orthogonal to this patch, but it may make you
feel better to offset the other round of clearing I'm suggesting. ;)

This is definitely a better thing to do, and I'll make the change in v4, along with the comment style cleanup above.

Thanks,

-Stolee


Reply via email to