daniestevez / galileo-osnma

Galileo OSNMA (Open Service Navigation Message Authentication)
Apache License 2.0
50 stars 8 forks source link

Cargo.lock? #17

Closed K4KDR closed 1 year ago

K4KDR commented 2 years ago

Good day!

Searching Google has not produced an easily understandable answer for me, so any guidance appreciated.

When running 'git pull -v' on my local install of this repository, I get:

From https://github.com/daniestevez/galileo-osnma
   2db1723..daf38c0  main       -> origin/main
 * [new tag]         v0.2.0     -> v0.2.0
Updating 2db1723..daf38c0
error: Your local changes to the following files would be overwritten by merge:
    galmon-osnma/Cargo.lock
    osnma-longan-nano/Cargo.lock
Please commit your changes or stash them before you merge.

... what is the "Proper" way to handle this, please? I don't have any experience with Rust so it would be foolish for me to make any assumptions.

Many thanks!

-Scott, K4KDR

daniestevez commented 2 years ago

Hi Scott,

This thing is not specific of Cargo.lock. It is just what happens when you try to do git pull and there is a file that has changes both in your local copy and also in the remote repository you're pulling from. Git is asking manual intervention here to avoid throwing away your local changes.

In the case of Cargo.lock, you have local changes because this file keeps track of the versions of the dependencies that were used to build the binary (this is used to allow reproducible builds that use exactly the same code). So it can be modified automatically sometimes when running cargo build.

In this case, it is acceptable to throw away your local changes. To do so, you can do git restore galmon-osnma/Cargo.lock, and git restore osnma-longan-nano/Cargo.lock. Then you can run git pull.

K4KDR commented 2 years ago

Thanks very much!

I have run into this frequently in other repositories where I have modified my copy of a file, but had not experienced this with a file that I had NOT edited.

So, I thought I should play it safe and check to be sure there was nothing special about how to handle the instances of this particular file.

Thanks!

daniestevez commented 1 year ago

I'm closing this, as I think it's solved.