git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Cannot clone a linked working directory.
@ 2015-06-24 10:38 Bjørnar Snoksrud
  2015-06-24 11:16 ` Duy Nguyen
  0 siblings, 1 reply; 2+ messages in thread
From: Bjørnar Snoksrud @ 2015-06-24 10:38 UTC (permalink / raw)
  To: Git Mailing List

Summary:
When creating a linked working directory with `git checkout --to`, you
cannot clone from the local path. This works when cloning the main
repository directory.

I couldn't find anything the the documentation for `git checkout` that
indicates that this shouldn't work.

Repro:
Creating a repo `foo`, checkout --to'ing it to ../bar, then try to
clone both resulting repositories -

$ git --version
git version 2.4.4.600.g6397abd
$ mkdir foo
$ cd foo
$ git init
Initialized empty Git repository in /bar/foo/.git/
$ git commit -m init --allow-empty
[master (root-commit) c6da399] init
$ git branch bar
$ git checkout bar --to ../bar
Enter ../bar (identifier bar)
Switched to branch 'bar'
$ cd ../bar
$ cd bar
$ git status -sb
## bar
$ cd ..
$ git clone bar baz
Cloning into 'baz'...
fatal: '/path/bar' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
$ git clone foo baz
Cloning into 'baz'...
done.


-- 
bjornar@snoksrud.no

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cannot clone a linked working directory.
  2015-06-24 10:38 Cannot clone a linked working directory Bjørnar Snoksrud
@ 2015-06-24 11:16 ` Duy Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Duy Nguyen @ 2015-06-24 11:16 UTC (permalink / raw)
  To: bjornar; +Cc: Git Mailing List

On Wed, Jun 24, 2015 at 5:38 PM, Bjørnar Snoksrud <snoksrud@gmail.com> wrote:
> Summary:
> When creating a linked working directory with `git checkout --to`, you
> cannot clone from the local path. This works when cloning the main
> repository directory.
>
> I couldn't find anything the the documentation for `git checkout` that
> indicates that this shouldn't work.

I didn't think of this use case. If something works on the main
worktree then it should also work on linked checkouts. I think I see
the problem and will try to fix it in probably a few days (the "git
add -N" problem takes higher priority).
-- 
Duy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-24 11:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 10:38 Cannot clone a linked working directory Bjørnar Snoksrud
2015-06-24 11:16 ` Duy Nguyen

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).