Open jordanmontt opened 1 year ago
Hi @jordanmontt are you sure this is an iceberg issue or a metacello issue?
Iceberg does pretty well at downloading the default branch of a repository when you use its UI.
This is a problem of Metacello, Metacello is taking the default as master. Changing the metacello-iceberg integration to honor the default branch is a bad option because:
The only solution I see is to make the commitish name (branch, tag or commitID) not optional, as the default. But this will break all compatibility with existing baselines ðŸ˜
Do you have any idea?
Thanks Guille and Pablo for your responses,
For the idea of how to do it, I don't know.
Should I leave this issue open?
I agree this is responsibility of Metacello.
However I let this information here: At the low-level, I've found a LibGit function to obtain the default branch of a remote. This is a recent PR to add it in our FFI bindings: https://github.com/pharo-vcs/libgit2-pharo-bindings/pull/71
If you load a baseline like this:
You will have an exception saying that brach master does not exist. Which is correct, since some years ago GitHub now uses
main
as default branch and not master. Iceberg should support both options