mgit 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTg0NzVjMDFlNDEzNjNjZGE0ZjQ3ZGZhNGFlZjA0MDUxZGNlMDZmNw==
4
+ Nzc1OTY5YThjMGNhNWI3NGQyYjEwYzA4NGVlMDM1YjIyZTlhMWZiNg==
5
5
  data.tar.gz: !binary |-
6
- NGYxNWRlMjA4NTJiYjk5MTUwOWRkOThmYzEwMWFmMjNlYmQ3MDJmNQ==
6
+ ZjcyZjUwMjRlOWUzMDQ1YmU5YmJhMDU0ODVlZmRhYzZiYzUyMTJkNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjNlM2NiZjExMzQ5MzdjMWEzZTAxZDFmYmVmNDQ0YmQyZjk2ZjQ3ZmMyY2Yz
10
- ODYyYWQzZTM4OTk3NjhlMjUwZDZiYmJkNDg0MDIyMTc2ZWQ0OTQwNGFkMjE4
11
- ZjI3M2Y0YmJmNDU3OTg1NmJkYWYzY2VmYTQxZGNkMDkzODA4Yjg=
9
+ YmNjMzk1ZjI5Yjc1NTRhZDkxZGVkZGIzNmU5MTIxZDYzYjNkYzBiZDQzYjkx
10
+ YjUxYTI1MjBjMGViNjc5YTA1ZDcxMTVjN2M3YjEwOTkzZjlmNmRlOTBmYTdl
11
+ YzVhNGJhNDEzYzkzZWY2MGRhYTY2YTBkZDM1NGFmZThlMWYzNGQ=
12
12
  data.tar.gz: !binary |-
13
- ZTQyMGI2ZjNmZjY5ZDRlNzA3YTQxMzkwOWJmZmFjNjNmNGM2MDc5Y2RkNmZl
14
- ZGNmN2JkNmUyZTcyYjQ1YmJmMzI2YzA0MGY2NDIzMWZlNmVkYThkMTE2M2Rl
15
- ZWFlN2QyMzEzMmZiY2I0NmUzYWY3NjJhMDA2ODBjMGI3YjdmYTE=
13
+ MjNjYzkxNDY3NzQ3ZWNiMGU5ZDE3NjJjYzM1ZjUzMDFmOTU2ZDUxYjFmMjcx
14
+ ZjA1N2QxMTRiMTQzZTdjMDg3MDZmZGIwYjliNDc2MGU5ZTYzNTMwZGFhZGM4
15
+ MWY5NTI5MTYyYTQ4NzUzYWQ4OGYyOGUyMDhjZGY5NGQ5Nzg3OTQ=
@@ -26,7 +26,7 @@ module MGit
26
26
  end
27
27
 
28
28
  def description
29
- 'merge all upstream tracking branches that can be fast-forwarded'
29
+ 'merge all upstream tracking branches that can be fast-forwardeded'
30
30
  end
31
31
 
32
32
  register_command :ffmerge
@@ -32,6 +32,7 @@ module MGit
32
32
  flags << 'Index'.red if fs.include?(:index)
33
33
  flags << 'Dirty'.red if fs.include?(:dirty)
34
34
  flags << 'Untracked'.yellow if fs.include?(:untracked)
35
+ flags << 'Detached'.yellow if fs.include?(:detached)
35
36
 
36
37
  if fs.include?(:diverged)
37
38
  ds = repo.divergence
@@ -24,7 +24,11 @@ module MGit
24
24
  when '??'
25
25
  flags << :untracked
26
26
  when '##'
27
- flags << :diverged
27
+ if /## ([\w,\/]+)\.\.\.([\w,\/]+) \[(\w+) (\d+)\]/ =~ s
28
+ flags << :diverged
29
+ elsif /## HEAD \(no branch\)/ =~ s
30
+ flags << :detached
31
+ end
28
32
  end
29
33
  end
30
34
  flags
@@ -48,9 +52,12 @@ module MGit
48
52
 
49
53
  private
50
54
 
55
+ def status
56
+ @status ||= `git status --short --branch --ignore-submodules`.split("\n")
57
+ end
58
+
51
59
  def status_lines
52
60
  Dir.chdir(path) do
53
- status = `git status --short --branch --ignore-submodules`.split("\n")
54
61
  status.each do |s|
55
62
  yield s
56
63
  end
@@ -1,3 +1,3 @@
1
1
  module MGit
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mgit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - FlavourSys Technology GmbH