Sha256: 2d8a70ad6930cbb5593a62a79a1cc4c4c1fdc77e378b34acfd7528d62b800a4f

Contents?: true

Size: 305 Bytes

Versions: 2

Compression:

Stored size: 305 Bytes

Contents

module Aid
  module GitStaged
    def check_for_staged_files!
      file_change_status_codes = "^\s*[MADRCU]"
      return unless system("git status -s | grep #{file_change_status_codes.inspect} >/dev/null 2>&1")

      abort colorize(:red, "You have modified/staged files, cannot aid")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
abtion-aid-0.3.2 lib/aid/scripts/shared/git_staged.rb
abtion-aid-0.3.1 lib/aid/scripts/shared/git_staged.rb