On 30.12.2013 23:34, Rene Rivera wrote:
On Mon, Dec 30, 2013 at 1:26 PM, Vladimir Prus
wrote: On 30.12.2013 23:22, Eric Niebler wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 12/30/2013 06:47 AM, Beman Dawes wrote:
The regression scripts are using the clone --single-branch option, which became available at git 1.7.10, so we are planning to bump the version requirement.
Unless I'm mistaken, the most recent Ubuntu LTS release is still on 1.7.9.5. I think this change would inconvenience a significant segment of users.
And it seems one can accomplish the same effect with earlier versions:
http://stackoverflow.com/questions/1911109/git-clone-a- specific-branch
Hm.. It's not clear from the docs that they are equivalent. "-b" checks out the given branch. While "--single-branch" clones only the data for the branch.
I have referring to this: git init git remote add -t refspec remotename host:/dir.git git fetch Here's a specific example: $ git init . $ git remote add --no-tags -t develop origin git@github.com:boostorg/build.git $ git fetch remote: Compressing objects: 100% (13708/13708), done. remote: Total 52255 (delta 37252), reused 52250 (delta 37248) Receiving objects: 100% (52255/52255), 27.04 MiB | 2.44 MiB/s, done. Resolving deltas: 100% (37252/37252), done. On the other hand, it does not reduce much of download size, compares to full clone: remote: Counting objects: 55789, done. remote: Compressing objects: 100% (15291/15291), done. remote: Total 55789 (delta 38985), reused 55742 (delta 38939) Receiving objects: 100% (55789/55789), 28.62 MiB | 691 KiB/s, done. Resolving deltas: 100% (38985/38985), done. Presumably because there are merge commits on 'develop' having commits from both master and develop as parent. Maybe, if you really want to reduce download speed, you need --depth option? Like so: $ git init . $ git remote add --no-tags -t develop origin git@github.com:boostorg/build.git $ git fetch --depth=1 remote: Counting objects: 967, done. remote: Compressing objects: 100% (882/882), done. remote: Total 967 (delta 72), reused 806 (delta 57) Receiving objects: 100% (967/967), 2.10 MiB | 567 KiB/s, done. Resolving deltas: 100% (72/72), done. Note that using just --depth=1 without --no-tags and -t to remote add fetches 7MiB, so the above is probably the smallest you can get. HTH, Volodya