From: Junio C Hamano Date: Mon, 05 Nov 2018 02:36:01 GMT Subject: Re: Design of multiple hash support Message-ID: In-Reply-To: <20181105010032.GN731755@genre.crustytoothpaste.net> "brian m. carlson" writes: > I'm currently working on getting Git to support multiple hash algorithms > in the same binary (SHA-1 and SHA-256). In order to have a fully > functional binary, we'll need to have some way of indicating to certain > commands (such as init and show-index) that they should assume a certain > hash algorithm. > > There are basically two approaches I can take. The first is to provide > each command that needs to learn about this with its own --hash > argument. So we'd have: > > git init --hash=sha256 > git show-index --hash=sha256 > The other alternative is that we provide a global option to git, which > is parsed by all programs, like so: > > git --hash=sha256 init > git --hash=sha256 show-index