git_commands 3.2.5 → 3.2.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdad6f742ea09e2b50d560714ee7a74b7848ffc5
4
- data.tar.gz: 88697a5add19a72d6cbb0602e1ee423aa6bcbb6b
3
+ metadata.gz: 2936c4e9f2983c15ed57ca5771dfa518d2aeecd9
4
+ data.tar.gz: 095c33cffbb33c11c3069b62607892e8db2944fe
5
5
  SHA512:
6
- metadata.gz: 90a1dbe956bb86468132c4993d2443ead432a6998dcaf6f1e64f320971a97bf466bbdee99dc81ae7b854f40782299bab8ad357bc5644adfceca07fe20db4483f
7
- data.tar.gz: 38774eda256e02d2e4ba318de4e031862392ab9ecbb785121b0525dd8df05331627e42ba68e02ebeaf51f5f8da9f9156a389fb43aacc2215266f1ae6f930fdf3
6
+ metadata.gz: a88f137909b4d8607af9cb674eac69008e7fa88c9cbcd18403416a704cc50a1bd03f45d5dc1e03834ac7a1c7f1ba0884a2e558292791567cc0f8fd5e3e964e05
7
+ data.tar.gz: f57c3a817cdb54dd6a9428071d2dc90baf5d905bd0d1aa1a190046ac1a2608132e2fe5e06562fb4588d567adc49f6ccba6e3bb49df0af3983c375891027c9b73
data/README.md CHANGED
@@ -55,7 +55,7 @@ Usage: rebase --repo=/Users/Elvis/greatest_hits --branches=feature/love_me_tende
55
55
  ```
56
56
 
57
57
  #### Repository
58
- You have to specify the path (absolute or relative) to the GIT repository you want to work with. The path must be a folder initialized as a valid GIT repository (a check via *rev-parse* is performed), otherwise an error is raised:
58
+ You have to specify the absolute path to the GIT repository you want to work with. The path must be a folder initialized as a valid GIT repository (a check via *rev-parse* is performed), otherwise an error is raised:
59
59
 
60
60
  ```
61
61
  rebase --repo=invalid
@@ -79,7 +79,7 @@ Successfully loaded 3 branches:
79
79
  ```
80
80
 
81
81
  ##### Path to a names file
82
- Specify a path (absolute or relative) to a file containing the branches names on each line:
82
+ Specify an absolute path to a file containing the branches names on each line:
83
83
 
84
84
  File */Users/Elvis/greatest_hits/.branches*:
85
85
  ```
@@ -127,8 +127,7 @@ Successfully loaded 1 branch:
127
127
  In case no branches have been loaded, an error is raised:
128
128
 
129
129
  ```
130
- cd /Users/Elvis
131
- rebase --repo=./greatest_hits --branches=noent1, noent2
130
+ rebase --repo=/Users/Elvis/greatest_hits --branches=noent1,noent2
132
131
  No branches loaded!
133
132
  ```
134
133
 
@@ -88,7 +88,7 @@ module GitCommands
88
88
  private def rebase_with_master
89
89
  `git rebase origin/#{Branch::MASTER}`
90
90
  return true unless @repo.locked?
91
- `git rebase --abort`
91
+ @repo.unlock
92
92
  error("Got conflicts, aborting rebase!")
93
93
  end
94
94
 
@@ -21,6 +21,12 @@ module GitCommands
21
21
  end
22
22
  end
23
23
 
24
+ def unlock
25
+ Dir.chdir(@path) do
26
+ `git rebase --abort`
27
+ end
28
+ end
29
+
24
30
  private def valid?
25
31
  return false unless exists?
26
32
  work_tree?
@@ -1,3 +1,3 @@
1
1
  module GitCommands
2
- VERSION = "3.2.5"
2
+ VERSION = "3.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - costajob