File tree 1 file changed +6
-6
lines changed
lib/overcommit/hook_context
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,12 @@ def modified_lines_in_file(file)
126
126
@modified_lines [ file ]
127
127
end
128
128
129
+ # Returns whether the current git branch is empty (has no commits).
130
+ def initial_commit?
131
+ return @initial_commit unless @initial_commit . nil?
132
+ @initial_commit = Overcommit ::GitRepo . initial_commit?
133
+ end
134
+
129
135
private
130
136
131
137
# Clears the working tree so that the stash can be applied.
@@ -170,12 +176,6 @@ def any_changes?
170
176
modified_files . any?
171
177
end
172
178
173
- # Returns whether the current git branch is empty (has no commits).
174
- def initial_commit?
175
- return @initial_commit unless @initial_commit . nil?
176
- @initial_commit = Overcommit ::GitRepo . initial_commit?
177
- end
178
-
179
179
# Stores the modification times for all modified files to make it appear like
180
180
# they never changed.
181
181
#
You can’t perform that action at this time.
0 commit comments