Skip to content

Commit 27dbb41

Browse files
committed
Fix issue with fetching new commits on branches
Clone mirror (implies bare), but also sets a refspec for all branches. Fetch all to update all refs, also prune and prune tags to keep clean.
1 parent c6622ba commit 27dbb41

File tree

1 file changed

+2
-2
lines changed
  • src/main/clojure/clojure/tools/gitlibs

1 file changed

+2
-2
lines changed

src/main/clojure/clojure/tools/gitlibs/impl.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
[^File git-dir]
6363
(let [git-path (.getCanonicalPath git-dir)
6464
{:keys [exit err] :as ret} (run-git "--git-dir" git-path
65-
"fetch" "--quiet" "--tags")]
65+
"fetch" "--quiet" "--all" "--tags" "--prune" "--prune-tags")]
6666
(when-not (zero? exit)
6767
(throw (ex-info (format "Unable to fetch %s%n%s" git-path err) ret)))))
6868

@@ -71,7 +71,7 @@
7171
[url ^File git-dir]
7272
(printerrln "Cloning:" url)
7373
(let [git-path (.getCanonicalPath git-dir)
74-
{:keys [exit err] :as ret} (run-git "clone" "--quiet" "--bare" url git-path)]
74+
{:keys [exit err] :as ret} (run-git "clone" "--quiet" "--mirror" url git-path)]
7575
(when-not (zero? exit)
7676
(throw (ex-info (format "Unable to clone %s%n%s" git-path err) ret)))
7777
git-dir))

0 commit comments

Comments
 (0)