Set work-dir to cached repository
source-repositories does a git reset on the .git directory of cached repositories. But doesn't specify the directory to reset. A working directory needs to be specified so that the $PWD isn't used. Without this change $PWD is polluted with the contents of repositories being cached. Change-Id: Ic37b702ac579bf766bb2204a988fa9468d308abf
This commit is contained in:
parent
7e408271a7
commit
51216dbd2d
@ -55,7 +55,7 @@ function get_repos_for_element(){
|
||||
mv ${CACHE_PATH}{.tmp,}
|
||||
elif [ -z "$DIB_OFFLINE" ] ; then
|
||||
git --git-dir=$CACHE_PATH/.git fetch
|
||||
git --git-dir=$CACHE_PATH/.git reset --hard origin/master
|
||||
git --git-dir=$CACHE_PATH/.git --work-tree=$CACHE_PATH reset --hard origin/master
|
||||
fi
|
||||
sudo git clone $CACHE_PATH $REPO_DIRECTORY
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user