* [PATCH] repack: honor -d even when no new pack was created
@ 2006-05-07 18:18 Martin Waitz
0 siblings, 0 replies; 2+ messages in thread
From: Martin Waitz @ 2006-05-07 18:18 UTC (permalink / raw)
To: git
If all objects are reachable via an alternate object store then we
still have to remove all obsolete local packs.
Signed-off-by: Martin Waitz <tali@admingilde.org>
---
git-repack.sh | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
c37df94d2b1633ce329bbe079805073b40a48548
diff --git a/git-repack.sh b/git-repack.sh
index e0c9f32..4fb3f26 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -48,15 +48,15 @@ name=$(git-rev-list --objects --all $rev
exit 1
if [ -z "$name" ]; then
echo Nothing new to pack.
- exit 0
-fi
-echo "Pack pack-$name created."
+else
+ echo "Pack pack-$name created."
-mkdir -p "$PACKDIR" || exit
+ mkdir -p "$PACKDIR" || exit
-mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
-mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" ||
-exit
+ mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
+ mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" ||
+ exit
+fi
if test "$remove_redundant" = t
then
--
1.3.1.g6ef7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] repack: honor -d even when no new pack was created
@ 2006-05-01 10:57 Martin Waitz
0 siblings, 0 replies; 2+ messages in thread
From: Martin Waitz @ 2006-05-01 10:57 UTC (permalink / raw)
To: git
If all objects are reachable via an alternate object store then we
still have to remove all obsolete local packs.
Signed-off-by: Martin Waitz <tali@admingilde.org>
---
Without this patch I got the following behaviour:
".git/objects/info/alternates" [Neu] 1L, 38C geschrieben
admingilde:~/src/linux-2.6 > git count-objects
107852 objects, 665596 kilobytes
admingilde:~/src/linux-2.6 > git repack -a -l -d
Generating pack...
Done counting 0 objects.
Nothing new to pack.
admingilde:~/src/linux-2.6 > git prune
admingilde:~/src/linux-2.6 > git count-objects
0 objects, 0 kilobytes
admingilde:~/src/linux-2.6 > ls .git/objects/pack
pack-b3c6fbdfa36a326815de6358885c7a570a986b1b.idx
pack-b3c6fbdfa36a326815de6358885c7a570a986b1b.pack
pack-e0d76ffe354ef5665028a6cb4506ea902f72e1d0.idx
pack-e0d76ffe354ef5665028a6cb4506ea902f72e1d0.pack
After changing git-repack, objects/pack was empty, as expected.
git-repack.sh | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
c58513fa76e10007fdf15b49a593a2b9c6a080be
diff --git a/git-repack.sh b/git-repack.sh
index e0c9f32..4fb3f26 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -48,15 +48,15 @@ name=$(git-rev-list --objects --all $rev
exit 1
if [ -z "$name" ]; then
echo Nothing new to pack.
- exit 0
-fi
-echo "Pack pack-$name created."
+else
+ echo "Pack pack-$name created."
-mkdir -p "$PACKDIR" || exit
+ mkdir -p "$PACKDIR" || exit
-mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
-mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" ||
-exit
+ mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
+ mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" ||
+ exit
+fi
if test "$remove_redundant" = t
then
--
1.3.1.g8971-dirty
--
Martin Waitz
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-07 18:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-07 18:18 [PATCH] repack: honor -d even when no new pack was created Martin Waitz
-- strict thread matches above, loose matches on Subject: below --
2006-05-01 10:57 Martin Waitz
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).