diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2007-11-29 20:59:55 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-30 15:47:01 -0800 |
commit | f01913e4190bed98f918ec575229943a0ee47d83 (patch) | |
tree | c04e9f0017668acdb60db48bb4c0dd88cc8606dc /Documentation | |
parent | 28391a80a94d2b59d1d21f8264fe5dab91d77249 (diff) | |
download | git-f01913e4190bed98f918ec575229943a0ee47d83.tar.gz git-f01913e4190bed98f918ec575229943a0ee47d83.tar.xz |
Add "--expire <time>" option to 'git prune'
Earlier, 'git prune' would prune all loose unreachable objects.
This could be quite dangerous, as the objects could be used in
an ongoing operation.
This patch adds a mode to expire only loose, unreachable objects
which are older than a certain time. For example, by
git prune --expire 14.days
you can prune only those objects which are loose, unreachable
and older than 14 days (and thus probably outdated).
The implementation uses st.st_mtime rather than st.st_ctime,
because it can be tested better, using 'touch -d <time>' (and
omitting the test when the platform does not support that
command line switch).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-prune.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt index 0ace233d1..9835bdb87 100644 --- a/Documentation/git-prune.txt +++ b/Documentation/git-prune.txt @@ -8,7 +8,7 @@ git-prune - Prune all unreachable objects from the object database SYNOPSIS -------- -'git-prune' [-n] [--] [<head>...] +'git-prune' [-n] [--expire <expire>] [--] [<head>...] DESCRIPTION ----------- @@ -31,6 +31,9 @@ OPTIONS \--:: Do not interpret any more arguments as options. +\--expire <time>:: + Only expire loose objects older than <time>. + <head>...:: In addition to objects reachable from any of our references, keep objects |