Skip to content

Commit

Permalink
do a fetch --all after adding the remotes; after a fresh clone, the -…
Browse files Browse the repository at this point in the history
…B option to git checkout needs to be used, otherwise use the more standard -b option
  • Loading branch information
dalehenrich committed Sep 30, 2023
1 parent b138621 commit 733a537
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -48,4 +51,8 @@ cloneOrUpdateProject: projectName remoteName: remoteName in: gitRootPath pull: p
self
gitAddRemoteIn: gitProjectRef fullName
remote: theRemote
gitUrl: (gitUrls at: theRemote) ] ]
gitUrl: (gitUrls at: theRemote) ].
Transcript
cr;
show: ' Fetch --all '.
gitTool gitfetchIn: gitProjectRef with: ' --all' ]

0 comments on commit 733a537

Please sign in to comment.