Closed erdnaxeli closed 3 years ago
I'm pretty sure git status
is showing you the branch of your project, not lib/swagger
. As far as I know lib
s aren't cloned when doing shards install
, it's just the checked out code from the related repo at that branch.
Yes, the code is actually cloned in "~/.cache/shards`. But the code is still not the one I expect on this branch.
This is what shards is doing:
Fetching https://github.com/erdnaxeli/swagger.git
git clone -c core.askPass=true --mirror --quiet -- https://github.com/erdnaxeli/swagger.git /home/erdnaxeli/.cache/shards/github.com/erdnaxeli/swagger.git
git ls-tree -r --full-tree --name-only de66eff378a12c0793f195f6220b025206762326 -- shard.yml
git show de66eff378a12c0793f195f6220b025206762326:shard.yml
git ls-remote --get-url origin
Installing swagger (0.2.2 at de66eff)
rm -rf /home/erdnaxeli/codaz/laspatule/lib/swagger
git --work-tree=/home/erdnaxeli/codaz/laspatule/lib/swagger checkout de66eff378a12c0793f195f6220b025206762326 -- .
Link /home/erdnaxeli/codaz/laspatule/lib to /home/erdnaxeli/codaz/laspatule/lib/swagger/lib
shards is using the commit de66eff
instead of the last commit for this branch dc5cd76
.
Ok I needed to run shards update
to update my lockfile, this was obvious, sorry… I was running shards lock
but it does not update the lockfile…
I have this:
I correctly see in the lockfile the expected commit:
But when I go to
lib/swagger
and dogit status
I see the code is not the one expected.