Re: Questions about the hash function transition

2018-08-29 Thread Derrick Stolee
On 8/29/2018 9:27 AM, Derrick Stolee wrote: On 8/29/2018 9:09 AM, Johannes Schindelin wrote: What I meant was to leverage the midx code, not the .midx files. My comment was motivated by my realizing that both the SHA-1 <-> SHA-256 mapping and the MIDX code have to look up (in a *fast* way) inf

Re: Questions about the hash function transition

2018-08-29 Thread Derrick Stolee
On 8/29/2018 9:09 AM, Johannes Schindelin wrote: Hi Jonathan, On Tue, 28 Aug 2018, Jonathan Nieder wrote: Johannes Schindelin wrote: On Thu, 23 Aug 2018, Jonathan Nieder wrote: Ævar Arnfjörð Bjarmason wrote: Are we going to need a midx version of these mapping files? How does midx fit into

Re: Questions about the hash function transition

2018-08-29 Thread Johannes Schindelin
Hi Jonathan, On Tue, 28 Aug 2018, Jonathan Nieder wrote: > Johannes Schindelin wrote: > > On Thu, 23 Aug 2018, Jonathan Nieder wrote: > > > Ævar Arnfjörð Bjarmason wrote: > > >>> Are we going to need a midx version of these mapping files? How does > >>> midx fit into this picture? Perhaps it's t

Re: Questions about the hash function transition

2018-08-28 Thread Jonathan Nieder
Derrick Stolee wrote: > I'm not super-familiar with how the transition plan specifically needs this > mapping, but it seems like a good place to put it. Would you mind reading it through and letting me know your thoughts? More eyes can't hurt. Thanks, Jonathan

Re: Questions about the hash function transition

2018-08-28 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: > On Thu, 23 Aug 2018, Jonathan Nieder wrote: > > Ævar Arnfjörð Bjarmason wrote: >>> Are we going to need a midx version of these mapping files? How does >>> midx fit into this picture? Perhaps it's too obscure to worry about... >> >> That's a great question! I thi

Re: Questions about the hash function transition

2018-08-28 Thread Junio C Hamano
Edward Thomson writes: > If I'm understanding you correctly, then on the libgit2 side, I'm very much > opposed to this proposal. We never execute commands, nor do I want to start > thinking that we can do so arbitrarily. We run in environments where that's > a non-starter > > At present, in lib

Re: Questions about the hash function transition

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 28 2018, Edward Thomson wrote: > On Tue, Aug 28, 2018 at 2:50 PM, Ævar Arnfjörð Bjarmason > wrote: >> If we instead had something like clean/smudge filters: >> >> [extensions] >> objectFilter = sha256-to-sha1 >> compatObjectFormat = sha1 >> [objectFilter "sha

Re: Questions about the hash function transition

2018-08-28 Thread Edward Thomson
On Tue, Aug 28, 2018 at 2:50 PM, Ævar Arnfjörð Bjarmason wrote: > If we instead had something like clean/smudge filters: > > [extensions] > objectFilter = sha256-to-sha1 > compatObjectFormat = sha1 > [objectFilter "sha256-to-sha1"] > clean = ... > smudge =

Re: Questions about the hash function transition

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23 2018, Ævar Arnfjörð Bjarmason wrote: >> Transition plan >> --- > > One thing that's not covered in this document at all, which I feel is > missing, is how we're going to handle references to old commit IDs in > commit messages, bug trackers etc. once we go through the

Re: Questions about the hash function transition

2018-08-28 Thread Derrick Stolee
On 8/28/2018 8:04 AM, Johannes Schindelin wrote: Hi, On Thu, 23 Aug 2018, Jonathan Nieder wrote: Ævar Arnfjörð Bjarmason wrote: [...] Since all operations that make new objects (e.g., "git commit") add the new objects to the corresponding index, this mapping is possible for all objects in th

Re: Questions about the hash function transition

2018-08-28 Thread Johannes Schindelin
Hi, On Thu, 23 Aug 2018, Jonathan Nieder wrote: > Ævar Arnfjörð Bjarmason wrote: > > [...] > >> Since all operations that make new objects (e.g., "git commit") add > >> the new objects to the corresponding index, this mapping is possible > >> for all objects in the object store. > > > > Are we g

Re: Questions about the hash function transition

2018-08-23 Thread Jonathan Nieder
brian m. carlson wrote: > On Thu, Aug 23, 2018 at 06:54:38PM -0700, Jonathan Nieder wrote: >> For what it's worth, even if it all is in one commit with message >> "wip", I think I'd benefit from being able to see this code. I can >> promise not to critique it, and to only treat it as a rough >> p

Re: Questions about the hash function transition

2018-08-23 Thread brian m. carlson
On Thu, Aug 23, 2018 at 06:54:38PM -0700, Jonathan Nieder wrote: > brian m. carlson wrote: > > I realize I have a lot of code that has not been sent in yet, but I also > > tend to build on my own series a lot, and I probably need to be a bit > > better about extracting reusable pieces that can go i

Re: Questions about the hash function transition

2018-08-23 Thread Jonathan Nieder
Ævar Arnfjörð Bjarmason wrote: >> Objective >> - >> Migrate Git from SHA-1 to a stronger hash function. > > Should way say "Migrate Git from SHA-1 to SHA-256" here instead? > > Maybe it's overly specific, i.e. really we're also describnig how /any/ > hash function transition might happen,

Re: Questions about the hash function transition

2018-08-23 Thread Jonathan Nieder
Hi, brian m. carlson wrote: > On Thu, Aug 23, 2018 at 04:02:51PM +0200, Ævar Arnfjörð Bjarmason wrote: >>> 1. Add SHA-256 support to Git protocol. This is valuable and the >>>logical next step but it is out of scope for this initial design. >> >> This is a non-goal according to the docs, but

Re: Questions about the hash function transition

2018-08-23 Thread Jonathan Nieder
Hi, Ævar Arnfjörð Bjarmason wrote: > I wanted to send another series to clarify things in > hash-function-transition.txt, but for some of the issues I don't know > the answer, and I had some questions after giving this another read. Thanks for looking it over! Let's go. :) [...] >> Objective >

Re: Questions about the hash function transition

2018-08-23 Thread brian m. carlson
On Thu, Aug 23, 2018 at 04:02:51PM +0200, Ævar Arnfjörð Bjarmason wrote: > > [...] > > Goals > > - > > 1. The transition to SHA-256 can be done one local repository at a time. > >a. Requiring no action by any other party. > >b. A SHA-256 repository can communicate with SHA-1 Git servers

Re: Questions about the hash function transition

2018-08-23 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Thu, Aug 23 2018, Junio C Hamano wrote: > >> Ævar Arnfjörð Bjarmason writes: >> - The trailer consists of the following: - A copy of the 20-byte SHA-256 checksum at the end of the corresponding packfile. - 20-byte SHA-256 chec

Re: Questions about the hash function transition

2018-08-23 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >>> - The trailer consists of the following: >>> - A copy of the 20-byte SHA-256 checksum at the end of the >>> corresponding packfile. >>> >>> - 20-byte SHA-256 checksum of all of the above. >> >> We need to

Re: Questions about the hash function transition

2018-08-23 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >> - The trailer consists of the following: >> - A copy of the 20-byte SHA-256 checksum at the end of the >> corresponding packfile. >> >> - 20-byte SHA-256 checksum of all of the above. > > We need to update both of these to 32 byte, right? Or are we plann

Questions about the hash function transition

2018-08-23 Thread Ævar Arnfjörð Bjarmason
I wanted to send another series to clarify things in hash-function-transition.txt, but for some of the issues I don't know the answer, and I had some questions after giving this another read. So let's discuss that here first. Quoting from the document (available at https://github.com/git/git/blob/