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

Specify main or master branch #12

Open
Johjo opened this issue Sep 26, 2021 · 1 comment
Open

Specify main or master branch #12

Johjo opened this issue Sep 26, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Johjo
Copy link

Johjo commented Sep 26, 2021

Hello,

i'm trying again the update command and i get this error :

gpm update
 INFO  gpm::gpm::command::update > running the "update" command
Updating all repositories
 INFO  gpm::gpm::command::update > updating repository https://gitlab.com/Johjo/ytreza-dev-package.git
⠁ [00:00:00] [------------------------------] 0/1 updating https://gitlab.com/Johjo/ytreza-dev-package.git
 TRACE gpm::gpm::git             > setup git credentials callback
 DEBUG gpm::gpm::git             > start cloning repository https://gitlab.com/Johjo/ytreza-dev-package.git in C:\Users\Jonathan\.gpm\cache\2c109486d14db5425962eac13191eb2d44f8f31b96f6572aa6947d0927c61847
 ERROR gpm::gpm::git             > Error { code: -3, klass: 4, message: "reference \'refs/remotes/origin/master\' not found" }
[src\gpm\git.rs:131] &e = Error {
    code: -3,
    klass: 4,
    message: "reference \'refs/remotes/origin/master\' not found",
}
  [00:00:00] [##############################] 1/1 updated repositories
 INFO  gpm::gpm::command::update > updated 0/1 repository
 ERROR gpm::gpm::command::update > package repositories have not been updated, check the logs for warnings/errors

The problem come from the branch name 'master'. Now, the default branch name on gitlab is 'main'. I create a branch master and everything was OK.

Could you send a specific error message or allow to specify the branch name ?

Thanks again for your job and sorry for my english ;)

Jonathan

@JMLX42 JMLX42 added enhancement New feature or request help wanted Extra attention is needed labels Sep 27, 2021
@JMLX42
Copy link
Member

JMLX42 commented Oct 18, 2021

@Johjo thank you for your feedback!

This can probably be implemented using Remote::default_branch():

https://docs.rs/git2/0.13.23/git2/struct.Remote.html#method.default_branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants