Skip to content

Commit 2c928e9

Browse files
committed
Adjusted documentation about the dirty flag.
1 parent 4c7e945 commit 2c928e9

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed

src/doc/man/cargo-package.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ steps:
3131
executable binary or example target. {{man "cargo-install" 1}} will use the
3232
packaged lock file if the `--locked` flag is used.
3333
- A `.cargo_vcs_info.json` file is included that contains information
34-
about the current VCS checkout hash if available (not included with
35-
`--allow-dirty`).
34+
about the current VCS checkout hash if available, and whether or not the
35+
worktree is dirty.
3636
3. Extract the `.crate` file and build it to verify it can build.
3737
- This will rebuild your package from scratch to ensure that it can be
3838
built from a pristine state. The `--no-verify` flag can be used to skip
@@ -52,12 +52,16 @@ Will generate a `.cargo_vcs_info.json` in the following format
5252
```javascript
5353
{
5454
"git": {
55-
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302"
55+
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302",
56+
"dirty": true
5657
},
5758
"path_in_vcs": ""
5859
}
5960
```
6061

62+
`dirty` indicates whether or not the Git worktree was dirty when the package
63+
was built.
64+
6165
`path_in_vcs` will be set to a repo-relative path for packages
6266
in subdirectories of the version control repository.
6367

src/doc/man/generated_txt/cargo-package.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ DESCRIPTION
2929
packaged lock file if the --locked flag is used.
3030

3131
o A .cargo_vcs_info.json file is included that contains information
32-
about the current VCS checkout hash if available (not included
33-
with --allow-dirty).
32+
about the current VCS checkout hash if available, and whether or
33+
not the worktree is dirty.
3434

3535
3. Extract the .crate file and build it to verify it can build.
3636
o This will rebuild your package from scratch to ensure that it can
@@ -51,11 +51,15 @@ DESCRIPTION
5151

5252
{
5353
"git": {
54-
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302"
54+
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302",
55+
"dirty": true
5556
},
5657
"path_in_vcs": ""
5758
}
5859

60+
dirty indicates whether or not the Git worktree was dirty when the
61+
package was built.
62+
5963
path_in_vcs will be set to a repo-relative path for packages in
6064
subdirectories of the version control repository.
6165

src/doc/src/commands/cargo-package.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ steps:
2626
executable binary or example target. [cargo-install(1)](cargo-install.html) will use the
2727
packaged lock file if the `--locked` flag is used.
2828
- A `.cargo_vcs_info.json` file is included that contains information
29-
about the current VCS checkout hash if available (not included with
30-
`--allow-dirty`).
29+
about the current VCS checkout hash if available, and whether or not the
30+
worktree is dirty.
3131
3. Extract the `.crate` file and build it to verify it can build.
3232
- This will rebuild your package from scratch to ensure that it can be
3333
built from a pristine state. The `--no-verify` flag can be used to skip
@@ -47,12 +47,16 @@ Will generate a `.cargo_vcs_info.json` in the following format
4747
```javascript
4848
{
4949
"git": {
50-
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302"
50+
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302",
51+
"dirty": true
5152
},
5253
"path_in_vcs": ""
5354
}
5455
```
5556

57+
`dirty` indicates whether or not the Git worktree was dirty when the package
58+
was built.
59+
5660
`path_in_vcs` will be set to a repo-relative path for packages
5761
in subdirectories of the version control repository.
5862

src/etc/man/cargo-package.1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ packaged lock file if the \fB\-\-locked\fR flag is used.
4343
.sp
4444
.RS 4
4545
\h'-04'\(bu\h'+02'A \fB\&.cargo_vcs_info.json\fR file is included that contains information
46-
about the current VCS checkout hash if available (not included with
47-
\fB\-\-allow\-dirty\fR).
46+
about the current VCS checkout hash if available, and whether or not the
47+
worktree is dirty.
4848
.RE
4949
.RE
5050
.sp
@@ -74,13 +74,17 @@ Will generate a \fB\&.cargo_vcs_info.json\fR in the following format
7474
.nf
7575
{
7676
"git": {
77-
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302"
77+
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302",
78+
"dirty": true
7879
},
7980
"path_in_vcs": ""
8081
}
8182
.fi
8283
.RE
8384
.sp
85+
\fBdirty\fR indicates whether or not the Git worktree was dirty when the package
86+
was built.
87+
.sp
8488
\fBpath_in_vcs\fR will be set to a repo\-relative path for packages
8589
in subdirectories of the version control repository.
8690
.sp

0 commit comments

Comments
 (0)