diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-04-08 13:23:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-08 13:23:25 -0700 |
commit | 22eee7f4554e777de93134c0ae06ee611bd570a4 (patch) | |
tree | ff7982688bc3eab633374f3ebdc53fb56abf3c03 /Documentation | |
parent | Merge branch 'tb/reverse-midx' (diff) | |
parent | builtin/clone.c: add --reject-shallow option (diff) | |
download | tgif-22eee7f4554e777de93134c0ae06ee611bd570a4.tar.xz |
Merge branch 'll/clone-reject-shallow'
"git clone --reject-shallow" option fails the clone as soon as we
notice that we are cloning from a shallow repository.
* ll/clone-reject-shallow:
builtin/clone.c: add --reject-shallow option
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config/clone.txt | 4 | ||||
-rw-r--r-- | Documentation/git-clone.txt | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/config/clone.txt b/Documentation/config/clone.txt index 47de36a5fe..7bcfbd18a5 100644 --- a/Documentation/config/clone.txt +++ b/Documentation/config/clone.txt @@ -2,3 +2,7 @@ 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] diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 02d9c19cec..3fe3810f1c 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -15,7 +15,7 @@ SYNOPSIS [--dissociate] [--separate-git-dir <git dir>] [--depth <depth>] [--[no-]single-branch] [--no-tags] [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules] - [--[no-]remote-submodules] [--jobs <n>] [--sparse] + [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow] [--filter=<filter>] [--] <repository> [<directory>] @@ -149,6 +149,11 @@ objects from the source repository into a pack in the cloned repository. --no-checkout:: No checkout of HEAD is performed after the clone is complete. +--[no-]reject-shallow:: + Fail if the source repository is a shallow repository. + The 'clone.rejectShallow' configuration variable can be used to + specify the default. + --bare:: Make a 'bare' Git repository. That is, instead of creating `<directory>` and placing the administrative |