Don't always specify --branch for cloning as it borks gits default choice logic #122

Closed
opened 2021-03-22 22:34:36 +00:00 by decentral1se · 2 comments
Owner

36dd6b5eff/abra (L441)

I think a lot of the issues we're seeing are in the --branch option?

For example, if the app repo is on the main branch but you don't pass -b main then it defaults to master and then --branch master is passed. But if we dropped --branch ... it could probably make the right choice.

Sooo, we should probably change this to be "if we see -b foo then pass --branch fo otherwise don't pass --branch <default> at all and let git figure it out".

https://git.autonomic.zone/coop-cloud/abra/src/commit/36dd6b5effa734f4ff77ccad3716fa25b7995d0a/abra#L441 I think a lot of the issues we're seeing are in the `--branch` option? For example, if the app repo is on the `main` branch but you don't pass `-b main` then it defaults to `master` and then `--branch master` is passed. But if we dropped `--branch ...` it could probably make the right choice. Sooo, we should probably change this to be "if we see `-b foo` then pass `--branch fo` otherwise don't pass `--branch <default>` at all and let git figure it out".
decentral1se added this to the Beta release milestone 2021-03-22 22:34:36 +00:00
decentral1se added the
bug
label 2021-03-22 22:34:36 +00:00
decentral1se changed title from Don't specify --branch for cloning as it borks gits default choice logic to Don't always specify --branch for cloning as it borks gits default choice logic 2021-03-22 22:34:47 +00:00
Author
Owner

This is a "bug" in Git which Gitea has no work-around for: https://github.com/go-gitea/gitea/issues/7601. They didn't fix it and apparently Github has a work-around for this. git clone https://github.com/Autonomic-Cooperative/abra.git does pick up the default main branch. So, I think the fix is to rollback all our branches to master 🙄.

This is a "bug" in Git which Gitea has no work-around for: https://github.com/go-gitea/gitea/issues/7601. They didn't fix it and apparently Github has a work-around for this. `git clone https://github.com/Autonomic-Cooperative/abra.git` does pick up the default `main` branch. So, I think the fix is to rollback all our branches to `master` 🙄.
Author
Owner

Ah fuck that, I'll work some hack into the logic to stay on main when we need it. Otherwise, it is an endless amount of busy work switching the branches and the Drone CI configs too!

Ah fuck that, I'll work some hack into the logic to stay on `main` when we need it. Otherwise, it is an endless amount of busy work switching the branches and the Drone CI configs too!
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/abra#122
No description provided.