All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Doug Kelly <dougk.ff7@gmail.com>
Cc: Git List <git@vger.kernel.org>, Jeff King <peff@peff.net>,
	Stefan Beller <sbeller@google.com>
Subject: Re: [PATCH 3/4] t5304: Ensure wanted files are not deleted
Date: Tue, 19 Jan 2016 10:36:03 -0800	[thread overview]
Message-ID: <xmqq60ypbeng.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAEtYS8TfcJBbO_QJGH-Z9a3AHLdsO+H+k_fAS2EtJOH8bVwFEg@mail.gmail.com> (Doug Kelly's message of "Mon, 18 Jan 2016 10:54:50 -0600")

Doug Kelly <dougk.ff7@gmail.com> writes:

> On Wed, Jan 13, 2016 at 2:55 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Doug Kelly <dougk.ff7@gmail.com> writes:
>>
>>> Subject: Re: [PATCH 3/4] t5304: Ensure wanted files are not deleted
>>
>> I'd suggest s/wanted/non-garbage/.
>>
>
> I'm okay with this.
>
>>> Explicitly test for and ensure files that may be wanted are not
>>> deleted during a gc operation.  These include .pack without .idx
>>> (which may be in-flight), garbage in the directory, and .keep files
>>> the user created.
>>
>> "garbage in the directory" is not well defined.  "files in the
>> directory that clearly are not related to packing" is probably what
>> you meant, but the definition of "related to packing" is still
>> fuzzy.  Please clarify.
>
> This is probably a good point.  Perhaps a better way to think about it
> would be by rewording the paragraph to something like this:
>
> Explicitly test for and ensure files that may either be desired by the user
> or are possibly not garbage are not deleted during a gc operation.
> These include .pack files missing a corresponding .idx file (possibly due
> to it being in-flight), .keep files created by the user, and other
> unknown garbage in the pack directory.  These files will still be identified
> by "git count-objects -v", but should not be removed automatically by
> gc.  Only files we are absolutely sure are unnecessary will be removed
> as a part of the gc process.

That, especially "other _unknown_ garbage", looks much better than
the original.

> I'm not saying there's nothing to be said for the difference in the base
> filename without extension.  Currently, the logic to remove pack garbage
> doesn't look at that, though: it only considers the extension, and what
> related files are found in the directory.  Whether this is good or bad, I'm
> not sure.  It certainly does what I need at fairly low risk, though.
>
> Does this help clarify the situation more?

I was shooting for making you _think_ exactly about what you wrote
in the above paragraph, i.e. what the current logic does and if it
is sensible, is overly pessimistic for some files, and/or is risky
for some other files and if so in what way, as that would help you
record the thinking behind the different treatment for files based
on various file extentions clearly in the log message.

Thanks.

  reply	other threads:[~2016-01-19 18:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-14  0:10 [PATCH 0/3] Add cleanup for garbage .bitmap files Doug Kelly
2015-11-14  0:10 ` [PATCH 1/3] prepare_packed_git(): find more garbage Doug Kelly
2015-11-14  0:43   ` Stefan Beller
2015-11-14  0:46     ` Doug Kelly
2015-11-14  0:46       ` [PATCH 2/3] t5304: Add test for .bitmap garbage files Doug Kelly
2015-11-14  0:46       ` [PATCH 3/3] gc: Clean garbage .bitmap files from pack dir Doug Kelly
2015-12-15 23:23         ` Jeff King
2015-11-25 18:43       ` [PATCH 1/3] prepare_packed_git(): find more garbage Stefan Beller
2015-11-26  6:15         ` Doug Kelly
2015-12-15 23:09           ` Jeff King
2015-12-15 23:25             ` Jeff King
2015-12-19  0:06               ` [PATCH v3 0/3] " Doug Kelly
2015-12-19  0:06                 ` [PATCH 1/3] " Doug Kelly
2015-12-19  0:06                 ` [PATCH 2/3] t5304: Add test for .bitmap garbage files Doug Kelly
2015-12-19  0:06                 ` [PATCH 3/3] gc: Clean garbage .bitmap files from pack dir Doug Kelly
2015-12-19  2:01                   ` Jeff King
2015-12-19  2:02                 ` [PATCH v3 0/3] prepare_packed_git(): find more garbage Jeff King
2015-12-19  2:03                   ` Jeff King
2016-01-11 16:35                     ` Stefan Beller
2016-01-13 17:07                 ` [PATCH v4 0/4] gc: Clean garbage .bitmap files from pack dir Doug Kelly
2016-01-13 17:07                   ` [PATCH 1/4] prepare_packed_git(): find more garbage Doug Kelly
2016-01-13 17:07                   ` [PATCH 2/4] t5304: Add test for .bitmap garbage files Doug Kelly
2016-01-13 20:42                     ` Junio C Hamano
2016-01-13 17:07                   ` [PATCH 3/4] t5304: Ensure wanted files are not deleted Doug Kelly
2016-01-13 20:55                     ` Junio C Hamano
2016-01-18 16:54                       ` Doug Kelly
2016-01-19 18:36                         ` Junio C Hamano [this message]
2016-01-13 17:07                   ` [PATCH 4/4] gc: Clean garbage .bitmap files from pack dir Doug Kelly
2015-11-26  6:18         ` [PATCH 1/3] prepare_packed_git(): find more garbage Doug Kelly
2015-11-14  0:47     ` Doug Kelly
2015-11-14  0:10 ` [PATCH 2/3] t5304: Add test for .bitmap garbage files Doug Kelly
2015-11-14  0:47   ` Stefan Beller
2015-11-14  0:10 ` [PATCH 3/3] gc: Clean garbage .bitmap files from pack dir Doug Kelly

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=xmqq60ypbeng.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=dougk.ff7@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sbeller@google.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.