From: Taylor Blau <me@ttaylorr.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Derrick Stolee <derrickstolee@github.com>,
Jeff King <peff@peff.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Victoria Dye <vdye@github.com>
Subject: Re: [PATCH 1/2] builtin/repack.c: only repack `.pack`s that exist
Date: Tue, 11 Jul 2023 13:28:37 -0400 [thread overview]
Message-ID: <ZK2RRdFYl6Vey7oV@nand.local> (raw)
In-Reply-To: <xmqqedlf4jg1.fsf@gitster.g>
On Mon, Jul 10, 2023 at 01:09:50PM -0700, Junio C Hamano wrote:
> > git config pack.window 0 &&
> > P1=$(commit_and_pack 1) &&
> > P2=$(commit_and_pack 2) &&
> > P3=$(commit_and_pack 3) &&
> > P4=$(commit_and_pack 4) &&
> > - ls .git/objects/pack/*.pack >old-counts &&
> > + find .git/objects/pack -name "*.pack" -type f | sort >old-counts &&
> > test_line_count = 4 old-counts &&
> > git repack -a -d --keep-pack $P1 --keep-pack $P4 &&
> > - ls .git/objects/pack/*.pack >new-counts &&
> > + find .git/objects/pack -name "*.pack" -type f | sort >new-counts &&
> > grep -q $P1 new-counts &&
> > grep -q $P4 new-counts &&
> > test_line_count = 3 new-counts &&
>
> I do not think "sort" in both of these added lines is doing anything
> useful. Does the test break without this hunk and if so how?
This is an error on my part; I don't think I realized that a bare ls
gives sorted output, so changing these to 'find ... | sort' was
unnecessary. I'll send a version that removes that noise.
Thanks,
Taylor
next prev parent reply other threads:[~2023-07-11 17:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 19:37 [PATCH 0/2] repack: make `collect_pack_filenames()` consistent Taylor Blau
2023-07-10 19:37 ` [PATCH 1/2] builtin/repack.c: only repack `.pack`s that exist Taylor Blau
2023-07-10 20:09 ` Junio C Hamano
2023-07-11 17:28 ` Taylor Blau [this message]
2023-07-10 19:37 ` [PATCH 2/2] builtin/repack.c: avoid dir traversal in `collect_pack_filenames()` Taylor Blau
2023-07-10 21:35 ` Junio C Hamano
2023-07-11 17:29 ` Taylor Blau
2023-07-11 17:32 ` [PATCH v2 0/2] repack: make `collect_pack_filenames()` consistent Taylor Blau
2023-07-11 17:32 ` [PATCH v2 1/2] builtin/repack.c: only repack `.pack`s that exist Taylor Blau
2023-07-11 17:32 ` [PATCH v2 2/2] builtin/repack.c: avoid dir traversal in `collect_pack_filenames()` Taylor Blau
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=ZK2RRdFYl6Vey7oV@nand.local \
--to=me@ttaylorr.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=vdye@github.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).