author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Sat, 7 Jan 2012 14:45:59 +0000 (21:45 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 8 Jan 2012 21:48:27 +0000 (13:48 -0800) | ||
commit | 3e6e0edde20f536b28cf1dac04c7376000bfc701 | |
tree | a0213e6b8da702cf3d32169d447593f41a98c79a | tree | snapshot |
parent | 4570aeb0d85f3b5ff274b6d5a651c2ee06d25d76 | commit | diff |
clone: add --single-branch to fetch only one branch
When --single-branch is given, only one branch, either HEAD or one
specified by --branch, will be fetched. Also only tags that point to
the downloaded history are fetched.
This helps most in shallow clones, where it can reduce the download to
minimum and that is why it is enabled by default when --depth is given.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When --single-branch is given, only one branch, either HEAD or one
specified by --branch, will be fetched. Also only tags that point to
the downloaded history are fetched.
This helps most in shallow clones, where it can reduce the download to
minimum and that is why it is enabled by default when --depth is given.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-clone.txt | diff | blob | history | |
builtin/clone.c | diff | blob | history | |
t/t5500-fetch-pack.sh | diff | blob | history |