-
Couldn't load subscription status.
- Fork 2.2k
Add --no-create-gitignore to uv build
#16369
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
Conversation
91d1d55 to
8396c4c
Compare
crates/uv-cli/src/lib.rs
Outdated
| #[arg(long, overrides_with("no_gitignore"), hide = true)] | ||
| pub gitignore: bool, | ||
|
|
||
| /// Do not create a `.gitignore` file in the output directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually add a second paragraph explaining why we do this by default, e.g.,
By default, uv will create a
.gitignorefile in the output directory to ...
When this flag is used, the file will be omitted.
crates/uv-cli/src/lib.rs
Outdated
| #[arg(long, overrides_with("no_gitignore"), hide = true)] | ||
| pub gitignore: bool, | ||
|
|
||
| /// Do not create a `.gitignore` file in the output directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I think these tend to end in periods?)
crates/uv-cli/src/lib.rs
Outdated
|
|
||
| /// Do not create a `.gitignore` file in the output directory | ||
| #[arg(long, overrides_with("gitignore"))] | ||
| pub no_gitignore: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My intuition when I saw this flag is that it would toggle whether or not gitignore is respected during the build. I think this could be confusing enough (and need for this option seems rare enough) that I would call this --no-create-gitignore / --create-gitignore.
--no-gitignore to uv build--no-create-gitignore to uv build
crates/uv-cli/src/lib.rs
Outdated
| /// artifacts from version control. When this flag is used, the file will be omitted and only | ||
| /// the build artifacts (source distributions and wheels) are stored in the output directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only the build artifacts (source distributions and wheels) are stored in the output directory.
This part isn't particularly future-proof. I'd probably reference the use-case instead?
When this flag is used, the file will be omitted, e.g., for use-cases where the artifacts
need to be checked in to version control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose the shorter version, there's other use cases e.g. building a find links index where you don't want a gitignore but it's also not in Git.
f7f18d9 to
0cdb01e
Compare
Fixes #16332