Class: BetweenMeals::Repo::Git::Cmd
- Inherits:
-
Cmd
- Object
- Cmd
- BetweenMeals::Repo::Git::Cmd
show all
- Defined in:
- lib/between_meals/repo/git/cmd.rb
Instance Attribute Summary
Attributes inherited from Cmd
#bin
Instance Method Summary
collapse
Methods inherited from Cmd
#cmd, #initialize
Instance Method Details
#clone(url, repo_path) ⇒ Object
27
28
29
|
# File 'lib/between_meals/repo/git/cmd.rb', line 27
def clone(url, repo_path)
cmd("clone #{url} #{repo_path}", '/tmp')
end
|
#config(key) ⇒ Object
23
24
25
|
# File 'lib/between_meals/repo/git/cmd.rb', line 23
def config(key)
cmd("config #{key}")
end
|
#diff(start_ref, end_ref) ⇒ Object
31
32
33
|
# File 'lib/between_meals/repo/git/cmd.rb', line 31
def diff(start_ref, end_ref)
cmd("diff --name-status #{start_ref} #{end_ref}")
end
|
#merge_base(rev, master) ⇒ Object
39
40
41
|
# File 'lib/between_meals/repo/git/cmd.rb', line 39
def merge_base(rev, master)
cmd("merge-base #{rev} #{master}")
end
|
#pull ⇒ Object
35
36
37
|
# File 'lib/between_meals/repo/git/cmd.rb', line 35
def pull
cmd('pull --rebase')
end
|
#status ⇒ Object
43
44
45
|
# File 'lib/between_meals/repo/git/cmd.rb', line 43
def status
cmd('status --porcelain 2>&1')
end
|