From c33d1f0c6eb5bcdc13b6632ac93897caf770746a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20D=C3=B6rbandt?= Date: Thu, 23 May 2024 21:20:14 +0200 Subject: [PATCH] Fix fetching via ssh Before, the return value of fetchFrom: was used to checkout the default branch when cloning. Since dcc1389ccd91cab5ef6351cb1c2c571fb2f316c5, this is only needed for the internal implementation, so the return value is not needed for the general fetchFrom: anymore. This allows us to not return the refs when fetching externally, fixing fetching via ssh. --- .../instance/fetchAllExternalFrom..st | 7 +------ .../FileSystemGitRepository.class/instance/fetchFrom..st | 2 +- .../FileSystemGitRepository.class/methodProperties.json | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/fetchAllExternalFrom..st b/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/fetchAllExternalFrom..st index 4f110eda4..5fc5fa1f0 100644 --- a/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/fetchAllExternalFrom..st +++ b/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/fetchAllExternalFrom..st @@ -1,11 +1,6 @@ git porcelain - external fetchAllExternalFrom: aRemoteName - | remote url | - remote := self unitOfWork remoteNamed: aRemoteName. - remote ifNil: [(GitRemoteUndefined remote: remote) signal: 'No URL configured.']. self externalGitDo: ('fetch {1}{2}' format: { GitFeatureFlags pruneWhenFetching ifTrue: ['--prune '] ifFalse: ['']. aRemoteName}). - self refsChangedExternally. - url := remote url ifNil: [(GitRemoteUndefined remote: remote) signal: 'No URL configured.']. - ^ (GitAbstractProtocol url: url) refs \ No newline at end of file + self refsChangedExternally. \ No newline at end of file diff --git a/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/fetchFrom..st b/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/fetchFrom..st index 8e3c5dd23..6657228fb 100644 --- a/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/fetchFrom..st +++ b/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/fetchFrom..st @@ -1,6 +1,6 @@ git porcelain fetchFrom: aRemoteName - ^ GitFeatureFlags externalFetchAndPush + GitFeatureFlags externalFetchAndPush ifTrue: [self fetchAllExternalFrom: aRemoteName] ifFalse: [[self fetchInternalFrom: aRemoteName] on: ConnectionClosed diff --git a/src/FileSystem-Git.package/FileSystemGitRepository.class/methodProperties.json b/src/FileSystem-Git.package/FileSystemGitRepository.class/methodProperties.json index df92d7868..8f38c7699 100644 --- a/src/FileSystem-Git.package/FileSystemGitRepository.class/methodProperties.json +++ b/src/FileSystem-Git.package/FileSystemGitRepository.class/methodProperties.json @@ -17,8 +17,8 @@ "externalCommand:" : "mad 5/22/2024 13:55", "externalGitDo:" : "mad 5/22/2024 13:29", "externalPush:toRemote:force:" : "mad 5/18/2024 12:26", - "fetchAllExternalFrom:" : "mad 5/18/2024 11:48", - "fetchFrom:" : "mad 4/22/2024 17:34", + "fetchAllExternalFrom:" : "mad 5/23/2024 18:46", + "fetchFrom:" : "mad 5/23/2024 18:10", "fetchFromAll:" : "mad 4/22/2024 17:25", "fetchInternalFrom:" : "mad 4/22/2024 17:24", "filesystemOn:" : "CamilloBruni 8/30/2012 14:06",