summaryrefslogtreecommitdiffstats
path: root/vendor/gix-index/src/extension/sparse.rs
blob: ab219c8d6601a57b4ff05a957dde88fc75533de7 (plain)
1
2
3
4
5
6
7
8
9
10
11
use crate::extension::Signature;

/// The signature of the sparse index extension, nothing more than an indicator at this time.
pub const SIGNATURE: Signature = *b"sdir";

/// Serialize the sparse index extension to `out`
pub fn write_to(mut out: impl std::io::Write) -> Result<(), std::io::Error> {
    out.write_all(&SIGNATURE)?;
    out.write_all(&0_u32.to_be_bytes())?;
    Ok(())
}