From 2498a1ad0b0fc06f1fd40074b9bb55eb3d7ae094 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Thu, 3 Apr 2008 13:26:13 -0500 Subject: git-clone.txt: Adjust note to --shared for new pruning behavior of git-gc Since git-gc now always calls prune, even with --auto, unreferenced objects may be removed by more operations than just git-gc. This is important for clones created using --shared or --reference. Signed-off-by: Brandon Casey Signed-off-by: Dmitry Potapov Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 975824301..9b564420c 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -65,10 +65,13 @@ OPTIONS + *NOTE*: this is a possibly dangerous operation; do *not* use it unless you understand what it does. If you clone your -repository using this option, then delete branches in the -source repository and then run linkgit:git-gc[1] using the -'--prune' option in the source repository, it may remove -objects which are referenced by the cloned repository. +repository using this option and then delete branches (or use any +other git command that makes any existing commit unreferenced) in the +source repository, some objects may become unreferenced (or dangling). +These objects may be removed by normal git operations (such as git-commit[1]) +which automatically call git-gc[1]. If these objects are removed and +were referenced by the cloned repository, then the cloned repository +will become corrupt. @@ -79,6 +82,8 @@ objects which are referenced by the cloned repository. an already existing repository as an alternate will require fewer objects to be copied from the repository being cloned, reducing network and local storage costs. ++ +*NOTE*: see NOTE to --shared option. --quiet:: -q:: -- cgit v1.2.1 From a6f47b2be43fbe70236316edc6c87ad9522c485d Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 22 Apr 2008 14:23:48 +0200 Subject: diff options documentation: refer to --diff-filter in --name-status git diff --name-status outputs letters, but the meaning of those letters is documented elsewhere. Add a note to make the manpage more intuitive. Signed-off-by: Miklos Vajna Signed-off-by: Junio C Hamano --- Documentation/diff-options.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 8d35cbd60..60d0e53a7 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -75,7 +75,8 @@ endif::git-format-patch[] Show only names of changed files. --name-status:: - Show only names and status of changed files. + Show only names and status of changed files. See the description + of the `--diff-filter` option on what the status letters mean. --color:: Show colored diff. -- cgit v1.2.1 From 208641cf850125a23ccca99630ea2caa70953e44 Mon Sep 17 00:00:00 2001 From: Dmitry Potapov Date: Mon, 14 Apr 2008 16:17:31 +0400 Subject: git-gc --prune is deprecated 25ee9731c137d0a24b0f4879eb0b0cce9b77d5b0 made the '--prune' option deprecated and removed its description from the git-gc man page. This patch removes all references to this option from the rest of the Git documentation. Signed-off-by: Junio C Hamano --- Documentation/everyday.txt | 6 ++---- Documentation/user-manual.txt | 17 +---------------- 2 files changed, 3 insertions(+), 20 deletions(-) (limited to 'Documentation') diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt index fdbd15a18..e598cdda4 100644 --- a/Documentation/everyday.txt +++ b/Documentation/everyday.txt @@ -48,14 +48,12 @@ $ git gc <3> repository health reasonably well. <2> check how many loose objects there are and how much disk space is wasted by not repacking. -<3> repacks the local repository and performs other housekeeping tasks. Running -without `--prune` is a safe operation even while other ones are in progress. +<3> repacks the local repository and performs other housekeeping tasks. Repack a small project into single pack.:: + ------------ $ git gc <1> -$ git gc --prune ------------ + <1> pack all the objects reachable from the refs into one pack, @@ -182,7 +180,7 @@ $ git pull <3> $ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <4> $ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <5> $ git reset --hard ORIG_HEAD <6> -$ git gc --prune <7> +$ git gc <7> $ git fetch --tags <8> ------------ + diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index 565aeb980..86b91a53e 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -1548,22 +1548,7 @@ dangling tree b24c2473f1fd3d91352a624795be026d64c8841f Dangling objects are not a problem. At worst they may take up a little extra disk space. They can sometimes provide a last-resort method for -recovering lost work--see <> for details. However, if -you wish, you can remove them with linkgit:git-prune[1] or the `--prune` -option to linkgit:git-gc[1]: - -------------------------------------------------- -$ git gc --prune -------------------------------------------------- - -This may be time-consuming. Unlike most other git operations (including -git-gc when run without any options), it is not safe to prune while -other git operations are in progress in the same repository. - -If linkgit:git-fsck[1] complains about sha1 mismatches or missing -objects, you may have a much more serious problem; your best option is -probably restoring from backups. See -<> for a detailed discussion. +recovering lost work--see <> for details. [[recovering-lost-changes]] Recovering lost changes -- cgit v1.2.1 From 491b1b11213c373a3e91004b1ab775d7e52ac1f3 Mon Sep 17 00:00:00 2001 From: Sam Vilain Date: Mon, 21 Apr 2008 15:31:24 +1200 Subject: Amend git-push refspec documentation These paragraphs are a little confusing. Also, make it clearer when you have to specify the full name for Signed-off-by: Sam Vilain Signed-off-by: Junio C Hamano --- Documentation/git-push.txt | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 3128170bc..058594913 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -35,14 +35,15 @@ OPTIONS by the source ref, followed by a colon `:`, followed by the destination ref. + -The side can be an -arbitrary "SHA1 expression" that can be used as an -argument to `git-cat-file -t`. E.g. `master~4` (push -four parents before the current master head). +The side represents the source branch (or arbitrary +"SHA1 expression", such as `master~4` (four parents before the +tip of `master` branch); see linkgit:git-rev-parse[1]) that you +want to push. The side represents the destination location. + The local ref that matches is used -to fast forward the remote ref that matches . If -the optional plus `+` is used, the remote ref is updated +to fast forward the remote ref that matches (or, if no was +specified, the same ref that referred to locally). If +the optional leading plus `+` is used, the remote ref is updated even if it does not result in a fast forward update. + Note: If no explicit refspec is found, (that is neither @@ -165,7 +166,8 @@ git push origin master:: Find a ref that matches `master` in the source repository (most likely, it would find `refs/heads/master`), and update the same ref (e.g. `refs/heads/master`) in `origin` repository - with it. + with it. If `master` did not exist remotely, it would be + created. git push origin :experimental:: Find a ref that matches `experimental` in the `origin` repository @@ -179,9 +181,10 @@ git push origin master:satellite/master:: git push origin master:refs/heads/experimental:: Create the branch `experimental` in the `origin` repository - by copying the current `master` branch. This form is usually - needed to create a new branch in the remote repository as - there is no `experimental` branch to match. + by copying the current `master` branch. This form is only + needed to create a new branch or tag in the remote repository when + the local name and the remote name are different; otherwise, + the ref name on its own will work. Author ------ -- cgit v1.2.1