perform a git add when doing a homesick track

This commit is contained in:
Jason Buckner
2012-11-24 23:56:12 -08:00
committed by thilko
parent 123e6cf82d
commit 3bc623be7c
2 changed files with 9 additions and 0 deletions

View File

@@ -125,6 +125,10 @@ class Homesick < Thor
home_path = home_dir + file
ln_s absolute_path, home_path
end
inside castle_path do
git_add absolute_path
end
end
desc "list", "List cloned castles"

View File

@@ -70,6 +70,11 @@ class Homesick
system "git commit -v -a" unless options[:pretend]
end
def git_add(file, config = {})
say_status 'git add file', '', :green unless options[:quiet]
system "git add #{file}" unless options[:pretend]
end
def mv(source, destination, config = {})
source = Pathname.new(source)
destination = Pathname.new(destination + source.basename)