login
Header Space

 
 

Re: [PATCH] prune: --expire=time

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Steven Grimm <koreth@...>
Cc: Jeff King <peff@...>, Matthias Lederhofer <matled@...>, <git@...>
Date: Sunday, January 21, 2007 - 10:03 pm

Steven Grimm <koreth@midwinter.com> writes:


The primary problem is not "while a commit is in progress"
anyway.  I do not think of a single sane reason to run git-prune
from a cron job in a repository that is used for an active
development.  It would make sense for management types to run
count-objects from a cron job and yell at offenders to repack,
but even then the primary disk saving and performance
enhancement would come from repacking and not from pruning.
Especially, 1.5.0 and onwards the objects reachable from reflog
are protected from pruning and reflogs are enabled by default
for developer repositories with working trees, even rewind and
rebae would not create crufts (the only two exceptions that
create cruft are running "git add" more than once on the same
file between commits to leak blobs and intermediate tree objects
recursive merge needs to make when there are more than one
common ancestors).

It is a possibility to have a single timestamp file that any
command that intends to eventually update refs should touch
before it starts creating any object.  Then prune can stat the
file and remember its timestamp before it starts reading the
refs, and then before starting to actually prune the objects it
can stat the file again and if the timestamp is different it can
abort.  Commit, receive-pack (invoked by git-push from the
remote side), fetch-pack (invoked by clone, fetch and pull), etc.
all needs to touch the file upfront before they create even a
single object.  But that would create a very hot spot on the
filesystem, and I am not sure what its ramifications are.

My take on this issue is rather different.  I do agree with you
that prune is a rare enough operation, and I think it should not
penalize the primary thing developers would want to do many
times an hour.  I think its much simpler and saner to teach
people not to run prune in an uncontrolled way.

We may want to remove the call to git-prune from git-gc, and
tell people that if they want to run something from a cron job,
run git-gc and not git-prune.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] prune-packed: new option --min-age=N, Matthias Lederhofer, (Thu Jan 18, 1:18 pm)
Re: [PATCH] prune-packed: new option --min-age=N, Shawn O. Pearce, (Thu Jan 18, 1:24 pm)
Re: [PATCH] prune-packed: new option --min-age=N, Matthias Lederhofer, (Thu Jan 18, 1:42 pm)
Re: [PATCH] prune-packed: new option --min-age=N, Shawn O. Pearce, (Thu Jan 18, 1:51 pm)
[RFC] prune: --expire=seconds, Matthias Lederhofer, (Thu Jan 18, 6:29 pm)
Re: [RFC] prune: --expire=seconds, Junio C Hamano, (Thu Jan 18, 6:32 pm)
Re: [RFC] prune: --expire=seconds, Shawn O. Pearce, (Thu Jan 18, 11:44 pm)
[PATCH] prune: --expire=time, Matthias Lederhofer, (Fri Jan 19, 6:49 am)
Re: [PATCH] prune: --expire=time, Junio C Hamano, (Fri Jan 19, 3:18 pm)
Re: [PATCH] prune: --expire=time, Simon 'corecode' Schubert..., (Sat Jan 20, 8:06 am)
Re: [PATCH] prune: --expire=time, Matthias Lederhofer, (Sat Jan 20, 7:18 am)
Re: [PATCH] prune: --expire=time, Junio C Hamano, (Sun Jan 21, 2:55 am)
Re: [PATCH] prune: --expire=time, Matthias Lederhofer, (Sun Jan 21, 6:37 am)
Re: [PATCH] prune: --expire=time, Junio C Hamano, (Sun Jan 21, 7:17 am)
Re: [PATCH] prune: --expire=time, Jeff King, (Sun Jan 21, 6:01 pm)
Re: [PATCH] prune: --expire=time, Steven Grimm, (Sun Jan 21, 9:38 pm)
Re: [PATCH] prune: --expire=time, Junio C Hamano, (Sun Jan 21, 10:03 pm)
Re: [PATCH] prune: --expire=time, Jeff King, (Sun Jan 21, 9:52 pm)
Re: [PATCH] prune: --expire=time, Junio C Hamano, (Sun Jan 21, 10:06 pm)
Re: [PATCH] prune: --expire=time, Linus Torvalds, (Sun Jan 21, 10:23 pm)
Re: [PATCH] prune: --expire=time, Junio C Hamano, (Sun Jan 21, 10:40 pm)
[PATCH] v1.5.0.txt: update description of git-gc, Jeff King, (Sun Jan 21, 11:26 pm)
Re: [PATCH] prune: --expire=time, Linus Torvalds, (Sun Jan 21, 10:58 pm)
Re: [PATCH] prune: --expire=time, Junio C Hamano, (Mon Jan 22, 1:17 am)
Re: [PATCH] prune: --expire=time, Linus Torvalds, (Mon Jan 22, 2:26 am)
Re: [PATCH] prune: --expire=time, Junio C Hamano, (Mon Jan 22, 3:12 am)
Re: [PATCH] prune: --expire=time, Shawn O. Pearce, (Mon Jan 22, 2:57 am)
Re: [PATCH] prune: --expire=time, Shawn O. Pearce, (Sun Jan 21, 3:53 am)
Re: [PATCH] prune: --expire=time, Nicolas Pitre, (Fri Jan 19, 11:41 am)
speck-geostationary