Module: Mate::Git

Defined in:
lib/mate/git.rb

Class Method Summary collapse

Class Method Details

.excludesfile(workind_dir) ⇒ Object



4
5
6
# File 'lib/mate/git.rb', line 4

def excludesfile(workind_dir)
  expand_path IO.popen(%W[git -C #{workind_dir} config --get core.excludesfile], &:read)
end

.git_dir(workind_dir) ⇒ Object



16
17
18
# File 'lib/mate/git.rb', line 16

def git_dir(workind_dir)
  expand_path IO.popen(%W[git -C #{workind_dir} rev-parse --absolute-git-dir], err: '/dev/null', &:read)
end

.global_tmignoreObject



8
9
10
# File 'lib/mate/git.rb', line 8

def global_tmignore
  expand_path '~/.tmignore'
end

.toplevel(workind_dir) ⇒ Object



12
13
14
# File 'lib/mate/git.rb', line 12

def toplevel(workind_dir)
  expand_path IO.popen(%W[git -C #{workind_dir} rev-parse --show-toplevel], err: '/dev/null', &:read)
end