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

The "rustup fix --edition" command claims project is not under VCS #6766

Closed
patriksvensson opened this issue Mar 20, 2019 · 2 comments · Fixed by #6767
Closed

The "rustup fix --edition" command claims project is not under VCS #6766

patriksvensson opened this issue Mar 20, 2019 · 2 comments · Fixed by #6767
Assignees
Labels
C-bug Category: bug

Comments

@patriksvensson
Copy link
Contributor

Problem

I wanted to update an old project to the 2018 edition (on Windows 10.0.1809.0), so I ran cargo fix --edition. However, even though my project is under source control, it says it's not:

Patrik@SPECTRE-3 [C:\Users\Patrik\Source\Git\cake-build\cakeup] [master ≡]
> cargo fix --edition
error: no VCS found for this package and `cargo fix` can potentially perform destructive changes; if you'd like to suppress this error pass `--allow-no-vcs`

Of course I can use the --allow-no-vcs flag, so it's not really a problem but thought I should report this anyway.

Steps

  1. Update the toolchain by running rustup update
  2. Clone git@github.com:cake-build/cakeup.git
  3. Run cargo fix --edition

Notes

Output of cargo version:

cargo 1.33.0 (f099fe94b 2019-02-12)
@patriksvensson patriksvensson added the C-bug Category: bug label Mar 20, 2019
@ehuss
Copy link
Contributor

ehuss commented Mar 20, 2019

Looks like the issue is that there is a cakeup* entry in .gitignore, and that is being compared to the root working directory. I think it should probably not check the root against the ignore list.

@ehuss ehuss self-assigned this Mar 20, 2019
bors added a commit that referenced this issue Mar 20, 2019
Allow `cargo fix` if gitignore matches root working dir.

If `.gitignore` had a rule that matched the root working directory, it would believe that the whole thing is ignored. This is not usually how git works (AFAIK), so don't check gitignore against the root.

Closes #6766
@patriksvensson
Copy link
Contributor Author

Oh, this was resolved fast. Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants