Skip to main content

default_version

Function default_version 

Source
pub fn default_version(
    environment: Option<&str>,
    configured: Option<&str>,
    many_files: bool,
) -> u32
Expand description

The version git would give a fresh index, following the same order git does.

This matters because git keeps the version of the index it reads: a scratch index in the wrong version would decide the version of the final index too, which is observable. git worktree add --no-checkout writes no index at all, so the answer has to come from the environment and the configuration rather than from a file.