Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove wrongly advertised support for notabug.com, make fetch_gitea_snapshots less expensive and fix fetchFromGitea's fallback behaviour to fetchgit #244

Merged
merged 3 commits into from
Apr 20, 2024

Conversation

emilylange
Copy link
Contributor

Please refer to the commit messages for details.

Note: fetchFromGitLab has the same fetchgit fallback behavior and as such it is also affected by the same issue.

Gogs isn't Gitea.
The API surface of Gogs is different from Gitea's.

Additionally, notabug.com uses a multiple years old version of Gogs,
which has neither `/tags` nor `/commits` implemented.

The implementation we use in `version/gitea.py` simple does not work.

You can check this yourself by running `nix-update libgtkflow4`, one of
the few packages in nixpkgs that are hosted on notabug.com
`fetchFromGitea` just re-uses `fetchFromGitHub`.
The only difference is making `domain` a required attribute instead of
defaulting to `"github.com"`.

As such, it falls back to `fetchgit`, such like `fetchFromGitHub`, if
any of the following is true:

 - fetchSubmodules
 - leaveDotGit
 - deepClose
 - sparseCheckout != []
 - forceFetchGit

When falling back to `fetchgit`, the `src.url` will end with `".git"`,
which we then need to strip again from our parsed `repo` variable.

`fetchFromGitHub` has the same logic to trim `".git"` unconditionally.
@Mic92
Copy link
Owner

Mic92 commented Apr 20, 2024

@mergify queue

Copy link
Contributor

mergify bot commented Apr 20, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at fb5c71b

@mergify mergify bot merged commit fb5c71b into Mic92:master Apr 20, 2024
4 checks passed
@emilylange emilylange deleted the gitea-improvements branch April 20, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants