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

mbed-tools deploy is limiting the git fetch specification #15479

Closed
lefebvresam opened this issue Dec 25, 2023 · 2 comments
Closed

mbed-tools deploy is limiting the git fetch specification #15479

lefebvresam opened this issue Dec 25, 2023 · 2 comments

Comments

@lefebvresam
Copy link

Description of defect

When checking out a project with "mbed-tools deploy", the [remote "origin"] section in the config file of the git project checked out is limiting the fetch specification for remote branches.

$ git fetch
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master

cat .git/config [remote "origin"] section shows

[remote "origin"]
url =
fetch = +refs/heads/master:refs/remotes/origin/master

should be:

[remote "origin"]
url =
fetch = +refs/heads/*:refs/remotes/origin/*

If you then do "git fetch" you will be able to see the remote branches with "git branch -a".

$ git fetch
...
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/origin/r113-fix-git-conversion
  remotes/origin/r151-fix-git-conversion
  remotes/origin/r17-fix-git-conversion
  remotes/origin/r174-fix-git-conversion
  remotes/origin/r239-fix-git-conversion
  remotes/origin/r48-fix-git-conversion
  remotes/origin/r63-fix-git-conversion
  remotes/origin/r65-fix-git-conversion
  remotes/origin/r97-fix-git-conversion

Resolve temporary with:

git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"

Target(s) affected by this defect ?

The command "mbed-tools deploy"

Toolchain(s) (name and version) displaying this defect ?

Using docker session:

docker run -it --privileged --mount=type=bind,source="$(pwd)",destination=/var/mbed -w /var/mbed -v /dev/disk/by-id:/dev/disk/by-id -v /dev/serial/by-id:/dev/serial/by-id -v /run/udev:/run/udev:ro ghcr.io/armmbed/mbed-os-env:master-latest

What version of Mbed-os are you using (tag or sha) ?

Mbed 1.10.5

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

CLI 2

How is this defect reproduced ?

Clone a GIT project containing remote branches with CLI 2 command "mbed-tools deploy" from source *.lib.

@lefebvresam lefebvresam changed the title mbed-tools deploy is limiting the fetch specification mbed-tools deploy is limiting the git fetch specification Dec 25, 2023
@lefebvresam
Copy link
Author

There is another issue where the CLI2 "mbed-tools deploy". The repo is not checked out fully. I have seen that the history is not complete if you compare with a native GIT clone.

@lefebvresam
Copy link
Author

Handled at mbed-ce#211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Untriaged
Status: Done
Development

No branches or pull requests

2 participants