git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-clone -s: document problems with git gc --prune
@ 2008-01-22 21:03 Miklos Vajna
  2008-01-22 21:10 ` Brandon Casey
  0 siblings, 1 reply; 3+ messages in thread
From: Miklos Vajna @ 2008-01-22 21:03 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

There is a scenario when using git clone -s and git gc --prune togother is
dangerous. Document this.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

I see people on #git regularly who do not know about this option can cause
problems, so I think it's important to document this.

 Documentation/git-clone.txt |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index fdccbd4..5c4d936 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -62,6 +62,12 @@ OPTIONS
 	.git/objects/info/alternates to share the objects
 	with the source repository.  The resulting repository
 	starts out without any object of its own.
+	*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, you delete branches in the
+	source repository and you run linkgit:git-gc[1] using the
+	`--prune` option, then it will remove objects which are
+	referenced ones in the target repository!
 
 --reference <repository>::
 	If the reference repository is on the local machine
-- 
1.5.4.rc3.4.g16335-dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] git-clone -s: document problems with git gc --prune
  2008-01-22 21:03 [PATCH] git-clone -s: document problems with git gc --prune Miklos Vajna
@ 2008-01-22 21:10 ` Brandon Casey
  2008-01-22 22:12   ` Miklos Vajna
  0 siblings, 1 reply; 3+ messages in thread
From: Brandon Casey @ 2008-01-22 21:10 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: Junio C Hamano, git

Miklos Vajna wrote:
> There is a scenario when using git clone -s and git gc --prune togother is
> dangerous. Document this.
> 
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
> 
> I see people on #git regularly who do not know about this option can cause
> problems, so I think it's important to document this.
> 
>  Documentation/git-clone.txt |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
> index fdccbd4..5c4d936 100644
> --- a/Documentation/git-clone.txt
> +++ b/Documentation/git-clone.txt
> @@ -62,6 +62,12 @@ OPTIONS
>  	.git/objects/info/alternates to share the objects
>  	with the source repository.  The resulting repository
>  	starts out without any object of its own.
> +	*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, you delete branches in the
> +	source repository and you run linkgit:git-gc[1] using the
> +	`--prune` option, then it will remove objects which are
> +	referenced ones in the target repository!

I find that second sentence hard to understand. Maybe:

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.

-brandon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] git-clone -s: document problems with git gc --prune
  2008-01-22 21:10 ` Brandon Casey
@ 2008-01-22 22:12   ` Miklos Vajna
  0 siblings, 0 replies; 3+ messages in thread
From: Miklos Vajna @ 2008-01-22 22:12 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Brandon Casey, git

There is a scenario when using git clone -s and git gc --prune togother is
dangerous. Document this.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

On Tue, Jan 22, 2008 at 03:10:10PM -0600, Brandon Casey <casey@nrlssc.navy.mil> wrote:
> I find that second sentence hard to understand. Maybe:
>
> 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.

Here is the re-worded version.

 Documentation/git-clone.txt |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index fdccbd4..2341881 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -62,6 +62,14 @@ OPTIONS
 	.git/objects/info/alternates to share the objects
 	with the source repository.  The resulting repository
 	starts out without any object of its own.
+	*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.
+
+
 
 --reference <repository>::
 	If the reference repository is on the local machine
-- 
1.5.4.rc3.4.g16335-dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-22 22:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-22 21:03 [PATCH] git-clone -s: document problems with git gc --prune Miklos Vajna
2008-01-22 21:10 ` Brandon Casey
2008-01-22 22:12   ` Miklos Vajna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).