mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00

Fix .gitignore of Cargo.lock in a subdirectory. The code for checking if `Cargo.lock` is ignored was erroneously assuming it was at the root of the git repo. This would cause a problem if `Cargo.lock` is in `.gitignore` in a subdirectory. Fixes issue noted in https://github.com/rust-lang/cargo/issues/7705#issuecomment-572027382