Bug - Fixed Git projects outside of github are not named correctly

Irrat

Member
I was playing with third party hosting for some git stuff and was confused on why my script was being called null-release in the git information.

Code:
 > git checkout [Private Git Repo] release
Starting
remote: Enumerating objects
remote: Counting objects
remote: Compressing objects
Receiving objects
Resolving deltas
Updating references
Checking out files
Copying: scripts/test.js
Cloned project null-release

So it turns out that we explicitly expect all git projects to be hosted on github without allowing for other sites. A bit amusing, but ultimately is going to result in issues.

 

fronobulax

Developer
Staff member
Noted. The code in question gets a project identifier from the repository. It knows how to do that from an SVN repository that uses SourceForge's naming and directory scheme and for something hosted on GitHub that uses a github naming scheme.

The existing code will fail on a SVN repository that does not use SourceForge's scheme so there is more than one thing that could be fixed.

What makes sense for git hosted elsewhere? Do we assume the directory scheme will be similar enough to be useful? Do we define and require a scheme for all git repositories, not jus GitHub? Do we try and derive a project identifier from some other information?

We already demand a structure - scripts, relay, data etc. Perhaps we just go up one level in the repository and use that for non SVN and non github?
 

Ryo_Sangnoir

Developer
Staff member
We could just make an identifier for other sites using the same logic we do for github.

When I wrote that in the first place, I assumed that if other sites became popular hosts, I could add proper support for them then. Given that this is the first report, over a year since git support was merged, that seems to have borne out. What's the other site you're using?
 

Irrat

Member
We could just make an identifier for other sites using the same logic we do for github.

When I wrote that in the first place, I assumed that if other sites became popular hosts, I could add proper support for them then. Given that this is the first report, over a year since git support was merged, that seems to have borne out. What's the other site you're using?
tbh I don't think the specific site matters here, since I was playing with several different git hosting sites.

That said, the url does seem somewhat reliable.

Code:
https://bitbucket.org/chromiumembedded/cef/src/master/
https://source.cloud.google.com/project-name/repo-name
https://gitlab.com/gitlab-examples/maven
https://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo
https://fiber-teams@dev.azure.com/fiber-teams/FiberTests/_git/FiberTests - I think the syntax is wrong here, may not need after the _git

I'd say the two possible solutions here would be to
1. Just resolve it from the path, even though sometimes the path is going to have useless information
2. Keep the current setup, but provide a third parameter which can tell mafia what to call the folder. If the site is invalid and no folder name is given, throw an error. Maybe change the github setup to instead cover any path with two strings in the name. So the below url would work, but not the amazonaws link given previously.

git install https://bitbucket.org/chromiumembedded/cef master | chromium
Example usage.
 
Top