From 733a537d471f34d82351d789dce9f5083641b624 Mon Sep 17 00:00:00 2001 From: Dale Henrichs Date: Sat, 30 Sep 2023 15:58:51 -0700 Subject: [PATCH] do a fetch --all after adding the remotes; after a fresh clone, the -B option to git checkout needs to be used, otherwise use the more standard -b option --- .../cloneOrUpdateProject.remoteName.in.pull..st | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/GsDevKit_stones-Core.package/GDKProjectSet.class/instance/cloneOrUpdateProject.remoteName.in.pull..st b/src/GsDevKit_stones-Core.package/GDKProjectSet.class/instance/cloneOrUpdateProject.remoteName.in.pull..st index 0c34c7a8..bcaace40 100644 --- a/src/GsDevKit_stones-Core.package/GDKProjectSet.class/instance/cloneOrUpdateProject.remoteName.in.pull..st +++ b/src/GsDevKit_stones-Core.package/GDKProjectSet.class/instance/cloneOrUpdateProject.remoteName.in.pull..st @@ -28,15 +28,18 @@ cloneOrUpdateProject: projectName remoteName: remoteName in: gitRootPath pull: p Transcript cr; show: ' Set ' , projectName , ' revision to ' , revision. - gitTool - gitcheckoutIn: gitProjectRef - with: ' -B ' , remoteName , '/' , revision. + cloned + ifTrue: [ gitTool gitcheckoutIn: gitProjectRef with: ' -B ' , remoteName , '/' , revision ] + ifFalse: [ + gitTool + gitcheckoutIn: gitProjectRef + with: ' -b ' , revision , ' ' , remoteName , '/' , revision ]. pull ifTrue: [ Transcript cr; show: - ' Pull ' , projectName , ' revision ' , revision , ' from remote ' , origin. + ' Pull ' , projectName , ' revision ' , revision , ' from remote ' , remoteName. gitTool gitpullIn: gitProjectRef fullName remote: remoteName @@ -48,4 +51,8 @@ cloneOrUpdateProject: projectName remoteName: remoteName in: gitRootPath pull: p self gitAddRemoteIn: gitProjectRef fullName remote: theRemote - gitUrl: (gitUrls at: theRemote) ] ] \ No newline at end of file + gitUrl: (gitUrls at: theRemote) ]. + Transcript + cr; + show: ' Fetch --all '. + gitTool gitfetchIn: gitProjectRef with: ' --all' ] \ No newline at end of file