gitcycle 0.2.23 → 0.2.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/gitcycle.gemspec +1 -1
  2. data/lib/gitcycle.rb +11 -4
  3. metadata +2 -2
@@ -6,7 +6,7 @@ $:.unshift lib unless $:.include?(lib)
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "gitcycle"
9
- s.version = '0.2.23'
9
+ s.version = '0.2.24'
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.authors = [ 'Winton Welsh' ]
12
12
  s.email = [ 'mail@wintoni.us' ]
@@ -187,6 +187,7 @@ class Gitcycle
187
187
 
188
188
  def commit(*args)
189
189
  msg = nil
190
+ no_add = args.delete("--no-add")
190
191
 
191
192
  if args.empty?
192
193
  require_git && require_config
@@ -205,13 +206,19 @@ class Gitcycle
205
206
  end
206
207
  end
207
208
 
208
- cmd = "git add . && git add . -u && git commit -a"
209
+ if no_add
210
+ cmd = "git commit"
211
+ else
212
+ cmd = "git add . && git add . -u && git commit -a"
213
+ end
209
214
 
210
- if msg
211
- run(cmd + "m #{msg.dump}")
215
+ if File.exists?("#{Dir.pwd}/.git/MERGE_HEAD")
216
+ Kernel.exec(cmd)
217
+ elsif msg
218
+ run(cmd + " -m #{msg.dump}")
212
219
  Kernel.exec("git commit --amend")
213
220
  elsif args.empty?
214
- run(cmd)
221
+ Kernel.exec(cmd)
215
222
  else
216
223
  exec_git(:commit, args)
217
224
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitcycle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.23
4
+ version: 0.2.24
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-02 00:00:00.000000000 Z
12
+ date: 2012-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber