Skip to main content

index_query_arguments

Function index_query_arguments 

Source
pub fn index_query_arguments(global_prefix: &[OsString]) -> Vec<OsString>
Expand description

What: Build the real-Git argument list: the caller’s global options, then the query. &[OsString] borrows the global prefix; Vec<OsString> is the owned result. Why: The check must inspect the same repository the commit will run in, so -C, --git-dir and the other global options are forwarded unchanged.

In TS you’d write (pseudocode):

const args = [...preSubcommandArgs, 'diff-index', '--quiet', '--cached', 'HEAD', '--'];