git_commands 3.2.9 → 3.3.0
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.
- checksums.yaml +4 -4
- data/lib/git_commands/computer.rb +15 -3
- data/lib/git_commands/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4794d0456217191d8939a0bf9c547221176e6ecb
|
4
|
+
data.tar.gz: ddb26bbffe05ef5ec8f997f889aded4fee03201b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6d7669adc0eacc64866b606b5f1aa7a437708ed4f7ddb78a15d13a46bbabfddda4d7c75869bbaa47f1f378c8ab66ed336ffa798d59b32b970fd60010b26a545
|
7
|
+
data.tar.gz: e850c3d49d5ed95020bfc5bebaff07ef91aabb968c88d615cd76f7421c89cb51b7dd28e6cca61e731a08288e8e4a02ed112bf0b24a87f8cfb48e5ba5422121a8
|
@@ -42,7 +42,7 @@ module GitCommands
|
|
42
42
|
warning("Rebasing branch: #{branch}")
|
43
43
|
`git checkout #{branch}`
|
44
44
|
`git pull origin #{branch}`
|
45
|
-
next unless
|
45
|
+
next unless rebase_with
|
46
46
|
`git push -f origin #{branch}`
|
47
47
|
success("Rebased successfully!")
|
48
48
|
end
|
@@ -60,8 +60,8 @@ module GitCommands
|
|
60
60
|
@branches.each do |branch|
|
61
61
|
warning("Merging branch: #{branch}")
|
62
62
|
`git checkout -b #{temp} origin/#{branch} --no-track`
|
63
|
-
|
64
|
-
|
63
|
+
clean_and_exit([temp, release]) unless rebase_with
|
64
|
+
clean_and_exit([temp]) unless rebase_with(release)
|
65
65
|
`git checkout #{release}`
|
66
66
|
`git merge #{temp}`
|
67
67
|
`git branch -D #{temp}`
|
@@ -91,6 +91,13 @@ module GitCommands
|
|
91
91
|
error("Got conflicts, aborting rebase!")
|
92
92
|
end
|
93
93
|
|
94
|
+
private def rebase_with(branch = "#{Branch::ORIGIN}#{Branch::MASTER}")
|
95
|
+
`git rebase #{branch}`
|
96
|
+
return true unless @repo.locked?
|
97
|
+
@repo.unlock
|
98
|
+
error("Got conflicts, aborting rebase with #{branch}!")
|
99
|
+
end
|
100
|
+
|
94
101
|
private def enter_repo
|
95
102
|
Dir.chdir(@repo) do
|
96
103
|
pull_master
|
@@ -104,5 +111,10 @@ module GitCommands
|
|
104
111
|
`git branch -D #{branch}`
|
105
112
|
end
|
106
113
|
end
|
114
|
+
|
115
|
+
private def clean_and_exit(branches)
|
116
|
+
remove_locals(branches)
|
117
|
+
exit
|
118
|
+
end
|
107
119
|
end
|
108
120
|
end
|
data/lib/git_commands/version.rb
CHANGED