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

cargo-new should not add ignore rule on Cargo.lock inside subdirs #10379

Merged
merged 2 commits into from
Feb 15, 2022

Commits on Feb 11, 2022

  1. cargo-new should not add ignore rule on Cargo.lock inside subdirs

    Have traced down the issue. It feel like the original intent is to
    ignore `Cargo.lock` and `target` at project root but not subdirectories.
    
    1. The original implementation did ignore root `/Cargo.lock`.
       rust-lang#321
    2. Someday one wanted to support both gitignore and hgingore's syntax
       and removed the leading slash.
       rust-lang#1247
    3. Later, one found that we should not ignore `target` other than
       under root directory and added `/target` back.
       rust-lang#4099
    4. It turns out that the syntax is not compatible between gitignore
       and hgignore. Therefore, one started to use hgignore special syntax
       to handle `Cargo.lock`.
       rust-lang#4342
    
    This commit rollbacks to what original implementation tries to do.
    weihanglo committed Feb 11, 2022
    Configuration menu
    Copy the full SHA
    3e71240 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    552b52a View commit details
    Browse the repository at this point in the history