gitwrap/init/options.rs
1// Warning!! Code generated automatically: this file must not be edited by hand
2use crate::option_arg;
3use crate::wrap_command::FnOptionArg;
4
5pub const QUIET: &str = "--quiet";
6pub const BARE: &str = "--bare";
7pub const TEMPLATE: &str = "--template";
8pub const SEPARATE_GIT_DIR: &str = "--separate-git-dir";
9pub const SHARED: &str = "--shared";
10
11/// Only print error and warning messages; all other output will be suppressed.
12/// -q, --quiet
13pub fn quiet() -> FnOptionArg {
14 option_arg::simple(QUIET)
15}
16
17/// Create a bare repository.
18/// If GIT_DIR environment is not set, it is set to the current working directory.
19/// --bare
20pub fn bare() -> FnOptionArg {
21 option_arg::simple(BARE)
22}
23
24/// Specify the directory from which templates will be used.
25/// (See the 'TEMPLATE DIRECTORY' section below.)
26/// --template=<template_directory>
27pub fn template(template_directory_arg: &str) -> FnOptionArg {
28 option_arg::equal_no_optional(TEMPLATE, template_directory_arg)
29}
30
31/// Instead of initializing the repository as a directory to either $GIT_DIR or ./.git/, create a text file there containing the path to the actual repository.
32/// This file acts as filesystem-agnostic Git symbolic link to the repository.
33/// --separate-git-dir=<git-dir>
34pub fn separate_git_dir(git_dir_arg: &str) -> FnOptionArg {
35 option_arg::equal_no_optional(SEPARATE_GIT_DIR, git_dir_arg)
36}
37
38/// Specify that the Git repository is to be shared amongst several users.
39/// This allows users belonging to the same group to push into that repository.
40/// When specified, the config variable 'core.sharedRepository' is set so that files and directories under $GIT_DIR are created with the requested permissions.
41/// When not specified, Git will use permissions reported by umask(2).
42/// --shared[=(false|true|umask|group|all|world|everybody|0xxx)]
43pub fn shared(value: &str) -> FnOptionArg {
44 option_arg::equal_optional(SHARED, value)
45}