git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] prune: --expire=time
Date: Sun, 21 Jan 2007 18:40:40 -0800	[thread overview]
Message-ID: <7virezwzpz.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0701211813410.14248@woody.osdl.org> (Linus Torvalds's message of "Sun, 21 Jan 2007 18:23:29 -0800 (PST)")

Linus Torvalds <torvalds@osdl.org> writes:

> However, now that rebasing ends up being visible in the branch reflog, 
> we're back to the "normally nothing to ever prune" situation, and as such, 
> the only object pruning that _should_ take place is basically as part of 
> "git repack -a -d" (which unlike a prune is actually safe, since it only 
> prunes objects that are reachable from a pack).
>
> So to recap: "git prune" simply isn't a safe thing to do. Don't do it 
> without thinking. I'm not at all sure it's a good idea that "git gc" does 
> it for you, since it just encourages mindless pruning that probably 
> shouldn't happen in the first place.

I guess we are in agreement on this.

-- >8 --
[PATCH] git-gc: do not run prune mindlessly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 Documentation/git-gc.txt |    1 -
 git-gc.sh                |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 2bcc949..f53ca97 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -50,7 +50,6 @@ kept.  This defaults to 15 days.
 
 See Also
 --------
-gitlink:git-prune[1]
 gitlink:git-reflog[1]
 gitlink:git-repack[1]
 gitlink:git-rerere[1]
diff --git a/git-gc.sh b/git-gc.sh
index 6de55f7..7716f62 100755
--- a/git-gc.sh
+++ b/git-gc.sh
@@ -11,5 +11,4 @@ SUBDIRECTORY_OK=Yes
 git-pack-refs --prune &&
 git-reflog expire --all &&
 git-repack -a -d -l &&
-git-prune &&
 git-rerere gc || exit
-- 
1.5.0.rc2

  reply	other threads:[~2007-01-22  2:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-18 17:18 [PATCH] prune-packed: new option --min-age=N Matthias Lederhofer
2007-01-18 17:24 ` Shawn O. Pearce
2007-01-18 17:42   ` Matthias Lederhofer
2007-01-18 17:51     ` Shawn O. Pearce
2007-01-18 22:29       ` [RFC] prune: --expire=seconds Matthias Lederhofer
2007-01-18 22:32         ` Junio C Hamano
2007-01-19  3:44           ` Shawn O. Pearce
2007-01-19 10:49             ` [PATCH] prune: --expire=time Matthias Lederhofer
2007-01-19 15:41               ` Nicolas Pitre
2007-01-19 19:18               ` Junio C Hamano
2007-01-20 11:18                 ` Matthias Lederhofer
2007-01-21  6:55                   ` Junio C Hamano
2007-01-21  7:53                     ` Shawn O. Pearce
2007-01-21 10:37                     ` Matthias Lederhofer
2007-01-21 11:17                       ` Junio C Hamano
2007-01-21 22:01                         ` Jeff King
2007-01-22  1:38                           ` Steven Grimm
2007-01-22  1:52                             ` Jeff King
2007-01-22  2:06                               ` Junio C Hamano
2007-01-22  2:23                                 ` Linus Torvalds
2007-01-22  2:40                                   ` Junio C Hamano [this message]
2007-01-22  2:58                                     ` Linus Torvalds
2007-01-22  5:17                                       ` Junio C Hamano
2007-01-22  6:26                                         ` Linus Torvalds
2007-01-22  6:57                                           ` Shawn O. Pearce
2007-01-22  7:12                                           ` Junio C Hamano
2007-01-22  9:32                                         ` Jakub Narebski
2007-01-22  3:26                                     ` [PATCH] v1.5.0.txt: update description of git-gc Jeff King
2007-01-22  2:03                             ` [PATCH] prune: --expire=time Junio C Hamano
2007-01-20 12:06                 ` Simon 'corecode' Schubert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7virezwzpz.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).