25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/routes/git_stash.rb', line 25
def show_all_stashes
no_stash_found_count = 0
@git.repo_loop.each do |repo_dir|
stashes = `cd #{repo_dir} && git stash list`
stashes = stashes.split("\n")
if stashes.any?
App::Terminal::info("Showing stashes for: #{App::Terminal::format_directory(@git.get_repo_shorthand(repo_dir))}")
stashes.each do |stash|
stash_name = stash.split(/:/).first
output = App::Terminal::command_capture("git stash show --name-only #{stash_name}", repo_dir, false)
App::Terminal::info("#{stash}", output[0], false)
end
else
App::Terminal::info("No stashes found in: #{App::Terminal::format_directory(@git.get_repo_shorthand(repo_dir))}", nil, (no_stash_found_count > 0) ? false : true)
no_stash_found_count = no_stash_found_count + 1
end
end
end
|