ohloh_scm 2.4.5 → 2.4.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1eba74f2f8aefc6d482ec6425cf73836fdfb58cd
|
4
|
+
data.tar.gz: 7275ff1620338c7e4d4087040ee34c17ca536f71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3794d2921caf4d60a2b0f86060575fabde5a965a788a1c267e3ce5d4b1f2951fdfd7d39ec1298037b7034bce7a9af52ee020efbf439c2f85dd4a4639ed28b80c
|
7
|
+
data.tar.gz: 2920c4fc6623cfbc3dd40c7479f3992c7757af0210cc811c7c57992b2c4f8e31dd71fae3a238ce280f6cc82eb8714cf0c2895c2b47677121bfa252a44b431a18
|
@@ -36,8 +36,8 @@ module OhlohScm::Adapters
|
|
36
36
|
if FileTest.exist? git_path
|
37
37
|
run "cd '#{url}' && git clean -f -d -x"
|
38
38
|
if self.has_branch?
|
39
|
-
run "cd '#{url}' && git reset --hard heads/#{self.branch_name} --"
|
40
39
|
run "cd '#{url}' && git checkout #{self.branch_name} --"
|
40
|
+
run "cd '#{url}' && git reset --hard heads/#{self.branch_name} --"
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
data/lib/ohloh_scm/version.rb
CHANGED
Binary file
|
data/test/unit/git_pull_test.rb
CHANGED
@@ -28,5 +28,23 @@ module OhlohScm::Adapters
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
31
|
+
|
32
|
+
def test_basic_pull_of_non_default_branch
|
33
|
+
# This should not change current/default branch(e.g. master) to point to the branch commit being pulled
|
34
|
+
# In this case master should not point to test branch commit
|
35
|
+
with_git_repository('git_with_multiple_branch', 'test') do |src|
|
36
|
+
OhlohScm::ScratchDir.new do |dest_dir|
|
37
|
+
dest = GitAdapter.new(:url => dest_dir, branch_name: 'test').normalize
|
38
|
+
assert !dest.exist?
|
39
|
+
dest.pull(src)
|
40
|
+
remote_master_branch_sha = `cd #{dest_dir} && git rev-parse origin/master`
|
41
|
+
master_branch_sha = `cd #{dest_dir} && git rev-parse master`
|
42
|
+
test_branch_sha = `cd #{dest_dir} && git rev-parse test`
|
43
|
+
|
44
|
+
assert_not_equal master_branch_sha, test_branch_sha
|
45
|
+
assert_equal master_branch_sha, remote_master_branch_sha
|
31
46
|
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
32
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohloh_scm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BlackDuck Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: posix-spawn
|
@@ -461,6 +461,7 @@ files:
|
|
461
461
|
- test/repositories/git_with_empty_merge.tgz
|
462
462
|
- test/repositories/git_with_invalid_encoding.tgz
|
463
463
|
- test/repositories/git_with_master_tag.tgz
|
464
|
+
- test/repositories/git_with_multiple_branch.tgz
|
464
465
|
- test/repositories/git_with_null_merge.tgz
|
465
466
|
- test/repositories/hg.tgz
|
466
467
|
- test/repositories/hg_dupe_delete.tgz
|
@@ -645,7 +646,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
645
646
|
version: '0'
|
646
647
|
requirements: []
|
647
648
|
rubyforge_project:
|
648
|
-
rubygems_version: 2.
|
649
|
+
rubygems_version: 2.4.8
|
649
650
|
signing_key:
|
650
651
|
specification_version: 4
|
651
652
|
summary: Source Control Management
|
@@ -932,6 +933,7 @@ test_files:
|
|
932
933
|
- test/repositories/git_with_empty_merge.tgz
|
933
934
|
- test/repositories/git_with_invalid_encoding.tgz
|
934
935
|
- test/repositories/git_with_master_tag.tgz
|
936
|
+
- test/repositories/git_with_multiple_branch.tgz
|
935
937
|
- test/repositories/git_with_null_merge.tgz
|
936
938
|
- test/repositories/hg.tgz
|
937
939
|
- test/repositories/hg_dupe_delete.tgz
|