Module: AgileCheckIn::Git
- Defined in:
- lib/agile_check_in/git.rb
Class Method Summary collapse
Class Method Details
.current_branch ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/agile_check_in/git.rb', line 3 def self.current_branch `git branch --no-color 2> /dev/null`.split("\n") .select{ |branch| branch.match(/\* /) } .first .split("* ") .last end |
.has_local_changes? ⇒ Boolean
15 16 17 |
# File 'lib/agile_check_in/git.rb', line 15 def self.has_local_changes? !`git status`.match(/working directory clean/) end |
.local_commits ⇒ Object
11 12 13 |
# File 'lib/agile_check_in/git.rb', line 11 def self.local_commits `git log origin/#{current_branch}..HEAD` end |