{"thread":{"id":"36159","subject":"bug report: regression in git subtree add","startedAt":"2014-03-14T20:49:37Z","lastAt":"2014-03-14T20:49:37Z","messageCount":1,"participants":["Peter Wolanin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"236746","messageId":"CANae7MgZQs4tV9QcJvU3_anABSj-uTdwO+Y4x4mWKySprOEnBA@mail.gmail.com","threadId":"36159","inReplyTo":null,"subject":"bug report: regression in git subtree add","fromName":"Peter Wolanin","fromEmail":"pwolanin@gmail.com","sentAt":"2014-03-14T20:49:37Z","receivedAt":"2014-03-14T20:49:37Z","isPatch":false,"sender":{"key":"pwolanin@gmail.com","avatar":null},"body":"In this commit:\nhttps://github.com/git/git/commit/10a49587fabde88c0afbc80a99d97fae91811f5f\n\ngit subtree add for a remote repository and branch was fundamentally broken.\n\nIt works by chance if a local branch exists that matches the name of\nthe desired remote branch.  Thus, \"master\" happens to work and the bug\npossibly escapes common notice.\n\ncmd_add_repository() does a git fetch - the desired remote refspec can\nnever be found in the local repo until that git fetch is run, so the\nattempt to validate it within cmd_add() is wrong - if desired, that\nshould happen after the fetch in cmd_add_repository().\n\nI think the additions shown in lines 505 and 506 should be reverted,\nsince the rev is also checked in cmd_add_commit()\n\nBest,\n\nPeter Wolanin\n"}]}