Skip to content

Commit

Permalink
Adjusted documentation about the dirty flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
torhovland committed May 31, 2024
1 parent 4c7e945 commit 2c928e9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
10 changes: 7 additions & 3 deletions src/doc/man/cargo-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ steps:
executable binary or example target. {{man "cargo-install" 1}} will use the
packaged lock file if the `--locked` flag is used.
- A `.cargo_vcs_info.json` file is included that contains information
about the current VCS checkout hash if available (not included with
`--allow-dirty`).
about the current VCS checkout hash if available, and whether or not the
worktree is dirty.
3. Extract the `.crate` file and build it to verify it can build.
- This will rebuild your package from scratch to ensure that it can be
built from a pristine state. The `--no-verify` flag can be used to skip
Expand All @@ -52,12 +52,16 @@ Will generate a `.cargo_vcs_info.json` in the following format
```javascript
{
"git": {
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302"
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302",
"dirty": true
},
"path_in_vcs": ""
}
```

`dirty` indicates whether or not the Git worktree was dirty when the package
was built.

`path_in_vcs` will be set to a repo-relative path for packages
in subdirectories of the version control repository.

Expand Down
10 changes: 7 additions & 3 deletions src/doc/man/generated_txt/cargo-package.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ DESCRIPTION
packaged lock file if the --locked flag is used.

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

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

{
"git": {
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302"
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302",
"dirty": true
},
"path_in_vcs": ""
}

dirty indicates whether or not the Git worktree was dirty when the
package was built.

path_in_vcs will be set to a repo-relative path for packages in
subdirectories of the version control repository.

Expand Down
10 changes: 7 additions & 3 deletions src/doc/src/commands/cargo-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ steps:
executable binary or example target. [cargo-install(1)](cargo-install.html) will use the
packaged lock file if the `--locked` flag is used.
- A `.cargo_vcs_info.json` file is included that contains information
about the current VCS checkout hash if available (not included with
`--allow-dirty`).
about the current VCS checkout hash if available, and whether or not the
worktree is dirty.
3. Extract the `.crate` file and build it to verify it can build.
- This will rebuild your package from scratch to ensure that it can be
built from a pristine state. The `--no-verify` flag can be used to skip
Expand All @@ -47,12 +47,16 @@ Will generate a `.cargo_vcs_info.json` in the following format
```javascript
{
"git": {
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302"
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302",
"dirty": true
},
"path_in_vcs": ""
}
```

`dirty` indicates whether or not the Git worktree was dirty when the package
was built.

`path_in_vcs` will be set to a repo-relative path for packages
in subdirectories of the version control repository.

Expand Down
10 changes: 7 additions & 3 deletions src/etc/man/cargo-package.1
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ packaged lock file if the \fB\-\-locked\fR flag is used.
.sp
.RS 4
\h'-04'\(bu\h'+02'A \fB\&.cargo_vcs_info.json\fR file is included that contains information
about the current VCS checkout hash if available (not included with
\fB\-\-allow\-dirty\fR).
about the current VCS checkout hash if available, and whether or not the
worktree is dirty.
.RE
.RE
.sp
Expand Down Expand Up @@ -74,13 +74,17 @@ Will generate a \fB\&.cargo_vcs_info.json\fR in the following format
.nf
{
"git": {
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302"
"sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302",
"dirty": true
},
"path_in_vcs": ""
}
.fi
.RE
.sp
\fBdirty\fR indicates whether or not the Git worktree was dirty when the package
was built.
.sp
\fBpath_in_vcs\fR will be set to a repo\-relative path for packages
in subdirectories of the version control repository.
.sp
Expand Down

0 comments on commit 2c928e9

Please sign in to comment.