{"thread":{"id":"39708","subject":"Cannot clone a linked working directory.","startedAt":"2015-06-24T10:38:37Z","lastAt":"2015-06-24T11:16:11Z","messageCount":2,"participants":["Bjørnar Snoksrud","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"264720","messageId":"CA+cck7FB6QPz1Pec11TPXxxAhwKR78K9swgsQjMrZPhKJzi_iw@mail.gmail.com","threadId":"39708","inReplyTo":null,"subject":"Cannot clone a linked working directory.","fromName":"Bjørnar Snoksrud","fromEmail":"snoksrud@gmail.com","sentAt":"2015-06-24T10:38:37Z","receivedAt":"2015-06-24T10:38:37Z","isPatch":false,"sender":{"key":"snoksrud@gmail.com","avatar":"https://gravatar.com/avatar/bd7f988a0a0941712c4bb875eb852d6038a15a6e18cb4dc880ba8f6d8c4040fd?d=mp&s=160"},"body":"Summary:\nWhen creating a linked working directory with `git checkout --to`, you\ncannot clone from the local path. This works when cloning the main\nrepository directory.\n\nI couldn't find anything the the documentation for `git checkout` that\nindicates that this shouldn't work.\n\nRepro:\nCreating a repo `foo`, checkout --to'ing it to ../bar, then try to\nclone both resulting repositories -\n\n$ git --version\ngit version 2.4.4.600.g6397abd\n$ mkdir foo\n$ cd foo\n$ git init\nInitialized empty Git repository in /bar/foo/.git/\n$ git commit -m init --allow-empty\n[master (root-commit) c6da399] init\n$ git branch bar\n$ git checkout bar --to ../bar\nEnter ../bar (identifier bar)\nSwitched to branch 'bar'\n$ cd ../bar\n$ cd bar\n$ git status -sb\n## bar\n$ cd ..\n$ git clone bar baz\nCloning into 'baz'...\nfatal: '/path/bar' does not appear to be a git repository\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n$ git clone foo baz\nCloning into 'baz'...\ndone.\n\n\n-- \nbjornar@snoksrud.no\n"},{"id":"264721","messageId":"CACsJy8BDrkrxO6f8SgqRjmLgSCwALqhO5hXEOo51v25=6NpwrA@mail.gmail.com","threadId":"39708","inReplyTo":"CA+cck7FB6QPz1Pec11TPXxxAhwKR78K9swgsQjMrZPhKJzi_iw@mail.gmail.com","subject":"Re: Cannot clone a linked working directory.","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2015-06-24T11:16:11Z","receivedAt":"2015-06-24T11:16:11Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Jun 24, 2015 at 5:38 PM, Bjørnar Snoksrud <snoksrud@gmail.com> wrote:\n> Summary:\n> When creating a linked working directory with `git checkout --to`, you\n> cannot clone from the local path. This works when cloning the main\n> repository directory.\n>\n> I couldn't find anything the the documentation for `git checkout` that\n> indicates that this shouldn't work.\n\nI didn't think of this use case. If something works on the main\nworktree then it should also work on linked checkouts. I think I see\nthe problem and will try to fix it in probably a few days (the \"git\nadd -N\" problem takes higher priority).\n-- \nDuy\n"}]}