Git

bradphelan's Avatar

bradphelan

24 Apr, 2014 08:57 AM

Why does appveyor do a full git clone to a depth of 50 from github. I have a repo with a big history and it seems to take about 2min. Would it be faster to just clone the top of the branch being built

git clone -b mybranch --depth 1 --single-branch git://sub.domain.com/repo.git

for example. Might speed things up.

  1. Support Staff 1 Posted by Feodor Fitsner on 24 Apr, 2014 05:29 PM

    Feodor Fitsner's Avatar

    Unlike Mercurial, Git doesn't allow cloning/fetching particular commit. I'm afraid slicing the last commit with depth=1 won't guarantee that this is exactly the commit you were looking for, especially within large teams committing often (there may be newer commit between that commit and the moment build starts).

    What could be really interesting is downloading GitHub repo using API: https://developer.github.com/v3/repos/contents/#get-archive-link We haven't tried that yet, but I guess it might be much faster (provided you don't need a real Git repo in your build folder).

  2. 2 Posted by bradphelan on 25 Apr, 2014 05:13 AM

    bradphelan's Avatar

    Here's a trick. Github has an SVN interface so you can do

    http://stackoverflow.com/questions/9609835/git-export-from-github-r...

    and get only the latest files.

  3. 3 Posted by bradphelan on 25 Apr, 2014 05:14 AM

    bradphelan's Avatar

    but the tarball export is probably the fastest

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:38 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

13 Sep, 2023 06:05 AM
10 Sep, 2023 03:43 PM
09 Sep, 2023 05:53 PM
08 Sep, 2023 07:10 PM
31 Aug, 2023 07:59 PM
13 Aug, 2023 04:55 AM