pub struct StagedAttributes {
pub path: PathBuf,
pub contents: Vec<u8>,
}Expand description
A .gitattributes whose working-tree file is gone but whose staged copy
git still reads on the check-in path.
Git’s read_attr tries the working-tree file first and, when it is not
there, reads the index copy — measured on git 2.55: with a
secrets/** text line staged in .gitattributes and the file deleted from
the working tree, git add still converted the filter’s output (7003 CR
bytes eaten out of a 512 KiB ciphertext, exit 0, file unrecoverable at
checkout). A resolver that read only the working tree was blind to exactly
that — and deleting the file is the very move the check-in refusal’s own
message can prompt, when it says to delete the offending line.
Fields§
§path: PathBufThe absolute path the file would occupy in the working tree.
contents: Vec<u8>The staged contents.
Trait Implementations§
Source§impl Clone for StagedAttributes
impl Clone for StagedAttributes
Source§fn clone(&self) -> StagedAttributes
fn clone(&self) -> StagedAttributes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StagedAttributes
impl RefUnwindSafe for StagedAttributes
impl Send for StagedAttributes
impl Sync for StagedAttributes
impl Unpin for StagedAttributes
impl UnsafeUnpin for StagedAttributes
impl UnwindSafe for StagedAttributes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more