git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: git@vger.kernel.org, judge.packham@gmail.co, Jens.Lehmann@web.de,
	jrnieder@gmail.com
Subject: Re: [PATCH 2/2] worktree: provide better prefix to go back to original cwd
Date: Thu, 07 Oct 2010 07:56:57 -0700	[thread overview]
Message-ID: <7vvd5evyo6.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: AANLkTim8R2ZxJ1_KnxxRwTjf2mz=NtgQ9MyV_7iAqEpG@mail.gmail.com

Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:

> On Thu, Oct 7, 2010 at 12:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> pclouds@gmail.com writes:
>> ...
>> If the original cwd is inside GIT_WORK_TREE, limiting ourselves inside
>> prefix naturally limits the operation to the subdirectory we started from
>> (if the original cwd is at GIT_WORK_TREE, that would make it a whole-tree
>> operation).  A natural extension of this idea to limit the operation to
>> the part of the subtree of the working tree we started from is to refuse
>> to work in the case where the original cwd is outside GIT_WORK_TREE (the
>> current implementation of GIT_WORK_TREE may or may not correctly implement
>> it, though---I never use it myself).
>
> I tend to think that as we go up to worktree's root, prefix is shorten
> and the operation area is widen. When cwd is at worktree's, we operate
> on full worktree. If it goes up one level higher, the operation area
> remains full worktree (but not everything under cwd because cwd now
> can have non-worktree directories).

I have a feeling that you did not understand my /srv/git/git.git (no, it
is not a bare repository) vs /var/tmp example.

I think it makes the new semantics much less yucky if the special case is
limited to "the working tree is a subdirectory somewhere under cwd".  But
does your patch check and notice that /var/tmp is not above the working
tree and they are completely unrelated?

  reply	other threads:[~2010-10-07 14:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07  4:46 [PATCH 2/2] worktree: provide better prefix to go back to original cwd pclouds
2010-10-07  5:53 ` Nguyen Thai Ngoc Duy
2010-10-07  5:54 ` Junio C Hamano
2010-10-07  7:20   ` Nguyen Thai Ngoc Duy
2010-10-07 14:56     ` Junio C Hamano [this message]
2010-10-07 15:11       ` Nguyen Thai Ngoc Duy

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=7vvd5evyo6.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=judge.packham@gmail.co \
    --cc=pclouds@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).