Class: Gitodo::GitService
- Inherits:
-
Slayer::Service
- Object
- Slayer::Service
- Gitodo::GitService
- Defined in:
- lib/gitodo/services/git_service.rb
Class Method Summary collapse
Class Method Details
.current_branch ⇒ Object
8 9 10 |
# File 'lib/gitodo/services/git_service.rb', line 8 def self.current_branch branch = `git branch | grep \\* | cut -d ' ' -f2`.strip end |
.git_repo_root ⇒ Object
12 13 14 |
# File 'lib/gitodo/services/git_service.rb', line 12 def self.git_repo_root `git rev-parse --show-toplevel`.strip end |
.is_git_repo ⇒ Object
4 5 6 |
# File 'lib/gitodo/services/git_service.rb', line 4 def self.is_git_repo `git rev-parse --is-inside-work-tree`.strip == "true" end |