From: worley@alum.mit.edu (Dale R. Worley)
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [git-users] Problem using detached worktrees with commands implemented in scripts
Date: Fri, 18 Oct 2013 18:50:32 -0400 [thread overview]
Message-ID: <201310182250.r9IMoW57003157@freeze.ariadne.com> (raw)
In-Reply-To: <xmqq4n8fzmmj.fsf@gitster.dls.corp.google.com>
> From: Junio C Hamano <gitster@pobox.com>
> Now, when you say "the cwd contains the .git directory", do you mean
>
> cd /repositories
> git add ../working/trees/proj-wt1/file
>
> updates "file" in the /repositories/proj.git/index? Or do you mean
> this?
The pattern I use is to have this:
/repository/.git
/working/...
then
cd /repository
git add /working/x/y/z
works as you'd expect it to. "git rm" seems to work correctly under
these circumstances as well.
I seem to recall that using relative <path> values doesn't work under
some conditions involving symbolic links, but I can't recall the
details right now.
> you talk about starting Git command _outside_ the working tree
> (whether the working tree has its repository embedded in it is not
> very relevant).
The above pattern is what I mean, where the cwd is not within the work
tree.
Dale
prev parent reply other threads:[~2013-10-18 22:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 20:03 [git-users] Problem using detached worktrees with commands implemented in scripts Dale R. Worley
2013-10-16 21:42 ` Junio C Hamano
2013-10-16 22:39 ` Philip Oakley
2013-10-16 23:08 ` Junio C Hamano
2013-10-17 20:11 ` Philip Oakley
2013-10-17 20:50 ` Junio C Hamano
2013-10-17 21:14 ` Philip Oakley
2013-10-17 22:38 ` Philip Oakley
2013-10-17 22:48 ` Jonathan Nieder
2013-10-18 20:40 ` Philip Oakley
2013-10-18 22:54 ` Dale R. Worley
2013-10-17 19:09 ` Dale R. Worley
2013-10-17 20:08 ` Junio C Hamano
2013-10-18 22:25 ` Dale R. Worley
2013-10-18 22:43 ` Junio C Hamano
2013-10-21 18:51 ` Dale R. Worley
2013-10-18 22:50 ` Dale R. Worley [this message]
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=201310182250.r9IMoW57003157@freeze.ariadne.com \
--to=worley@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).