{"thread":{"id":"11706","subject":"[PATCH] git-clone -s: document problems with git gc --prune","startedAt":"2008-01-22T21:03:05Z","lastAt":"2008-01-22T22:12:25Z","messageCount":3,"participants":["Miklos Vajna","Brandon Casey"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"66327","messageId":"20080122210305.GM4475@genesis.frugalware.org","threadId":"11706","inReplyTo":null,"subject":"[PATCH] git-clone -s: document problems with git gc --prune","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-01-22T21:03:05Z","receivedAt":"2008-01-22T21:03:05Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"There is a scenario when using git clone -s and git gc --prune togother is\ndangerous. Document this.\n\nSigned-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n\nI see people on #git regularly who do not know about this option can cause\nproblems, so I think it's important to document this.\n\n Documentation/git-clone.txt |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\nindex fdccbd4..5c4d936 100644\n--- a/Documentation/git-clone.txt\n+++ b/Documentation/git-clone.txt\n@@ -62,6 +62,12 @@ OPTIONS\n \t.git/objects/info/alternates to share the objects\n \twith the source repository.  The resulting repository\n \tstarts out without any object of its own.\n+\t*NOTE*: this is a possibly dangerous operation; do *not* use\n+\tit unless you understand what it does. If you clone your\n+\trepository using this option, you delete branches in the\n+\tsource repository and you run linkgit:git-gc[1] using the\n+\t`--prune` option, then it will remove objects which are\n+\treferenced ones in the target repository!\n \n --reference <repository>::\n \tIf the reference repository is on the local machine\n-- \n1.5.4.rc3.4.g16335-dirty\n"},{"id":"66328","messageId":"47965BB2.8080703@nrlssc.navy.mil","threadId":"11706","inReplyTo":"20080122210305.GM4475@genesis.frugalware.org","subject":"Re: [PATCH] git-clone -s: document problems with git gc --prune","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-01-22T21:10:10Z","receivedAt":"2008-01-22T21:10:10Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Miklos Vajna wrote:\n> There is a scenario when using git clone -s and git gc --prune togother is\n> dangerous. Document this.\n> \n> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>\n> ---\n> \n> I see people on #git regularly who do not know about this option can cause\n> problems, so I think it's important to document this.\n> \n>  Documentation/git-clone.txt |    6 ++++++\n>  1 files changed, 6 insertions(+), 0 deletions(-)\n> \n> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\n> index fdccbd4..5c4d936 100644\n> --- a/Documentation/git-clone.txt\n> +++ b/Documentation/git-clone.txt\n> @@ -62,6 +62,12 @@ OPTIONS\n>  \t.git/objects/info/alternates to share the objects\n>  \twith the source repository.  The resulting repository\n>  \tstarts out without any object of its own.\n> +\t*NOTE*: this is a possibly dangerous operation; do *not* use\n> +\tit unless you understand what it does. If you clone your\n> +\trepository using this option, you delete branches in the\n> +\tsource repository and you run linkgit:git-gc[1] using the\n> +\t`--prune` option, then it will remove objects which are\n> +\treferenced ones in the target repository!\n\nI find that second sentence hard to understand. Maybe:\n\nIf you clone your repository using this option, then delete branches in\nthe source repository and then run linkgit:git-gc[1] using the '--prune'\noption in the source repository, it may remove objects which are referenced\nby the cloned repository.\n\n-brandon\n"},{"id":"66331","messageId":"20080122221225.GN4475@genesis.frugalware.org","threadId":"11706","inReplyTo":"47965BB2.8080703@nrlssc.navy.mil","subject":"[PATCH] git-clone -s: document problems with git gc --prune","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-01-22T22:12:25Z","receivedAt":"2008-01-22T22:12:25Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"There is a scenario when using git clone -s and git gc --prune togother is\ndangerous. Document this.\n\nSigned-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n\nOn Tue, Jan 22, 2008 at 03:10:10PM -0600, Brandon Casey <casey@nrlssc.navy.mil> wrote:\n> I find that second sentence hard to understand. Maybe:\n>\n> If you clone your repository using this option, then delete branches in\n> the source repository and then run linkgit:git-gc[1] using the '--prune'\n> option in the source repository, it may remove objects which are referenced\n> by the cloned repository.\n\nHere is the re-worded version.\n\n Documentation/git-clone.txt |    8 ++++++++\n 1 files changed, 8 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\nindex fdccbd4..2341881 100644\n--- a/Documentation/git-clone.txt\n+++ b/Documentation/git-clone.txt\n@@ -62,6 +62,14 @@ OPTIONS\n \t.git/objects/info/alternates to share the objects\n \twith the source repository.  The resulting repository\n \tstarts out without any object of its own.\n+\t*NOTE*: this is a possibly dangerous operation; do *not* use\n+\tit unless you understand what it does. If you clone your\n+\trepository using this option, then delete branches in the\n+\tsource repository and then run linkgit:git-gc[1] using the\n+\t'--prune' option in the source repository, it may remove\n+\tobjects which are referenced by the cloned repository.\n+\n+\n \n --reference <repository>::\n \tIf the reference repository is on the local machine\n-- \n1.5.4.rc3.4.g16335-dirty\n"}]}