lib/braid/mirror.rb in braid-0.5 vs lib/braid/mirror.rb in braid-0.6
- old
+ new
@@ -84,11 +84,11 @@
end
def diff
remote_hash = git.rev_parse("#{base_revision}:")
local_hash = git.tree_hash(path)
- remote_hash != local_hash ? git.diff_tree(remote_hash, local_hash, path) : ""
+ remote_hash != local_hash ? git.diff_tree(remote_hash, local_hash) : ""
end
def fetch
unless type == "svn"
git_cache.fetch(url) if cached?
@@ -97,11 +97,11 @@
git_svn.fetch(remote)
end
end
def cached?
- git.remote_url(remote) == git_cache.path(url)
+ git.remote_url(remote) == cached_url
end
def base_revision
if revision
unless type == "svn"
@@ -110,9 +110,13 @@
git_svn.commit_hash(remote, revision)
end
else
inferred_revision
end
+ end
+
+ def cached_url
+ git_cache.path(url)
end
private
def method_missing(name, *args)
if ATTRIBUTES.find { |attribute| name.to_s =~ /^(#{attribute})(=)?$/ }