More refactoring
This commit is contained in:
parent
d933f690d4
commit
5f8af000ee
1 changed files with 11 additions and 8 deletions
|
@ -61,18 +61,21 @@ class FormatStaged
|
|||
end
|
||||
|
||||
replace_file_in_index file, new_hash
|
||||
|
||||
if update
|
||||
begin
|
||||
patch_working_file file, new_hash
|
||||
rescue StandardError => e
|
||||
warning "failed updating #{file.src_path} in working copy: #{e}"
|
||||
end
|
||||
end
|
||||
update_working_copy file, new_hash
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
def update_working_copy(file, new_hash)
|
||||
return unless update
|
||||
|
||||
begin
|
||||
patch_working_file file, new_hash
|
||||
rescue StandardError => e
|
||||
warning "failed updating #{file.src_path} in working copy: #{e}"
|
||||
end
|
||||
end
|
||||
|
||||
def format_object(file)
|
||||
info "Formatting #{file.src_path}"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue