gtoolkit icon indicating copy to clipboard operation
gtoolkit copied to clipboard

The Iceberg git CLI implementation uses the wrong kind of IceRemote objects

Open svenvc opened this issue 1 year ago • 1 comments

The Iceberg git CLI implementation uses the wrong kind of IceRemote objects and it should probably use its own variant.

In particular, IceGitCliRepository>>#remotes returns (sub) instances of IceGitRemote but there are methods on that class (IceGitRemote>>#remoteBranchNamed:ifPresent:ifAbsent: and IceGitRemote>>#doFetchWithRefSpec:) that assume the Libgit2 FFI implementation.

The problem is that we can't simply subclass and override those methods since there is a hierarchy under IceGitRemote. It looks as of the subclasses mostly deal with parsing different URLs into parts, but do not implement much real behaviour.

Another problem is that IceGitRemote is referred to as a factory in many places (the key subclass creation/dispatch method being IceGitRemote class>>#url:).

svenvc avatar Sep 26 '24 08:09 svenvc

Related to https://github.com/feenkcom/gtoolkit/issues/3962

svenvc avatar Sep 26 '24 08:09 svenvc