gitout icon indicating copy to clipboard operation
gitout copied to clipboard

Add GitLab support

Open JakeWharton opened this issue 5 years ago • 6 comments

JakeWharton avatar Apr 10 '20 02:04 JakeWharton

Can't go through GraphQL yet because of https://gitlab.com/gitlab-org/gitlab/-/issues/196170

JakeWharton avatar May 21 '20 03:05 JakeWharton

v4 REST API should be usable, but perhaps punt for a while

JakeWharton avatar May 21 '20 03:05 JakeWharton

I was confused for a bit because the configuration specification in the README.md contains:

# Repos not on GitHub to synchronize.
[git.repos]
asm = "https://gitlab.ow2.org/asm/asm.git"

This led me to try to gitout some GitLab repositories. Once I cloned them and checked with git log this error is output:

$ git log fatal: your current branch 'master' does not have any commits yet

Maybe, the README.md should clarify that GitLab doesn't work yet or replace the example URL?

johnjohndoe avatar Mar 13 '21 21:03 johnjohndoe

Does git log work in bare repositories?

This feature is for discovering your repositories through your GitLab username. You're always able to clone any git repo from anywhere if you list the full URL.

JakeWharton avatar Mar 13 '21 22:03 JakeWharton

Does git log work in bare repositories?

Yes. If I clone a repository (e.g. git clone --bare https://github.com/JakeWharton/gitout.git) then I can successfully invoke git log.

This feature is for discovering your repositories through your GitLab username.

Thanks for the clarification.

You're always able to clone any git repo from anywhere if you list the full URL.

The full URL, e.g. https://gitlab.com/oeffi/oeffi or https://gitlab.com/oeffi/oeffi.git works for cloning it seems but then git log fails as stated before.

Here is the configuration file - just in case:

version = 0

[git.repos]
gitout = "https://github.com/JakeWharton/gitout.git" # git log doesn't work here
oeffi = "https://gitlab.com/oeffi/oeffi.git" # git log doesn't work here

johnjohndoe avatar Mar 15 '21 20:03 johnjohndoe

Thanks I'll play with it. We delegate everything to libgit2 which can have differing behavior from git proper. At worst, I just create a repro and file a bug upstream.

JakeWharton avatar Mar 15 '21 20:03 JakeWharton