Skip to main content

Module vcs

Module vcs 

Source
Expand description

Helpers to gather the VCS information for cargo package.

Re-exportsΒ§

use crate::ops::PackageOpts; πŸ”’
use crate::sources::PathEntry; πŸ”’
use crate::workspace::Package; πŸ”’
use crate::workspace::Workspace; πŸ”’
use crate::CargoResult; πŸ”’
use crate::GlobalContext; πŸ”’
use anyhow::Context; πŸ”’
use cargo_util::paths; πŸ”’
use cargo_util_terminal::report::Level; πŸ”’
use gix::bstr::BString; πŸ”’
use gix::bstr::ByteSlice; πŸ”’
use gix::bstr::ByteVec; πŸ”’
use gix::dir::walk::EmissionMode; πŸ”’
use gix::dirwalk::Options; πŸ”’
use gix::index::entry::Mode; πŸ”’
use gix::status::tree_index::TrackRenames; πŸ”’
use gix::worktree::stack::state::ignore::Source; πŸ”’
use serde::Serialize; πŸ”’
use serde::Serialize; πŸ”’
use std::path::Path; πŸ”’
use std::path::PathBuf; πŸ”’
use tracing::debug; πŸ”’

StructsΒ§

GitVcsInfo
Represents the Git VCS information when packaging.
VcsInfo
Represents the VCS information when packaging.

FunctionsΒ§

check_repo_state
Checks if the package source is in a git DVCS repository.
collect_statuses πŸ”’
Helper to collect dirty statuses for a single repo. relative_package_root is Some if the root is a sub-directory of the workdir. Writes dirty files outside relative_package_root into dirty_files_outside_package_root, and all everything else into dirty_files.
configure_dirwalk πŸ”’
dirty_files_outside_pkg_root πŸ”’
Checks whether β€œincluded” source files outside package root have been modified.
git πŸ”’
The real git status check starts from here.
relative_package_root πŸ”’
Make pkg_root relative to the repo workdir.
status_submodules πŸ”’
Helper to collect dirty statuses while recursing into submodules.
warn_symlink_checked_out_as_plain_text_file πŸ”’
Warns if any symlinks were checked out as plain text files.