def store_merge_state
      merge_head = `git rev-parse MERGE_HEAD 2> #{File::NULL}`.chomp

      # Store the merge state if we're in the middle of resolving a merge
      # conflict. This is necessary since stashing removes the merge state.
      if merge_head != 'MERGE_HEAD'
        @merge_head = merge_head
      end

      merge_msg_file = File.expand_path('MERGE_MSG', Overcommit::Utils.git_dir)
      @merge_msg = File.open(merge_msg_file).read if File.exist?(merge_msg_file)
    end
def store_merge_state
      merge_head = `git rev-parse MERGE_HEAD 2> #{File::NULL}`.chomp

      # Store the merge state if we're in the middle of resolving a merge
      # conflict. This is necessary since stashing removes the merge state.
      if merge_head != 'MERGE_HEAD'
        @merge_head = merge_head
      end

      merge_msg_file = File.expand_path('MERGE_MSG', Overcommit::Utils.git_dir)
      @merge_msg = File.open(merge_msg_file).read if File.exist?(merge_msg_file)
    end
Store any relevant files that are present when repo is in the middle of a
 merge.

 Restored via [#restore_merge_state].