overcommit 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c50bccbcc41b00a198c3204913170541cf86221
4
- data.tar.gz: 98934cdbb33a1b9b9fd86a1cacdd440cbc91086a
3
+ metadata.gz: 2aebb6ab71945c02062f371523a8eea70e426379
4
+ data.tar.gz: d767537a9df14218b77ca816f7052e5919d4edae
5
5
  SHA512:
6
- metadata.gz: 4ee6a86eb6075f5a5eb966edd92de95084c32c53ec9ad87c8fe5c90fb20782195fd64f1fa58a77b9142cf66c12412863f607b68912e670720918878fc3d4e182
7
- data.tar.gz: 234dccc7f9ca2a0a8b02a2594b93a6a3fa5bcb2a082152f91150d4a0382c294e474692e4a257ae1617f211464885da5bde0071a0326e7783a4ce1b7978b48087
6
+ metadata.gz: f167631135213cc30d439e469b3d53a40a48aa9c67d845062ff34884db8306764a9c15d54a326e27211124dc7a579ef31567ce03e5d38aaafc284e81de61a69f
7
+ data.tar.gz: 03a5d3bd2062ba1c1757383559dab5b1052ceb34793d299aa11f7d91723dc182cda515ca48e999662e3779dd15a16d82c4f70bf435150f091d224158c06df6a0
@@ -12,6 +12,7 @@ module Overcommit::HookContext
12
12
  def setup_environment
13
13
  store_modified_times
14
14
  store_merge_state
15
+ store_cherry_pick_state
15
16
 
16
17
  if any_changes?
17
18
  @changes_stashed = true
@@ -34,6 +35,7 @@ module Overcommit::HookContext
34
35
  end
35
36
 
36
37
  restore_merge_state
38
+ restore_cherry_pick_state
37
39
  restore_modified_times
38
40
  end
39
41
 
@@ -99,6 +101,16 @@ module Overcommit::HookContext
99
101
  end
100
102
  end
101
103
 
104
+ def store_cherry_pick_state
105
+ cherry_head = `git rev-parse CHERRY_PICK_HEAD 2> /dev/null`.chomp
106
+
107
+ # Store the merge state if we're in the middle of resolving a merge
108
+ # conflict. This is necessary since stashing removes the merge state.
109
+ if cherry_head != 'CHERRY_PICK_HEAD'
110
+ @cherry_head = cherry_head
111
+ end
112
+ end
113
+
102
114
  def restore_merge_state
103
115
  if @merge_head
104
116
  FileUtils.touch(File.expand_path('.git/MERGE_MODE', Overcommit::Utils.repo_root))
@@ -117,6 +129,16 @@ module Overcommit::HookContext
117
129
  end
118
130
  end
119
131
 
132
+ def restore_cherry_pick_state
133
+ if @cherry_head
134
+ File.open(File.expand_path('.git/CHERRY_PICK_HEAD',
135
+ Overcommit::Utils.repo_root), 'w') do |f|
136
+ f.write("#{@cherry_head}\n")
137
+ end
138
+ @cherry_head = nil
139
+ end
140
+ end
141
+
120
142
  def store_modified_times
121
143
  @modified_times = {}
122
144
 
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  module Overcommit
3
- VERSION = '0.11.0'
3
+ VERSION = '0.11.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overcommit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Causes Engineering
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-21 00:00:00.000000000 Z
12
+ date: 2014-06-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: childprocess
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: 0.5.1
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.5.1
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: json
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.8'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.8'
42
42
  - !ruby/object:Gem::Dependency
@@ -57,14 +57,14 @@ dependencies:
57
57
  name: image_optim
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ~>
61
61
  - !ruby/object:Gem::Version
62
62
  version: 0.13.0
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: 0.13.0
70
70
  description: Utility to install, configure, and extend Git hooks
@@ -80,69 +80,69 @@ files:
80
80
  - config/default.yml
81
81
  - config/templates.yml
82
82
  - lib/overcommit.rb
83
- - lib/overcommit/cli.rb
84
- - lib/overcommit/configuration.rb
85
- - lib/overcommit/configuration_loader.rb
83
+ - lib/overcommit/version.rb
84
+ - lib/overcommit/hook_context.rb
86
85
  - lib/overcommit/constants.rb
87
- - lib/overcommit/exceptions.rb
88
- - lib/overcommit/hook/base.rb
89
- - lib/overcommit/hook/commit_msg/base.rb
86
+ - lib/overcommit/utils.rb
87
+ - lib/overcommit/hook_runner.rb
88
+ - lib/overcommit/user_input.rb
89
+ - lib/overcommit/subprocess.rb
90
+ - lib/overcommit/hook/commit_msg/trailing_period.rb
90
91
  - lib/overcommit/hook/commit_msg/gerrit_change_id.rb
91
- - lib/overcommit/hook/commit_msg/hard_tabs.rb
92
- - lib/overcommit/hook/commit_msg/russian_novel.rb
93
92
  - lib/overcommit/hook/commit_msg/single_line_subject.rb
93
+ - lib/overcommit/hook/commit_msg/russian_novel.rb
94
+ - lib/overcommit/hook/commit_msg/hard_tabs.rb
94
95
  - lib/overcommit/hook/commit_msg/text_width.rb
95
- - lib/overcommit/hook/commit_msg/trailing_period.rb
96
- - lib/overcommit/hook/post_checkout/base.rb
96
+ - lib/overcommit/hook/commit_msg/base.rb
97
97
  - lib/overcommit/hook/post_checkout/bundle_check.rb
98
98
  - lib/overcommit/hook/post_checkout/index_tags.rb
99
+ - lib/overcommit/hook/post_checkout/base.rb
100
+ - lib/overcommit/hook/base.rb
99
101
  - lib/overcommit/hook/pre_commit/author_email.rb
100
- - lib/overcommit/hook/pre_commit/author_name.rb
101
- - lib/overcommit/hook/pre_commit/base.rb
102
- - lib/overcommit/hook/pre_commit/berksfile_check.rb
103
- - lib/overcommit/hook/pre_commit/brakeman.rb
104
- - lib/overcommit/hook/pre_commit/bundle_check.rb
105
- - lib/overcommit/hook/pre_commit/chamber_security.rb
106
- - lib/overcommit/hook/pre_commit/coffee_lint.rb
107
- - lib/overcommit/hook/pre_commit/css_lint.rb
108
- - lib/overcommit/hook/pre_commit/haml_lint.rb
109
- - lib/overcommit/hook/pre_commit/hard_tabs.rb
102
+ - lib/overcommit/hook/pre_commit/pry_binding.rb
110
103
  - lib/overcommit/hook/pre_commit/image_optim.rb
111
- - lib/overcommit/hook/pre_commit/js_hint.rb
112
- - lib/overcommit/hook/pre_commit/jscs.rb
113
- - lib/overcommit/hook/pre_commit/json_syntax.rb
104
+ - lib/overcommit/hook/pre_commit/css_lint.rb
114
105
  - lib/overcommit/hook/pre_commit/jsx_hint.rb
115
106
  - lib/overcommit/hook/pre_commit/local_paths_in_gemfile.rb
116
- - lib/overcommit/hook/pre_commit/merge_conflicts.rb
117
- - lib/overcommit/hook/pre_commit/pry_binding.rb
118
- - lib/overcommit/hook/pre_commit/python_flake8.rb
107
+ - lib/overcommit/hook/pre_commit/travis_lint.rb
108
+ - lib/overcommit/hook/pre_commit/bundle_check.rb
109
+ - lib/overcommit/hook/pre_commit/yaml_syntax.rb
119
110
  - lib/overcommit/hook/pre_commit/rails_schema_up_to_date.rb
111
+ - lib/overcommit/hook/pre_commit/berksfile_check.rb
112
+ - lib/overcommit/hook/pre_commit/merge_conflicts.rb
113
+ - lib/overcommit/hook/pre_commit/trailing_whitespace.rb
114
+ - lib/overcommit/hook/pre_commit/author_name.rb
120
115
  - lib/overcommit/hook/pre_commit/rubocop.rb
116
+ - lib/overcommit/hook/pre_commit/python_flake8.rb
117
+ - lib/overcommit/hook/pre_commit/js_hint.rb
118
+ - lib/overcommit/hook/pre_commit/chamber_security.rb
119
+ - lib/overcommit/hook/pre_commit/hard_tabs.rb
120
+ - lib/overcommit/hook/pre_commit/haml_lint.rb
121
+ - lib/overcommit/hook/pre_commit/coffee_lint.rb
122
+ - lib/overcommit/hook/pre_commit/brakeman.rb
123
+ - lib/overcommit/hook/pre_commit/jscs.rb
121
124
  - lib/overcommit/hook/pre_commit/scss_lint.rb
122
- - lib/overcommit/hook/pre_commit/trailing_whitespace.rb
123
- - lib/overcommit/hook/pre_commit/travis_lint.rb
124
- - lib/overcommit/hook/pre_commit/yaml_syntax.rb
125
- - lib/overcommit/hook_context.rb
126
- - lib/overcommit/hook_context/base.rb
125
+ - lib/overcommit/hook/pre_commit/base.rb
126
+ - lib/overcommit/hook/pre_commit/json_syntax.rb
127
+ - lib/overcommit/hook_signer.rb
128
+ - lib/overcommit/hook_context/pre_commit.rb
127
129
  - lib/overcommit/hook_context/commit_msg.rb
130
+ - lib/overcommit/hook_context/base.rb
128
131
  - lib/overcommit/hook_context/post_checkout.rb
129
- - lib/overcommit/hook_context/pre_commit.rb
130
- - lib/overcommit/hook_loader/base.rb
132
+ - lib/overcommit/installer.rb
133
+ - lib/overcommit/configuration_loader.rb
131
134
  - lib/overcommit/hook_loader/built_in_hook_loader.rb
132
135
  - lib/overcommit/hook_loader/plugin_hook_loader.rb
133
- - lib/overcommit/hook_runner.rb
134
- - lib/overcommit/hook_signer.rb
135
- - lib/overcommit/installer.rb
136
+ - lib/overcommit/hook_loader/base.rb
137
+ - lib/overcommit/exceptions.rb
138
+ - lib/overcommit/configuration.rb
136
139
  - lib/overcommit/logger.rb
137
- - lib/overcommit/subprocess.rb
138
- - lib/overcommit/user_input.rb
139
- - lib/overcommit/utils.rb
140
- - lib/overcommit/version.rb
141
- - libexec/gerrit-change-id
140
+ - lib/overcommit/cli.rb
142
141
  - libexec/index-tags
142
+ - libexec/gerrit-change-id
143
143
  - template-dir/hooks/commit-msg
144
- - template-dir/hooks/overcommit-hook
145
144
  - template-dir/hooks/post-checkout
145
+ - template-dir/hooks/overcommit-hook
146
146
  - template-dir/hooks/pre-commit
147
147
  homepage: https://github.com/causes/overcommit
148
148
  licenses:
@@ -155,17 +155,17 @@ require_paths:
155
155
  - lib
156
156
  required_ruby_version: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - ">="
158
+ - - '>='
159
159
  - !ruby/object:Gem::Version
160
160
  version: 1.8.7
161
161
  required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ">="
163
+ - - '>='
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
167
  rubyforge_project:
168
- rubygems_version: 2.2.0
168
+ rubygems_version: 2.0.14
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: Git hook manager