module Fgit::Common
Private Instance Methods
cp_command(branch, file_name)
click to toggle source
# File lib/fgit/common.rb, line 19 def cp_command(branch, file_name) cp_commands = [] cp_commands << ls_command(branch, file_name) cp_commands << "xargs git checkout #{branch}" cp_commands.join("|") end
local_changes()
click to toggle source
# File lib/fgit/common.rb, line 5 def local_changes status = `git status -s` return nil if status.empty? status end
ls_command(branch, file_name)
click to toggle source
# File lib/fgit/common.rb, line 12 def ls_command(branch, file_name) ls_commands = [] ls_commands << "git ls-tree -r --name-only #{branch}" ls_commands << "grep -E '^(.*/)*#{file_name}$'" ls_commands.join("|") end