Fixed issue where template working trees would not be updated upon git pull

This commit is contained in:
Jamon Holmgren
2013-09-04 08:59:25 -07:00
committed by Watson
parent f94b7ed243
commit 49145183ea

View File

@@ -1,15 +1,15 @@
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -152,7 +152,7 @@ module Motion; module Project
if File.exist?(path)
# directory exists just do a pull
App.log 'Template', "#{@name} already exists, performing a pull"
system("GIT_DIR=#{path}/.git git pull origin master")
system("git --work-tree=#{path} --git-dir=#{path}/.git pull origin master")
else
# no directory exists so clone
result = system("git clone #{@url} #{path}")