mirror of
https://github.com/git/git.git
synced 2024-11-28 20:44:04 +08:00
4fe788b1b0
In some scenarios, users may want more history than the repository offered for cloning, which happens to be a shallow repository, can give them. But because users don't know it is a shallow repository until they download it to local, we may want to refuse to clone this kind of repository, without creating any unnecessary files. The '--depth=x' option cannot be used as a solution; the source may be deep enough to give us 'x' commits when cloned, but the user may later need to deepen the history to arbitrary depth. Teach '--reject-shallow' option to "git clone" to abort as soon as we find out that we are cloning from a shallow repository. Signed-off-by: Li Linchao <lilinchao@oschina.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 lines
380 B
Plaintext
9 lines
380 B
Plaintext
clone.defaultRemoteName::
|
|
The name of the remote to create when cloning a repository. Defaults to
|
|
`origin`, and can be overridden by passing the `--origin` command-line
|
|
option to linkgit:git-clone[1].
|
|
|
|
clone.rejectShallow::
|
|
Reject to clone a repository if it is a shallow one, can be overridden by
|
|
passing option `--reject-shallow` in command line. See linkgit:git-clone[1]
|