aboutsummaryrefslogtreecommitdiffstats
path: root/testing/shards/use-git-bare-instead-of-mirror.patch
blob: fef88e5a7eca8694b8d4bbe285fb5ad32728e998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
From 3a64a76b495708a7f3bf7969e85b26817e094cc8 Mon Sep 17 00:00:00 2001
From: Julien Portalier <julien@portalier.com>
Date: Tue, 12 Dec 2017 10:19:44 +0100
Subject: [PATCH] Fix: use git --bare instead of --mirror

Patch-Source: https://github.com/crystal-lang/shards/commit/3a64a76b495708a7f3bf7969e85b26817e094cc8

--- a/src/resolvers/git.cr
+++ b/src/resolvers/git.cr
@@ -178,7 +178,7 @@
 
     private def clone_repository
       Dir.mkdir_p(Shards.cache_path) unless Dir.exists?(Shards.cache_path)
-      run "git clone --mirror --quiet -- #{FileUtils.escape git_url} #{dependency.name}",
+      run "git clone --bare --quiet -- #{FileUtils.escape git_url} #{dependency.name}",
         path: File.dirname(local_path)
     rescue Error
       raise Error.new("Failed to clone #{git_url}")