]> git.ipfire.org Git - thirdparty/git.git/commit - cache.h
builtin/init-db: allow specifying hash algorithm on command line
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sat, 22 Feb 2020 20:17:38 +0000 (20:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Feb 2020 17:33:27 +0000 (09:33 -0800)
commit8b8f7189dff1f9ee2e3d65dfaafc2fc9f4956232
treeb2b47df52f8a974a46d4301a58adf478d6513174
parentcfe3917c85f38c3367de7b6f5838ecaf6d1e148d
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>
Documentation/git-init.txt
builtin/clone.c
builtin/init-db.c
cache.h