Module: GGSM::Stash

Included in:
Delete, Foreach, Start, Switch
Defined in:
lib/ggsm/util/stash.rb

Instance Method Summary collapse

Instance Method Details

#stash_pop(arry_conflict, module_name) ⇒ Object



13
14
15
16
17
18
# File 'lib/ggsm/util/stash.rb', line 13

def stash_pop(arry_conflict, module_name)
  stash_pop = `git stash pop | grep 'CONFLICT'`
  if stash_pop.strip != ''
    arry_conflict.push(module_name)
  end
end

#try_stashObject



3
4
5
6
7
8
9
10
11
# File 'lib/ggsm/util/stash.rb', line 3

def try_stash
  status = `git status --ignore-submodules | grep 'nothing to commit'`
  need_stash = false
  if status.strip == ''
    need_stash = true
    `git stash`
  end
  need_stash
end