Elektrine lite

← Feed

@b0rk@social.jvns.ca

Post #1888715

2025-12-02 16:59 UTC

this fall I worked with the core Git folks on writing an official data model for Git and it just got merged! I learned a few new things from writing it. https://github.com/git/git/blob/master/Documentation/gitdatamodel.adoc

Replies (16)

  • @b0rk@social.jvns.ca 2025-12-02 17:04

    here are some things I learned while writing this: 1. Commits can have "extra fields", for example a GPG signature 2. I always thought entries in a tree had 4 fields, but there are actually only 3 (file name, file type, and object ID) 3. Git sometimes prints out file types as a bit set (100644), but it's really more like an enum, since there are only 5 file types (regular file, executable file, symlink, directory, and gitlink) (2/?)

    Open ##2349209

  • @fasterthanlime@hachyderm.io 2025-12-02 17:08

    @b0rk@social.jvns.ca that's amazing!

    Open ##2349226

  • @mavnn@bonfire.mavnn.eu 2025-12-02 17:09

    @b0rk@social.jvns.ca This is a really clear explanation that I've sometimes missed in the past. Thank you for making it happen!​

    Open ##2349227

  • @vladh@merveilles.town 2025-12-02 17:27

    @b0rk@social.jvns.ca such a helpful contribution! :)

    Open ##2349228

  • @mikes@floss.social 2025-12-02 17:35

    @b0rk@social.jvns.ca Super helpful. Thanks.

    Open ##2349229

  • @yrlf@graz.social 2025-12-02 17:44

    @b0rk@social.jvns.ca That's amazing! I just read through it, and I think I found a formatting bug: The text "the old commit will usually not be reachable, ..." at the end of REFERENCES looks like it should be part of the note, but at least in the GitHub preview it's rendered outside of the note box.

    Open ##2349230

  • @Maria00@mastodon.uno 2025-12-02 17:56

    @b0rk@social.jvns.ca

    Open ##2349232

  • @suetanvil@freeradical.zone 2025-12-02 17:57

    @b0rk@social.jvns.ca This is great and also necessary.

    Open ##2349233

  • @Transflux@mstdn.io 2025-12-02 18:05

    @b0rk@social.jvns.ca that's cool. But what's the use of it? 🙂

    Open ##2349234

  • @markusr@mastodon.social 2025-12-02 18:27

    @b0rk@social.jvns.ca "A commit contains these required fields (..): The full directory structure of all the files in that version of the repository and each file’s contents, stored as the tree ID of the commit’s top-level directory" – Does this mean that a commit with a single line change can be extremely large if there are many (unchanged) files, because all IDs of every file, including the directory structure, are stored for each commit?

    Open ##2349235

  • @b0rk@social.jvns.ca Reminds me a lot of https://alexwlchan.net/a-plumbers-guide-to-git/ which I found very helpful as well. Glad to see something like this become official! Thanks for this work 👍

    Open ##2349238

  • @dgill@hachyderm.io 2025-12-03 01:22

    @b0rk@social.jvns.ca It's wonderfully clear. Thank you! Learned a lot already 😊

    Open ##2349239

  • @b0rk@social.jvns.ca ooo, didn't know git is stored on github, I thought it's in some weird mailing list thing, like the linux kernel

    Open ##2349240

  • @reconbot@toot.cafe 2025-12-03 05:29

    @b0rk@social.jvns.ca nice!

    Open ##2349241

  • @jbowen@mast.hpc.social 2025-12-03 23:57

    @b0rk@social.jvns.ca I know what I'll be reading when I get home!

    Open ##2349242

  • @adrianco@mastodon.social 2025-12-04 00:24

    @b0rk@social.jvns.ca Thanks for your awesome contributions to making tools easier to use for everyone. It’s great to hear that the core Git folks recognized that and engaged with you.

    Open ##2349243