lgit 0.5.0 → 0.5.1
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/exe/lgit +2 -3
- data/lib/lgit/version.rb +1 -1
- data/lib/lgit.rb +6 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d930bd4c761f1bfb030903aa641b8a3acb0686cd95503363445e0f6de464d50
|
4
|
+
data.tar.gz: 98227fefbc3a5e6b665628452cbec23d4401d5c43a961c06fe7d98d578fc52b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6c229fa6e2a027bb8ed01da054fd5708886e55845fe2fa71938805c3875e8236b0b4591cf886a69431506d57c33f7839d812b9523a485520f3f8f0dc1c31878
|
7
|
+
data.tar.gz: 96d12cc805d7bdda5bda6faf5ae0eaf39c8a59c30df03e17038cc0ed1e455eded9cd86607d8bd3243ae90fdea250564af5407c3f4b1a4fa42139e365464889ed
|
data/exe/lgit
CHANGED
@@ -14,9 +14,8 @@ case ARGV[0]
|
|
14
14
|
when 'branch'
|
15
15
|
git.create_branch(ARGV[1], ARGV[2])
|
16
16
|
when 'rebase'
|
17
|
-
|
18
|
-
|
19
|
-
puts "Error: Cannot rebase #{default_branch}!"
|
17
|
+
if git.get_branch == git.get_default_branch
|
18
|
+
puts "Error: Cannot rebase #{git.get_default_branch}!"
|
20
19
|
exit 2
|
21
20
|
end
|
22
21
|
git.rebase ARGV[1]
|
data/lib/lgit/version.rb
CHANGED
data/lib/lgit.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'lgit/version'
|
2
|
+
require 'open3'
|
2
3
|
|
3
4
|
module Lgit
|
4
5
|
###
|
@@ -16,8 +17,11 @@ module Lgit
|
|
16
17
|
end
|
17
18
|
|
18
19
|
def get_default_branch
|
19
|
-
|
20
|
-
|
20
|
+
stdout, _, status = Open3.capture3("git symbolic-ref refs/remotes/origin/HEAD")
|
21
|
+
|
22
|
+
return `git config init.defaultBranch`.strip if status != 0
|
23
|
+
|
24
|
+
stdout.strip[20..-1]
|
21
25
|
end
|
22
26
|
|
23
27
|
def create_branch(name, base)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lgit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Luladjiev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
rubygems_version: 3.1
|
97
|
+
rubygems_version: 3.0.3.1
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Git on steroids
|