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

Ignore Cargo.lock for libs in cargo-new #321

Merged
merged 1 commit into from
Aug 6, 2014

Conversation

alexcrichton
Copy link
Member

The lockfile should only be checked in for bins, not libs.

Closes #304

The lockfile should only be checked in for bins, not libs.

Closes rust-lang#304
bors added a commit that referenced this pull request Aug 6, 2014
The lockfile should only be checked in for bins, not libs.

Closes #304
@bors bors merged commit 7350cec into rust-lang:master Aug 6, 2014
@alexcrichton alexcrichton deleted the issue-304 branch August 7, 2014 00:33
bors added a commit to alexcrichton/cargo that referenced this pull request Sep 2, 2014
The lockfile should only be checked in for bins, not libs.

Closes rust-lang#304
weihanglo added a commit to weihanglo/cargo that referenced this pull request Feb 11, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'cargo new' and .gitignores
3 participants