rip 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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