* [PATCH] Allow git-repack to optionally run git-prune-packed.
@ 2006-03-07 15:16 Martin Atukunda
2006-03-07 21:29 ` Alex Riesen
0 siblings, 1 reply; 5+ messages in thread
From: Martin Atukunda @ 2006-03-07 15:16 UTC (permalink / raw)
To: git; +Cc: Martin Atukunda
Signed-off-by: Martin Atukunda <matlads@dsmagic.com>
---
Documentation/git-repack.txt | 6 +++++-
git-repack.sh | 9 +++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
84104979482df25e6c70e17f8bf2307cdad1faff
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index d2f9a44..835e698 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -9,7 +9,7 @@ objects into pack files.
SYNOPSIS
--------
-'git-repack' [-a] [-d] [-f] [-l] [-n] [-q]
+'git-repack' [-a] [-d] [-f] [-l] [-n] [-q] [-p]
DESCRIPTION
-----------
@@ -55,6 +55,10 @@ OPTIONS
Do not update the server information with
`git update-server-info`.
+-p::
+ Run `git-prune-packed` after packing, see
+ gitlink:git-prune-packed[1]
+
Author
------
Written by Linus Torvalds <torvalds@osdl.org>
diff --git a/git-repack.sh b/git-repack.sh
index 3d6fec1..970f4ca 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -3,11 +3,11 @@
# Copyright (c) 2005 Linus Torvalds
#
-USAGE='[-a] [-d] [-f] [-l] [-n] [-q]'
+USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [-p]'
. git-sh-setup
no_update_info= all_into_one= remove_redundant=
-local= quiet= no_reuse_delta=
+local= quiet= no_reuse_delta= run_prune=
while case "$#" in 0) break ;; esac
do
case "$1" in
@@ -17,6 +17,7 @@ do
-q) quiet=-q ;;
-f) no_reuse_delta=--no-reuse-delta ;;
-l) local=--local ;;
+ -p) run_prune=t;;
*) usage ;;
esac
shift
@@ -77,6 +78,10 @@ then
fi
fi
+case "$run_prune" in
+t) git-prune-packed;;
+esac
+
case "$no_update_info" in
t) : ;;
*) git-update-server-info ;;
--
1.2.4.g84104
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Allow git-repack to optionally run git-prune-packed.
2006-03-07 15:16 [PATCH] Allow git-repack to optionally run git-prune-packed Martin Atukunda
@ 2006-03-07 21:29 ` Alex Riesen
2006-03-09 10:24 ` Martin Atukunda
0 siblings, 1 reply; 5+ messages in thread
From: Alex Riesen @ 2006-03-07 21:29 UTC (permalink / raw)
To: Martin Atukunda; +Cc: git
Martin Atukunda, Tue, Mar 07, 2006 16:16:12 +0100:
> +-p::
> + Run `git-prune-packed` after packing, see
> + gitlink:git-prune-packed[1]
> +
Maybe just make "-d" work? I.e. "git repack -a -d" repacks and prunes
everything, and "git repack -d" prunes just what was packed
incrementally.
Something like this:
diff --git a/git-repack.sh b/git-repack.sh
index 3d6fec1..be6c7ab 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -74,6 +74,8 @@ then
esac
done
)
+ else
+ git-prune-packed
fi
fi
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Allow git-repack to optionally run git-prune-packed.
2006-03-07 21:29 ` Alex Riesen
@ 2006-03-09 10:24 ` Martin Atukunda
2006-03-09 14:48 ` Alex Riesen
0 siblings, 1 reply; 5+ messages in thread
From: Martin Atukunda @ 2006-03-09 10:24 UTC (permalink / raw)
To: Alex Riesen; +Cc: git
Your suggestion has merit, though it's different from the behaviour I
desired. I _sometimes_ need the pruning, and it felt appropriate to make
it an option as opposed to default behaviour.
What do you think?
- Martin -
On Tue, Mar 07, 2006 at 10:29:18PM +0100, Alex Riesen wrote:
> Martin Atukunda, Tue, Mar 07, 2006 16:16:12 +0100:
> > +-p::
> > + Run `git-prune-packed` after packing, see
> > + gitlink:git-prune-packed[1]
> > +
>
> Maybe just make "-d" work? I.e. "git repack -a -d" repacks and prunes
> everything, and "git repack -d" prunes just what was packed
> incrementally.
> Something like this:
>
> diff --git a/git-repack.sh b/git-repack.sh
> index 3d6fec1..be6c7ab 100755
> --- a/git-repack.sh
> +++ b/git-repack.sh
> @@ -74,6 +74,8 @@ then
> esac
> done
> )
> + else
> + git-prune-packed
> fi
> fi
>
>
> -
> 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
--
Girl on cell: Can you hear me when I roll my eyes?
-- www.overheardinnewyourk.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Allow git-repack to optionally run git-prune-packed.
2006-03-09 10:24 ` Martin Atukunda
@ 2006-03-09 14:48 ` Alex Riesen
2006-03-09 18:50 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Alex Riesen @ 2006-03-09 14:48 UTC (permalink / raw)
To: Alex Riesen, git
On 3/9/06, Martin Atukunda <matlads@dsmagic.com> wrote:
> Your suggestion has merit, though it's different from the behaviour I
> desired. I _sometimes_ need the pruning, and it felt appropriate to make
> it an option as opposed to default behaviour.
>
> What do you think?
>
I think that my patch didn't change the default. git-prune-packed is called
only if -d is given, which is not the default.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Allow git-repack to optionally run git-prune-packed.
2006-03-09 14:48 ` Alex Riesen
@ 2006-03-09 18:50 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2006-03-09 18:50 UTC (permalink / raw)
To: Alex Riesen; +Cc: git, Alex Riesen
"Alex Riesen" <raa.lkml@gmail.com> writes:
> On 3/9/06, Martin Atukunda <matlads@dsmagic.com> wrote:
>> Your suggestion has merit, though it's different from the behaviour I
>> desired. I _sometimes_ need the pruning, and it felt appropriate to make
>> it an option as opposed to default behaviour.
>>
>> What do you think?
>
> I think that my patch didn't change the default. git-prune-packed is called
> only if -d is given, which is not the default.
I am inclined to say I prefer Alex' one.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-03-09 18:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-07 15:16 [PATCH] Allow git-repack to optionally run git-prune-packed Martin Atukunda
2006-03-07 21:29 ` Alex Riesen
2006-03-09 10:24 ` Martin Atukunda
2006-03-09 14:48 ` Alex Riesen
2006-03-09 18:50 ` Junio C Hamano
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).