git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] prune: keep files created after process start

From
EWEric Wong <e@80x24.org>
Date
Jun 19, 2016, 04:32 UTC
Message-ID
<20160619043243.GA26443@dcvr.yhbt.net>
In-Reply-To
<xmqqa8ihygms.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> Eric Wong <e@80x24.org> writes:
> >  I'm somewhat surprised this check didn't already exist;
> >  but maybe nobody else runs prune manually, anymore.
> 
> The only time an end user would run "git prune" in their
> repositories with working trees these days is "git repack" followed
> by "git prune", I would guess.
Right, I wanted to drop some sensitive data with that.
> You generally cannot compare a timestamp you read from the
> filesystem and the timestamp you obtain from time(2) when network
> filesystems are involved, so I am not sure the implementation is
> quite right, though.

Yes, but I'm not aware of a good way to deal with this; I would expect machines on the same network would have synchronized times.

Perhaps having a small slack time (one second?) could mitigate some problems with machines being slightly off:

       start = time(NULL) - 1;

And then warning if it encountered files within the slack period and asking the user to rerun "prune" if needed. But I'm not sure it's worth it.

Any other suggestions?
Thanks.

Having prune prevent object creation entirely while running seems unacceptable.

Previous: Junio C HamanoNext: Jeff King
Message 3 of 6 in “prune: keep files created after process start”
  1. prune: keep files created after process startEric Wong, Jun 19, 2016
  2. Junio C HamanoJun 19, 2016
  3. Eric WongJun 19, 2016
  4. Jeff KingJun 19, 2016
  5. Andreas SchwabJun 19, 2016
  6. Eric WongJun 19, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.