git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Turner <dturner@twopensource.com>
To: Michael Rappazzo <rappazzo@gmail.com>
Cc: gitster@pobox.com, sunshine@sunshineco.com, git@vger.kernel.org
Subject: Re: [PATCH v3] worktree: add 'list' command
Date: Mon, 10 Aug 2015 22:55:25 -0400	[thread overview]
Message-ID: <1439261725.5283.9.camel@twopensource.com> (raw)
In-Reply-To: <1439239982-42826-2-git-send-email-rappazzo@gmail.com>

On Mon, 2015-08-10 at 16:53 -0400, Michael Rappazzo wrote:
> +			while ((d = readdir(dir)) != NULL) {

I think it would be useful to break this loop out into a
for_each_worktree function.

While looking into per-worktree ref stuff, I have just noticed that git
prune will delete objects that are only referenced in a different
worktree's detached HEAD.  To fix this, git prune will need to walk over
each worktree, looking at that worktree's HEAD (and other per-worktree
refs).  It would be useful to be able to reuse some of this code for
that task.

  parent reply	other threads:[~2015-08-11  2:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10 20:53 [PATCH v3] worktree: add 'list' command Michael Rappazzo
2015-08-10 20:53 ` Michael Rappazzo
2015-08-10 22:10   ` Junio C Hamano
2015-08-11 11:41     ` Mike Rappazzo
2015-08-11 15:46       ` Junio C Hamano
2015-08-11  2:55   ` David Turner [this message]
2015-08-11 11:42     ` Mike Rappazzo
2015-08-11 15:46     ` 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

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

  git send-email \
    --in-reply-to=1439261725.5283.9.camel@twopensource.com \
    --to=dturner@twopensource.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rappazzo@gmail.com \
    --cc=sunshine@sunshineco.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).