From: Dana How <danahow@gmail•com>
To: Junio C Hamano <junkio@cox•net>
Cc: Git Mailing List <git@vger•kernel.org>, danahow@gmail•com
Subject: [PATCH] Ensure git-repack -a -d --max-pack-size=N deletes correct packs
Date: Thu, 24 May 2007 19:06:42 -0700 [thread overview]
Message-ID: <465644B2.5040203@gmail.com> (raw)
The packfile portion of the "remove redundant" code
near the bottom of git-repack.sh is broken when
pack splitting occurs. Particularly since this is
the only place where we automatically delete packfiles,
make sure it works properly for all cases, old or new.
This is based on "next".
Signed-off-by: Dana L. How <danahow@gmail•com>
---
git-repack.sh | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/git-repack.sh b/git-repack.sh
index 4ea6e5b..0591bd7 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -69,6 +69,7 @@ if [ -z "$names" ]; then
echo Nothing new to pack.
fi
for name in $names ; do
+ fullbases="$fullbases pack-$name"
chmod a-w "$PACKTMP-$name.pack"
chmod a-w "$PACKTMP-$name.idx"
if test "$quiet" != '-q'; then
@@ -105,8 +106,8 @@ then
( cd "$PACKDIR" &&
for e in $existing
do
- case "$e" in
- pack-$name) ;;
+ case " $fullbases " in
+ *\ $e\ *) ;;
*) rm -f "$e.pack" "$e.idx" "$e.keep" ;;
esac
done
--
1.5.2.762.gd8c6-dirty
reply other threads:[~2007-05-25 2:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=465644B2.5040203@gmail.com \
--to=danahow@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=junkio@cox$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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