Fixed bug that occurred when different branches had braids pointing to #10

Merged
merged 1 commit into from Jul 9, 2011

2 participants

@jdicioccio

different branches of the same repository.

Each branch of the target repository requires its own git remote.

Note the difference:
[remote "master/braid/xxx"]
url = /Users/jd/.braid/cache/git_github.com__iteleport_xxx.git
fetch =
+refs/heads/master:refs/remotes/master/braid/xxx/master
[remote "mybranch/braid/xxx"]
url = /Users/jd/.braid/cache/git_github.com_iteleport_xxx.git
fetch =
+refs/heads/mybranch:refs/remotes/mybranch/braid/xxx/mybranch

@jdicioccio jdicioccio Fixed bug that occurred when different branches had braids pointing to
different branches of the same repository.

Each branch of the target repository requires its own git remote.

Note the difference:
[remote "master/braid/xxx"]
    url = /Users/jd/.braid/cache/git_github.com__iteleport_xxx.git
    fetch =
+refs/heads/master:refs/remotes/master/braid/xxx/master
[remote "mybranch/braid/xxx"]
    url = /Users/jd/.braid/cache/git_github.com_iteleport_xxx.git
    fetch =
+refs/heads/mybranch:refs/remotes/mybranch/braid/xxx/mybranch
346964b
@ttilley ttilley merged commit d671e6b into cristibalan:master Jul 9, 2011
@jdicioccio jdicioccio commented on the diff Jul 9, 2011
lib/braid/mirror.rb
@@ -118,6 +118,14 @@ module Braid
git_cache.path(url)
end
+ def remote
+ if (attributes["remote"] && attributes["remote"] =~ /^braid\//)

Thinking about this . . . This would match cases where the branch name was 'braid' .. Probably need to change the format of the string to prevent that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment