From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: haoyurenzhuxia@gmail.com, git@vger.kernel.org, me@ttaylorr.com,
derrickstolee@github.com, dyroneteng@gmail.com
Subject: Re: [RFC PATCH] midx.c: clean up .rev file
Date: Wed, 22 Jun 2022 10:53:24 -0700 [thread overview]
Message-ID: <xmqqo7yk60vf.fsf@gitster.g> (raw)
In-Reply-To: <220622.86a6a4lmdv.gmgdl@evledraar.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Wed, 22 Jun 2022 17:56:16 +0200")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> On Wed, Jun 22 2022, haoyurenzhuxia@gmail.com wrote:
>
>> From: Xia XiaoWen <haoyurenzhuxia@gmail.com>
>>
>> The command: `git multi-pack-index write --bitmap` will create 3
>> files in `objects/pack/`:
>> * multi-pack-index
>> * multi-pack-index-*.bitmap
>> * multi-pack-index-*.rev
>>
>> But if the command is terminated by the user (such as Ctl-C) or
>> the system, the midx reverse index file (`multi-pack-index-*.rev`)
>> is not removed and still exists in `objects/pack/`:
>>
>> $ GIT_TEST_MIDX_WRITE_REV=1 git multi-pack-index write --bitmap
>> Selecting bitmap commits: 133020, done.
>> Building bitmaps: 0% (3/331)
>> ^C^C
>>
>> $ tree objects/pack/
>> objects/pack/
>> ├── multi-pack-index-3b048d1b965842cd866e10b6ec1a3035dbede0a5.rev
>> ├── pack-b7d425f1b01727d5f364f5d9fbab2d1900fcd5c0.idx
>> └── pack-b7d425f1b01727d5f364f5d9fbab2d1900fcd5c0.pack
>> ...
> Also, the commit message doesn't really say *why*, i.e. in cmd_repack()
> we've suffered from this already, but don't we have "git gc" cleaning
> these up? Maybe not (I didn't check), but maybe that was the previous
> assumption...
Exactly my thought. Well said.
The _only_ case that might matter is if the next "write --bitmap" gets
confused ir there is a leftover file(s) from a previous run, but then
such a bug should be fixed on the reading side, I would think.
Thanks.
next prev parent reply other threads:[~2022-06-22 17:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 11:50 [RFC PATCH] midx.c: clean up .rev file haoyurenzhuxia
2022-06-22 15:56 ` Ævar Arnfjörð Bjarmason
2022-06-22 17:53 ` Junio C Hamano [this message]
2022-06-22 18:13 ` Taylor Blau
2022-06-22 19:58 ` Junio C Hamano
2022-06-22 21:31 ` Taylor Blau
2022-06-27 5:05 ` Xiaowen Xia
2022-06-23 12:38 ` Teng Long
2022-06-27 3:53 ` Xiaowen Xia
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=xmqqo7yk60vf.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=derrickstolee@github.com \
--cc=dyroneteng@gmail.com \
--cc=git@vger.kernel.org \
--cc=haoyurenzhuxia@gmail.com \
--cc=me@ttaylorr.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.