Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-02-22 23:17:38 +0300
committerJunio C Hamano <gitster@pobox.com>2020-02-24 20:33:27 +0300
commit8b8f7189dff1f9ee2e3d65dfaafc2fc9f4956232 (patch)
treeb2b47df52f8a974a46d4301a58adf478d6513174 /Documentation/git-init.txt
parentcfe3917c85f38c3367de7b6f5838ecaf6d1e148d (diff)
builtin/init-db: allow specifying hash algorithm on command line
Allow the user to specify the hash algorithm on the command line by using the --object-format option to git init. Validate that the user is not attempting to reinitialize a repository with a different hash algorithm. Ensure that if we are writing a non-SHA-1 repository that we set the repository version to 1 and write the objectFormat extension. Restrict this option to work only when ENABLE_SHA256 is set until the codebase is in a situation to fully support this. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-init.txt')
-rw-r--r--Documentation/git-init.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index 32880aafb0..adc6adfd38 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git init' [-q | --quiet] [--bare] [--template=<template_directory>]
- [--separate-git-dir <git dir>]
+ [--separate-git-dir <git dir>] [--object-format=<format]
[--shared[=<permissions>]] [directory]
@@ -48,6 +48,11 @@ Only print error and warning messages; all other output will be suppressed.
Create a bare repository. If `GIT_DIR` environment is not set, it is set to the
current working directory.
+--object-format=<format>::
+
+Specify the given object format (hash algorithm) for the repository. The valid
+values are 'sha1' and (if enabled) 'sha256'. 'sha1' is the default.
+
--template=<template_directory>::
Specify the directory from which templates will be used. (See the "TEMPLATE