def modified_files
      unless @modified_files
        currently_staged = Overcommit::GitRepo.modified_files(staged: true)
        @modified_files = currently_staged

        # Include files modified in last commit if amending
        if amendment?
          subcmd = 'show --format=%n'
          previously_modified = Overcommit::GitRepo.modified_files(subcmd: subcmd)
          @modified_files |= filter_modified_files(previously_modified)
        end
      end
      @modified_files
    end
def modified_files
      unless @modified_files
        currently_staged = Overcommit::GitRepo.modified_files(staged: true)
        @modified_files = currently_staged

        # Include files modified in last commit if amending
        if amendment?
          subcmd = 'show --format=%n'
          previously_modified = Overcommit::GitRepo.modified_files(subcmd: subcmd)
          @modified_files |= filter_modified_files(previously_modified)
        end
      end
      @modified_files
    end
Get a list of added, copied, or modified files that have been staged.
 Renames and deletions are ignored, since there should be nothing to check.