rip 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rip/packages/git_package.rb +6 -2
- data/lib/rip/version.rb +1 -1
- metadata +1 -1
@@ -43,7 +43,7 @@ module Rip
|
|
43
43
|
|
44
44
|
def unpack!
|
45
45
|
Dir.chdir cache_path do
|
46
|
-
git_reset_hard
|
46
|
+
git_reset_hard version_is_branch? ? "origin/#{version}" : version
|
47
47
|
git_submodule_init
|
48
48
|
git_submodule_update
|
49
49
|
end
|
@@ -60,8 +60,12 @@ module Rip
|
|
60
60
|
|
61
61
|
fetch
|
62
62
|
Dir.chdir(cache_path) do
|
63
|
-
git_cat_file(@version).size > 0
|
63
|
+
git_cat_file(@version).size > 0 || version_is_branch?
|
64
64
|
end
|
65
65
|
end
|
66
|
+
|
67
|
+
def version_is_branch?
|
68
|
+
git_cat_file("origin/#{version}").size > 0
|
69
|
+
end
|
66
70
|
end
|
67
71
|
end
|
data/lib/rip/version.rb
CHANGED