Skip to content

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

Open
@lefebvresam

Description

@lefebvresam

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/*"

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.

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions