git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Typesafer git hash patch

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 28, 2017, 20:38 UTC
Message-ID
<CA+55aFxUrJW-uAA369deXc10jNkE+M71GVveaM=pz4rSHNaunw@mail.gmail.com>
In-Reply-To
<20170228201918.dpqrrijibdapemaf@genre.crustytoothpaste.net>

On Tue, Feb 28, 2017 at 12:19 PM, brian m. carlson <sandals@crustytoothpaste.net> wrote:

>
> The bigger issue is the assumptions in the code base that assume a given
> hash size.
Absolutely. And I think those are going to be the "real" patches.
I actually saw your status report about
  "After another 27 commits, I've got it down from 1244 to 1119."

when I had just started, and I applauded the approach, but the numbers made me go "ugh, that sounds painful".

What I actually wanted to do was to write a coccinelle script to automate it, but it wasn't entirely obvious, and I started out just doing it with "sed" and hand-fixing, and it got tedious byt then I had done X% and just kept going.

I think an automated script that also guarantees that no code generation could possibly change would have been lovely. We do that over the kernel occasionally, where those kinds of patches that are four thousand insertions/deletions in size are called "last Tuesday".

So my approach was really just brute-force and stupid, I admit it. I'm not proud of the patch either.

It might be one of those "bandaid removal moments" - get it over and done with and just rip that thing off ;)

So the patch is
 216 files changed, 4174 insertions(+), 4080 deletions(-)
and about 27k lines and 950kB total size.

The list limits are apparently much lower than that, but I'll happily send it to people in private.

               Linus
Previous: brian m. carlson
Message 8 of 8 in “Typesafer git hash patch”
  1. Linus TorvaldsFeb 28, 2017
  2. Jeff KingFeb 28, 2017
  3. brian m. carlsonFeb 28, 2017
  4. Jeff KingFeb 28, 2017
  5. Linus TorvaldsFeb 28, 2017
  6. brian m. carlsonFeb 28, 2017
  7. brian m. carlsonFeb 28, 2017
  8. Linus TorvaldsFeb 28, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.