From 3711d1cd8984d69b61b3a3626aa88ba52fa32d48 Mon Sep 17 00:00:00 2001 From: Quentin Nerden Date: Tue, 2 Jul 2019 07:37:40 -0700 Subject: [PATCH 1/2] docs: git-clone: refer to long form of options To make the doc of git-clone easier to read, refer to the long form of the options (it is easier to guess what '--verbose' is doing than '-v'). Signed-off-by: Quentin Nerden Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index a0f14b51f2..f5db33e885 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -22,7 +22,7 @@ DESCRIPTION Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository -(visible using `git branch -r`), and creates and checks out an +(visible using `git branch --remotes`), and creates and checks out an initial branch that is forked from the cloned repository's currently active branch. @@ -80,13 +80,13 @@ which automatically call `git gc --auto`. (See linkgit:git-gc[1].) If these objects are removed and were referenced by the cloned repository, then the cloned repository will become corrupt. + -Note that running `git repack` without the `-l` option in a repository -cloned with `-s` will copy objects from the source repository into a pack -in the cloned repository, removing the disk space savings of `clone -s`. -It is safe, however, to run `git gc`, which uses the `-l` option by +Note that running `git repack` without the `--local` option in a repository +cloned with `--shared` will copy objects from the source repository into a pack +in the cloned repository, removing the disk space savings of `clone --shared`. +It is safe, however, to run `git gc`, which uses the `--local` option by default. + -If you want to break the dependency of a repository cloned with `-s` on +If you want to break the dependency of a repository cloned with `--shared` on its source repository, you can simply run `git repack -a` to copy all objects from the source repository into a pack in the cloned repository. @@ -127,7 +127,7 @@ objects from the source repository into a pack in the cloned repository. --progress:: Progress status is reported on the standard error stream - by default when it is attached to a terminal, unless -q + by default when it is attached to a terminal, unless `--quiet` is specified. This flag forces progress status even if the standard error stream is not directed to a terminal. @@ -147,7 +147,7 @@ objects from the source repository into a pack in the cloned repository. Make a 'bare' Git repository. That is, instead of creating `` and placing the administrative files in `/.git`, make the `` - itself the `$GIT_DIR`. This obviously implies the `-n` + itself the `$GIT_DIR`. This obviously implies the `--no-checkout` because there is nowhere to check out the working tree. Also the branch heads at the remote are copied directly to corresponding local branch heads, without mapping From bfc8c84ed560af8f74be32fa0fd2568e28161678 Mon Sep 17 00:00:00 2001 From: Quentin Nerden Date: Tue, 2 Jul 2019 07:37:41 -0700 Subject: [PATCH 2/2] docs: git-clone: list short form of options first List the short form of options (e.g.: '-l') before the long form (e.g. '--local'). This is to match the doc of git-add, git-commit, git-clean, git-branch... Signed-off-by: Quentin Nerden Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index f5db33e885..ca8871c165 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -40,8 +40,8 @@ configuration variables. OPTIONS ------- ---local:: -l:: +--local:: When the repository to clone from is on a local machine, this flag bypasses the normal "Git aware" transport mechanism and clones the repository by making a copy of @@ -62,8 +62,8 @@ Git transport instead. directory instead of using hardlinks. This may be desirable if you are trying to make a back-up of your repository. ---shared:: -s:: +--shared:: When the repository to clone is on the local machine, instead of using hard links, automatically setup `.git/objects/info/alternates` to share the objects @@ -115,13 +115,13 @@ objects from the source repository into a pack in the cloned repository. same repository, and this option can be used to stop the borrowing. ---quiet:: -q:: +--quiet:: Operate quietly. Progress is not reported to the standard error stream. ---verbose:: -v:: +--verbose:: Run verbosely. Does not affect the reporting of progress status to the standard error stream. @@ -139,8 +139,8 @@ objects from the source repository into a pack in the cloned repository. When multiple `--server-option=