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] Split packs from git-repack should have descending timestamps
Date: Thu, 24 May 2007 15:33:50 -0700 [thread overview]
Message-ID: <465612CE.4080605@gmail.com> (raw)
If git-repack produces multiple split packs because
--max-pack-size was in effect, the first pack written
should have the latest timestamp because:
(1) sha1_file.c:rearrange_packed_git() puts more recent
pack files at the beginning of the search list; and
(2) the most recent objects are written out first
while packing.
This is based on next rather than master to avoid merge
conflicts with changes already in git-repack.sh due to
the --max-pack-size patchset.
Signed-off-by: Dana L. How <danahow@gmail•com>
---
git-repack.sh | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/git-repack.sh b/git-repack.sh
index 4ea6e5b..953de4a 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -68,6 +68,7 @@ names=$(git-pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP")
if [ -z "$names" ]; then
echo Nothing new to pack.
fi
+restamp=
for name in $names ; do
chmod a-w "$PACKTMP-$name.pack"
chmod a-w "$PACKTMP-$name.idx"
@@ -94,8 +95,12 @@ for name in $names ; do
exit 1
}
rm -f "$PACKDIR/old-pack-$name.pack" "$PACKDIR/old-pack-$name.idx"
+ restamp="$PACKDIR/pack-$name.pack $restamp"
done
+# for split packs, the first created should have most recent timestamp
+for file in $restamp ; do touch $file ; sleep 2; done &
+
if test "$remove_redundant" = t
then
# We know $existing are all redundant.
--
1.5.2.762.gd8c6-dirty
next reply other threads:[~2007-05-24 22:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-24 22:33 Dana How [this message]
2007-05-25 0:46 ` [PATCH] Split packs from git-repack should have descending timestamps Shawn O. Pearce
2007-05-25 1:04 ` Junio C Hamano
2007-05-25 2:33 ` Dana How
2007-05-25 3:18 ` Junio C Hamano
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=465612CE.4080605@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