{"thread":{"id":"14653","subject":"BUG: fetch incorrect interpretation of globing patterns in refspecs","startedAt":"2008-07-24T07:07:21Z","lastAt":"2008-07-24T07:07:21Z","messageCount":1,"participants":["marc zonzon"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"84678","messageId":"71295b5a0807240007k246973abj1897895d0d67bb6c@mail.gmail.com","threadId":"14653","inReplyTo":null,"subject":"BUG: fetch incorrect interpretation of globing patterns in refspecs","fromName":"marc zonzon","fromEmail":"marc.zonzon@gmail.com","sentAt":"2008-07-24T07:07:21Z","receivedAt":"2008-07-24T07:07:21Z","isPatch":false,"sender":{"key":"marc.zonzon@gmail.com","avatar":null},"body":"Helo\n\nI have a repository repo1 with four branches b_first, b_second,\nb/third,  b/fourth.\nIn a repository repo2 I put a remote config with: fetch =\n+refs/heads/b/*:refs/remotes/b/* and I expect a fetch to apply to both\nb/third and  b/fourth.\nBut fetch will also catch b_first and b_second even if they don't\nmatch the globing pattern.\n\nI give the full script to reproduce the bug.\n\nMarc\n\n---------------------------------------------------------------------------------\nScript started on Thu 24 Jul 2008 08:23:26 AM CEST\n$ mkdir repo1\n$ cd repo1\n$ git init\nInitialized empty Git repository in /shared/home/marc/gits/testbed/repo1/.git/\n$ echo \"master branch\" > README\n$ git add README\n$ git commit README -m'initial commit in master'\nCreated initial commit 9ebc74c: initial commit in master\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 README\n$ git checkout -b  b_first\nSwitched to a new branch \"b_first\"\n$ echo \"branch b_first\" >| README\n$ git add README\n$ git commit README -m'commit in b_first'\nCreated commit 40d985a: commit in b_first\n 1 files changed, 1 insertions(+), 1 deletions(-)\n$ git checkout -b b_second\nSwitched to a new branch \"b_second\"\n$ echo \"branch b_second\" >| README\n$ git add README\n$ git commit README -m'commit in b_second'\nCreated commit 661fe61: commit in b_second\n 1 files changed, 1 insertions(+), 1 deletions(-)\n$ git checkout -b b/third master\nSwitched to a new branch \"b/third\"\n$  echo \"branch b/third\" >| README\n$ git add README\n$ git commit README -m'commit in b/third'\nCreated commit 4f02216: commit in b/third\n 1 files changed, 1 insertions(+), 1 deletions(-)\n$ git checkout -b b/fourth  master\nSwitched to a new branch \"b/fourth\"\n$ echo \"branch b/fourth\" >| README\n$ git add README\n$ git commit README -m'commit in b/fourth'\nCreated commit 068f9da: commit in b/fourth\n 1 files changed, 1 insertions(+), 1 deletions(-)\n$ cd ..\n$ mkdir repo2\n$ cd repo2\n$ git init\nInitialized empty Git repository in /shared/home/marc/gits/testbed/repo2/.git/\n$ git config --add remote.repo1.url ../repo1\n$ git config --add remote.repo1.fetch '+refs/heads/b/*:refs/remotes/b/*'\n$ git fetch -v repo1\nwarning: no common commits\nremote: Counting objects: 15, done.\nremote: Compressing objects: 100% (5/5), done.\nremote: Total 15 (delta 2), reused 0 (delta 0)\nUnpacking objects: 100% (15/15), done.\nFrom ../repo1\n * [new branch]      b/fourth   -> b/fourth\n * [new branch]      b/third    -> b/third\n * [new branch]      b_first    -> b_first\n * [new branch]      b_second   -> b_second\n"}]}