On Thu, Feb 14, 2019 at 05:54:25AM -0500, Eric Sunshine wrote:
> On Wed, Feb 13, 2019 at 11:35 PM Jeff King wrote:
> > diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
> > @@ -274,6 +274,18 @@ test_expect_success 'prune .git/shallow' '
> > +test_expect_success 'prune .git/shallow when there are n
On Wed, Feb 13, 2019 at 11:35 PM Jeff King wrote:
> diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
> @@ -274,6 +274,18 @@ test_expect_success 'prune .git/shallow' '
> +test_expect_success 'prune .git/shallow when there are no loose objects' '
> + SHA1=$(echo hi|git commit-tree HEAD^{tree})
The general strategy of "git prune" is to do a full reachability walk,
then for each loose object see if we found it in our walk. But if we
don't have any loose objects, we don't need to do the expensive walk in
the first place.
This patch postpones that walk until the first time we need to see it
3 matches
Mail list logo