git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Robert Stanca <robert.stanca7@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] [GSOC] prune_worktrees(): reimplement with dir_iterator
Date: Fri, 31 Mar 2017 19:29:42 -0700	[thread overview]
Message-ID: <xmqqlgrkx3l5.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1491009687-10419-1-git-send-email-robert.stanca7@gmail.com> (Robert Stanca's message of "Sat, 1 Apr 2017 04:21:27 +0300")

Robert Stanca <robert.stanca7@gmail.com> writes:

> Replaces recursive traversing of opendir with dir_iterator

The original code for this one, and also the other one, is not
recursive traversing.  This one enumerates all the _direct_
subdirectories of ".git/worktrees", and feeds them to
prune_worktree() without recursing.  The other one scans all the
files _directly_ underneath ".git/objects/pack" to find the ones
that begin with the packtmp prefix, and unlinks them without
recursing.  Neither of them touches anything in subdirectory of
".git/worktrees/" nor ".git/objects/pack/".

Using dir_iterator() to make it recursive is not just overkill but
is a positively wrong change, isn't it?

  reply	other threads:[~2017-04-01  2:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01  1:21 [PATCH] [GSOC] prune_worktrees(): reimplement with dir_iterator Robert Stanca
2017-04-01  2:29 ` Junio C Hamano [this message]
2017-04-01 13:29   ` Robert Stanca
2017-04-01 18:33     ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqlgrkx3l5.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=robert.stanca7@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).