Subject: Re: [PATCH v3 0/4] Improve push performance with lots of refs

From: Junio C Hamano <[email-masked]>
Date: Tue, 23 Dec 2014 10:40:54 -0800

"brian m. carlson" <[email-masked]> writes:

> The only change from v2 is the addition of a fourth patch, which fixes
> t5500.  It's necessary because the test wants packs for fetches to
> shallow clones to be minimal.
>
> I'm not especially thrilled with having to provide a --shallow command
> line argument, but the alternative is to buffer a potentially large
> amount of data in order to determine whether the remote side is shallow.

You spell "--thin-aggressive" as two words, "--thin" "--shallow", in
this series, essentially, no?

I think this is going in the right direction.  The "shallow"
propagated on the wire from the fetcher is the right thing to use
to make this decision.

I wonder if the call to is_repository_shallow() is still necessary
(read: I would prefer to see it go away) where we decide between
"--objects-edge" and "--objects-edge-aggressive".

Here is the relevant part from 4/4:

@@ -2711,7 +2714,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
 	argv_array_push(&rp, "pack-objects");
 	if (thin) {
 		use_internal_rev_list = 1;
-		argv_array_push(&rp, is_repository_shallow()
+		argv_array_push(&rp, is_repository_shallow() || shallow
 				? "--objects-edge-aggressive"
 				: "--objects-edge");
 	} else