The Cathedral and the Bizarre II

Branches of Faith or, Committing Code Not Sins

Toby Betts

LinuxFest Northwest, 2025-04-27

Disclaimer

Difficulty level

Technical:

5/5 multitools: We hack a kernel driver for starters. C proficiency is a really good idea.

Difficulty level

Sanity:


51/50 straight jackets: We should be committed

TempleOS quick notes

See C:/Doc/Features.DD.Z

TempleOS quick notes

Read me first

"Linux is a semi... Windows is a car.... TempleOS is a motorcycle -- if you lean-over too far, a motorcycle will crash. Don't do that!"

Welcome.DD.Z

"TempleOS is a x86_64, multi-cored, non-preemptive multi-tasking, ring-0-only, single-address_mapped (identity-mapped), operating system for recreational programming. The people whom can most benefit are:

The Cathedral & the Bizarre I: A recap

TL;DR

The Cathedral & the Bizarre I: A recap

New software for TempleOS:

The Cathedral & the Bizarre I: A recap

Basic TempleOS philosophy

"The vision for this operating system was a modern Commodore 64, which was a fun toy." TempleOS is evocative of an era:

Code that fails this test is bad code

Doc/BlkChain.DD

Git: An abbreviated timeline

Thesis: Linus Torvalds developed Git in a hurry

  • Feb 2002-2005: Linux kernel development adopts BitKeeper via non-compete agreement
  • 2005: Andrew Tridgell creates SourcePuller (GPLv2), allegedly reverse engineering BitKeeper to extract data from it
  • Feb 23: BitKeeper owner Larry McVoy learns about SourcePuller
  • Apr 3: Linus releases 2.6.12-rc2
  • Apr 6: Linus announces end to BitKeeper use on LKML
https://www.linux.com/news/bitkeeper-and-linux-end-road/

Git: An abbreviated timeline: April 3

In a 2007 thread called Trivia: When did git self-host?

  • "I have reason to believe that I started [Git] at or around April 3rd"
  • "I made the last BK release on that day, and I also remember aiming for having something usable in two weeks."
  • "the first [Git] commit really is: Thu Apr 7 15:13:13 2005 -0700"
https://marc.info/?l=git&m=117254154130732

Get ready for a surprise

Git: An abbreviated timeline: April 3

In a 2007 thread called Trivia: When did git self-host?

  • "I have reason to believe that I started [Git] at or around April 3rd"
  • "I made the last BK release on that day, and I also remember aiming for having something usable in two weeks."
  • "the first [Git] commit really is: Thu Apr 7 15:13:13 2005 -0700"
https://marc.info/?l=git&m=117254154130732

Git: An abbreviated timeline: April 6

In an LKML thread called Kernel SCM saga..

  • "I've decided to not use BK mainly because I need to figure out the alternatives"
  • "problem of having to figure out a set of tools to allow us to continue to do the things that BK allowed us to do."
  • "start reading up on 'monotone'. That seems to be the most viable alternative"
https://marc.info/?l=linux-kernel&m=111280216717070

Git: An abbreviated timeline: April 8

Git is functional, self-hosting, over-engineered, and has been re-named at least once:

  • "the index file contains a lot more of the stat info than you'd expect... it checks both ctime and mtime to the nanosecond (did I mention that I didn't worry too much about portability?)"
  • "git is designed for _one_ thing, and one thing only: tracking a series of directory states in a way that can be replicated."
  • "if you want to play with something _really_ nasty (but also very _very_ fast), take a look at kernel.org:/pub/linux/kernel/people/torvalds/."
https://marc.info/?l=linux-kernel&m=111298705212803 https://marc.info/?l=linux-kernel&m=111298414006309 https://marc.info/?l=linux-kernel&m=111293537202443

Git: An abbreviated timeline: April 8

Git "features":

  • "It doesn't merge"
  • "That, btw, is kind of the design. 'git' really doesn't care about things like merges. You can use any SCM to do a merge. What 'git' does is track directory state (and how you got to that state), and nothing else. It doesn't merge, it doesn't really do a whole lot of anything."
https://marc.info/?l=linux-kernel&m=111297551321018

Git as a DIRectory Cache

The first prototype of Git consisted of 8 C files

  • Linus outright rejected the idea of using SQL
  • C files read & wrote index, object files
  • Shell scripts used for logical operations, anything else
  • Only major dependencies were on OpenSSL and zlib

Conclusion: With SHA-1 and zlib compression, you can write a Git client

https://github.com/git/git.git

Git: Brass tacks

But what does Git do? It:

  1. Saves data (content & metadata)
  2. And maybe some notes about why it was saved

By design, everything else is icing

Git: Adding a file

What does git add EmptyFile.txt do?

  • Create ASCII string: "blob " (0x62 6C 6F 62 20)
  • Append ASCII file length: "0" (0x30)
  • Append NULL byte: 0 (0x00)
  • Append file content to string
  • Compute SHA-1 sum of string
  • zlib compress string and write to .git/objects
  • Insert entry into .git/index

Git: Adding a file

The Git index is complicated.

Git: Basic object dir structure

Git: An abbreviated timeline: April 9

Back in the "Kernel SCM saga.." thread 1 2

  • "I'll make a tar-file (git-0.03), although at this point I've actually been maintaining it in itself"
  • "actually merging two git trees is not even something git tries to do"
  • "you can see all the data, but as far as I'm concerned, git is really a 'filesystem'"

At this point, Git's over-engineered, under-baked core design has been finalized

https://marc.info/?l=linux-kernel&m=111300656323379 https://marc.info/?l=linux-kernel&m=111300572308189

Git: A one-draft wonder

 

"Git is a weekend hack which looks like a weekend hack, and everything else started out looking like a weekend hack as well."
— Bram Cohen, 2005-04-24
https://bramcohen.livejournal.com/17319.html?thread=151207#t151207

Git: A one-draft wonder

Git retains several weekend hackish design flaws:

  • Git was written, under pressure, in 3.5 days
  • Performance over function: merging, renames not a priority
  • Inconsistent: internal hashes sometimes ASCII, sometimes binary
  • Shortcomings: subsecond precision... with 32-bit UNIX timestamps

Conclusion: For an SCM, Git was poorly designed. For a file system, it's also poorly designed.

https://bramcohen.livejournal.com/17319.html?thread=151207#t151207

RedSea

  • "The RedSea filesystem allocates just contiguous files -- you load and save whole files at once."
  • "The RedSea file system is a simple, 64-bit, file system which is similar to FAT32, but with absolute block addresses instead of [clusters], fixed-sized 64-byte directory entries and no FAT table, just an allocation bitmap."
  • "Files are stored in contiguous blocks and cannot grow in size."
Doc/Strategy.DD.Z Doc/RedSea.DD.Z

RedSea

RedSea stores the core kernel dir entry data structure

#define CDIR_FILENAME_LEN  38 //Must include terminator zero
public class CDirEntry
{
  CDirEntry *next,*parent,*sub;
  U8    *full_name;
  I64   user_data,user_data2;
  U0    start;
  U16   attr;
  U8    name[CDIR_FILENAME_LEN];
  I64   clus,size;
  CDate datetime;
};
Kernel/KernelA.HH.Z Kernel/BlkDev/FileSysRedSea.HC.Z

RedSea

The core kernel dir entry data structure is 64 bytes

#define CDIR_FILENAME_LEN  38 //Must include terminator zero

  // "fixed-sized 64-byte directory entries"
  // means these 64 bytes:


  U0    start;                   //  0 bytes
  U16   attr;                    //  2 bytes
  U8    name[CDIR_FILENAME_LEN]; // 38 bytes
  I64   clus,size;               // 16 bytes
  CDate datetime;                //  8 bytes

RedSea

The core kernel dir entry data structure is 64 bytes

#define CDIR_FILENAME_LEN  38 //Must include terminator zero







  U8    name[CDIR_FILENAME_LEN]; // 38 bytes


  

RedSea: Maximum filename length

  • U8 name[CDIR_FILENAME_LEN] holds the file name
  • C-style char arrays are null-terminated
  • So name must still end in '\0'
  • CDIR_FILENAME_LEN == 38
  • Hard-coded in the kernel, longest possible filename is 37 chars

RedSea: Maximum filename length

RedSea: Conclusion

  • RedSea's 64-byte data structure enforces 37-char filename limit
  • Git requires objects named after their SHA-1 hashes with 2-char dirs & 38-char filenames
  • 38-char filenames, plus a '\0', require a 39-byte string
  • 38 < 39
  • Therefore, Git cannot run on RedSea

RedSea: Conclusion

RedSea: Conclusion

  • RedSea's 64-byte data structure enforces 37-char filename limit
  • Git requires objects named after their SHA-1 hashes with 2-char dirs & 38-char filenames
  • 38-char filenames, plus a '\0', require a 39-byte string
  • 38 < 39
  • Therefore, Git cannot run on RedSea

RedSea: Conclusion

  • RedSea's 64-byte data structure enforces 37-char filename limit
  • Git requires objects named after their SHA-1 hashes with 2-char dirs & 38-char filenames
  • 38-char filenames, plus a '\0', require a 39-byte string
  • 38 < 39
  • Therefore, Git cannot run on RedSea

What about FAT32?

FAT32 and long file names (LFNs)

FAT32 allows filenames beyond the DOS-style 8.3 syntax

https://en.wikipedia.org/wiki/VFAT_long_filename#VFAT_long_file_names

FAT32 and long file names (LFNs)

FAT32 allows filenames beyond the DOS-style 8.3 syntax

  • Embeds 1 or more metadata records in the file entry
  • Each record adds 13 chars, up to 20 records/255 chars
  • TempleOS supports RedSea and FAT32
  • TempleOS FAT32 driver stops at 2 records
  • 2 * 13 = 26, 26 < 39
  • Therefore, Git cannot run on FAT32

https://en.wikipedia.org/wiki/VFAT_long_filename

https://en.wikipedia.org/wiki/VFAT_long_filename#VFAT_long_file_names Kernel/BlkDev/FileSysFAT.HC

The end

Thank you for coming to my talk.

  • Q & A (30+ minutes?)
https://en.wikipedia.org/wiki/VFAT_long_filename#VFAT_long_file_names Kernel/BlkDev/FileSysFAT.HC

FAT32: Multiples of 13

Wait a sec:

  • 2 * 13 = 26, 26 < 39
  • 3 * 13 = 39, 39 ≤ 39

Hmmm....

FAT32 and long file names (LFNs)

Terry Davis on kernel hacking

 

"Just change the kernel. Why not? Just change the kernel. You know you can do crazy stuff like that if you know what you're doing."
https://www.youtube.com/watch?v=SlNWikpNWls

FAT32 and long file names (LFNs)

Problem statement

Because strings must end with '\0', CDIR_FILENAME_LEN (38) is 1 byte too small for a Git object file name.

We need to:

  • Edit the TempleOS kernel
  • Extend the FAT32 driver to allow for more LFNs

Problem statement: the plan

To write a Git object to disk in TempleOS:

  1. Increase CDIR_FILENAME_LEN (38) by 1
  2. An assertion in FileSysRedSea.HC must be commented out
  3. RedSea FS must not be used on the system, no ISOs/RAM disks
  4. FAT32 driver must be patched to support 1 more LFN record
  5. A new kernel with these changes must be compiled (See /Adam/Opt/Boot/BootHDIns.HC)

TempleOS kernel hacking 101

1. Increase CDIR_FILENAME_LEN (38) by 1

In /Kernel/KernelA.HH:

- #define CDIR_FILENAME_LEN      38
+ #define CDIR_FILENAME_LEN      39

TempleOS kernel hacking 101

2. An assertion in FileSysRedSea.HC must be commented out

In /Kernel/BlkDev/FileSysRedSea.HC:

- #assert CDIR_SIZE==64
+ //#assert CDIR_SIZE==64

TempleOS kernel hacking 101

4. FAT32 driver must be patched to support 1 more LFN record

In /Kernel/BlkDev/FileSystemFAT.HC, edit:

  • DirLongNameFill()
  • FAT32DirFill()

Kernel hacking: FileSysFAT.HC

Look for mentions of "13" and "26"

switch (de->ord&0x3F) {
  case 1:
    for (i=0;i<13;i++)
      if (!(tmpde->name[i]=ptr[fat_long_name_map[i]]))
        return TRUE;
  break;
  case 2:
    for (i=0;i<12;i++)
      if (!(tmpde->name[i+13]=ptr[fat_long_name_map[i]]))
        return TRUE;
  break;
}

Kernel hacking: FileSysFAT.HC

Add the extra record:

  case 2:
-   for (i=0;i<12;i++)
+   for (i=0;i<13;i++)
      if (!(tmpde->name[i+13]=ptr[fat_long_name_map[i]]))
        return TRUE;
    break;
+   case 3:
+   for (i=0;i<13;i++)
+     if (!(tmpde->name[i+2*13]=ptr[fat_long_name_map[i]]))
+       return TRUE;
+   break;

Kernel hacking: FileSysFAT.HC

Look for mentions of "13" and "26"

if ((l=StrLen(tmpde->name))>13) {
  ...
  ld[de_cnt].attr=RS_ATTR_LONG_NAME;
  for (i=13;i<l;i++)
    ptr[fat_long_name_map[i-13]]=tmpde->name[i];
  i++;
  for (;i<26;i++)
    ptr[fat_long_name_map[i-13]](U16)=0xFFFF;
  ...

Kernel hacking: FileSysFAT.HC

Insert new logic before old name length check

+ l=StrLen(tmpde->name);
+  if (l>2*13) {
+  ...
+   for (i=2*13;i<l;i++)
+     ptr[fat_long_name_map[i-2*13]]=tmpde->name[i];
+   i++;
+   for (;i<3*13;i++)
+     ptr[fat_long_name_map[i-2*13]](U16)=0xFFFF;
+   l=2*13;
+ }
-  if ((l=StrLen(tmpde->name))>13) {
+  if (l>13) {

Kernel hacking: FileSysFAT.HC

A patched FileSysFAT.HC:

  • Ugly but functional
  • #define FAT32_VFAT_LEN 13
  • Does not refactor existing driver code

DEFLATE

DEFLATE is designed for LZ77 compression, but supports uncompressed blocks as well.

"Blocks" add headers and a checksum, "uncompressed" is null-compression

DEFLATE: zpipe

Use zpipe to read git objects without "git cat-file":

$ git cat-file -t e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
$ git cat-file -p e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 \
  | wc -c

Output:

blob
0

DEFLATE: zpipe

Use zpipe to read git objects without "git cat-file":

$ cd .git/objects/e6
$ zpipe -d < 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 \
  | od -vAx -t x1z

Output:

000000 62 6c 6f 62 20 30 00 >blob 0.<
000007

DEFLATE: zpipe

Use zpipe to read git objects without "git cat-file":

$ cd .git/objects/cf
$ zpipe -d < 91034ac3780fd8b2392442a69430b6cef94cef \
  | od -vAx -t x1z

Output:

000000 62 6c 6f 62 20 37 00 48 69 20 6d 6f 6d 21 >blob 7.Hi mom!<
00000e

DEFLATE: Hacking zpipe

Hack zpipe.c to write uncompressed blocks:

- ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
+ ret = def(stdin, stdout, 0);

  • "non-compressible blocks are limited to 65,535 bytes"
  • Cannot be chained like compressed blocks
  • Equivalent to "git config core.loosecompression 0"
https://www.rfc-editor.org/rfc/rfc1951

DEFLATE: Is a 65,535-byte limit a problem?

Find all files and lengths:

find . -type f -size +65535c -exec ls -l {} \; \
  | awk '{print $5 " " $NF}' | sort -rn

  • The kernel and compiler binaries/maps are larger
  • The only core files >65,535 in TempleOS are:
    • /Misc/Bible.TXT (4.2 MB)
    • /Adam/AutoComplete/ACWords.DATA (1.2 MB)
    • /Misc/PCIDevices.DD (349 KB)
    • /Kernel/KernelA.HH (91 KB)
  • Unzip(,FUF_RECURSE);

Unzip() all the things

DEFLATE: Unzip() caveats

Run Unzip("C:/",FUF_RECURSE); so you can grep but remember:

  • Edit /Adam/AutoComplete/ACTask.HC:
      } else if (FileFind("::/Doc/StandBy.DD.Z"))
        Type("::/Doc/StandBy.DD.Z",0);
  • This keeps AutoComplete from being empty
  • Or disable ACInit in HomeSys.HC

Searching HolyC code

Learn HolyC by reading HolyC. Search codebase with ripgrep and fzf:

set RG_PREFIX "rg --column --line-number \
  --no-heading --color=always --smart-case "

fzf --bind "change:reload:$RG_PREFIX {q} || true" \ --ansi | awk -F: '{print $1}' | xargs -r less

More on fzf: Bread on Penguins - "fzf, everyone's favorite fuzzy finder" - YouTube

https://www.youtube.com/watch?v=WtyYkJfgvLI

Git.HC: Git("add","EmptyFile.TXT");

  1. MAlloc() buffer == DEFLATE headers & checksum + 'blob 0\0' + file size
  2. MemCpy() 'blob 0\0' & file data to buffer at DEFLATE header offset
  3. SHA-1 Git object (Git header & data) with Sha1.HC
  4. Write DEFLATE headers & checksum into buffer
  5. Write buffer to disk with FileWrite()
  6. Write file info to index (it's still complicated)

Git.HC: Read file with FileRead

U8 *buf, *header;
I64 size;

buf=FileRead("EmptyFile.TXT",&size);
header=MStrPrint("blob %d",size);

Git.HC: MAlloc object buffer

#define DEFLATE_CHKSUM_LEN     4
#define DEFLATE_HEADER         2
#define DEFLATE_BLOCK          5

I64 obj_len=StrLen(header)+1 + size + DEFLATE_CHKSUM_LEN + \
  DEFLATE_HEADER + DEFLATE_BLOCK;
U8 *obj=MAlloc(obj_len);

obj[0](U16)=0x0178; // RFC-1951 Deflate header
obj[DEFLATE_HEADER_LEN]=1;
obj[DEFLATE_HEADER_LEN+1]=size&0xFF;
obj[DEFLATE_HEADER_LEN+2]=(size>>8)&0xFF;
obj[DEFLATE_HEADER_LEN+3]=~obj[DEFLATE_HEADER_LEN+1];
obj[DEFLATE_HEADER_LEN+4]=~obj[DEFLATE_HEADER_LEN+2];

Git.HC: Write data to buffer

U8 *ptr;

ptr=obj + DEFLATE_HEADER_LEN + DEFLATE_BLOCK;
MemCpy(ptr,header,StrLen(header));
ptr+=StrLen(header);
*ptr++=0; // the '\0' in 'blob X\0'
MemCpy(ptr,buf,size);

Git.HC: Sha1.HC sold separately

#include "Sha1.HC";
Sha1Context ctx;
I64 i,j; U32 tmp;
U8 *digest_str,*digest_bytes;

Sha1Init(&ctx); Sha1Update(&ctx,obj + \
  DEFLATE_HEADER_LEN + DEFLATE_BLOCK,size+StrLen(blob));
digest_str=Sha1Final(&ctx);

for(i=0;i<5;i++) {
  tmp=EndianU32(ctx.state[i]);
  for(j=0;j<4;j++) {
    digest_bytes[(4*i)+j]=tmp&255; tmp>>=8;
  }
}
https://su.bze.ro/software.html

Git.HC: Write file to disk

U8 *dir=MStrPrint(".git/objects/%c%c/", digest_str[0], digest_str[1]);
U8 *file=MStrPrint("%s", digest_str+2);

DirMk(dir);
Cd(dir);
FileWrite(file,obj,obj_len);

But what does all of this look like?

Git on TempleOS: Limitations

  • DEFLATE file size limit, no merging, no renaming
  • No packing/unpacking, pushing/pulling
  • Poor scaling: files only, no trees of trees
  • FAT32 hack unstable, breaks RedSea, makes fsck dangerous
  • "designed for _one_ thing, and one thing only: tracking a series of directory states in a way that can be replicated1.... _really_ nasty"

1 Except for mtimes, even though Git tracks them to the nanosecond

Git on TempleOS: Lamentations

What has Git done for TempleOS? Three "D"s:

  • Desiring: I originally thought a source control tool on TempleOS would be useful
  • Depressing: reading about Git internals was eye-opening, and the opposite of fun
  • Demoralizing: building a Git client made me not want to use a Git client

This led me to ask myself a question

Git on TempleOS: Revelation

Why are we so dependent on Git? Common arguments:

  • But Git is so [popular/fast/sophisticated]!
  • But Git is familiar!
  • But everyone uses the Git workflow!

Git is 20 years old. Did good software development practices not exist before 2005? What else is there?

We came in peace for all mankind

 

We came in peace for all mankind

"Three minutes before the lunar lander reached the Moon's surface... alarms were triggered. The [computer] was designed to support seven simultaneous programs running, but Aldrin’s request was the eighth. The result was a series of unexpected error codes during the live descent. The on-board flight software captured these alarms with the 'never supposed to happen displays'.... Hamilton had prepared for just this situation years before[.]"

https://en.wikipedia.org/wiki/Margaret_Hamilton_(software_engineer)

We came in peace for all mankind

"Three minutes before the lunar lander reached the Moon's surface... alarms were triggered. The [computer] was designed to support seven simultaneous programs running, but Aldrin’s request was the eighth. The result was a series of unexpected error codes during the live descent. The on-board flight software captured these alarms with the 'never supposed to happen displays'.... Hamilton had prepared for just this situation years before[.]"

Good software engineering existed before 2005.

https://en.wikipedia.org/wiki/Margaret_Hamilton_(software_engineer)

Anything but Git: Game of Trees

https://gameoftrees.org/faq.html

Anything but Git: Game of Trees

What is it?

  • Created by OpenBSD developers ~2017
  • Announced in 2019
  • Git compatible: not a clone, not a fork
  • Independent internals, SHA-256 support

Implementable in TempleOS, but Got keeps Git's broken workflow

https://gameoftrees.org/faq.html

Anything but Git: Bak.HC

Necessity is the mother of invention

  • Bringing Git to TempleOS required lots of testing
  • Needing something to "track directory state (and how you got to that state), and nothing else. It doesn't merge, it doesn't really do a whole lot of anything."
  • Without a stupid design and not rushed out in 4 days

Anything but Git: Bak.HC

What if you just want to save your Thursday stuff? Use Bak.HC.

  • Basic Archival Kleptomaniac
  • Beginners' All-purpose Keeper
  • Buggy, Awkward, Klutz

Anything but Git: Bak.HC

U8 *Bak(U8 *file_find_mask=NULL) {
  Date2Struct(&ds,Now);
  dst=MStrPrint("~/Backup/%d%02d%02dT%02d%02d%02d",
    ds.year,ds.mon,ds.day_of_mon,ds.hour,ds.min,ds.sec);
  DirMk("~/Backup"); DirMk(dst);
  tmpde=de=FilesFind(file_find_mask,FUF_JUST_FILES);
  while(tmpde) {
    Copy(tmpde->full_name,dst);
    tmpde=tmpde->next;
  } DirEntryDel(de);
  Cd(dst); Sha1Sum(dst,"sha1sum.TXT",FALSE);
  return dst;
}

Anything but Git: Bak.HC

Bool WriteNote(U8 *dir=NULL) {
  cd=DocNew;
  DocFlagsToggle(cd,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
  DocPrint(cd,"\n\n# Enter notes; comment ends at '#'\n");
  DocEd(cd); buf=DocSave(cd); DocDel(cd);
  i=StrFind("\n#",buf)-buf;
  while (0x0A==buf[--i]) buf[i]=0;
  file=MStrPrint("%s/notes.TXT",dir);
  if (0<i) FileWrite(file,buf,1+i);
  Free(buf); Free(file); return FALSE;
}

Anything but Git: Bak.HC

Features:

  • Tracks directory states in a way that can be replicated
  • No staging problems
  • Corruption detection with SHA-1
  • Preserves mtimes, no Y-2038 issues
  • Commit messages/notes are optional

Anything but Git: Bak usage

How do I...?

  • Add a file: Bak("File.HC");
  • Add multiple files: Bak("*.HC");
  • Revert a commit: DelTree("dirname");
  • Rebase two commits: Copy("DirA/*","DirB/"); Sha1Sum;
  • Merge diffs between commits: Merge("DirA","DirB","+r+d"); Sha1Sum;
  • Make a new branch: Ed("Bak.HC");

In summary: More sloppy than clever

Git on TempleOS: functional, barely, but what did we learn?

Git won the source control war. BitKeeper went open source in 2016 and BitMover went out of business in 2018.

"[M]y biggest regret [about the license] is not money, it is that Git is such an awful excuse for an SCM. It drives me nuts that the model is a tarball server. Even Linus has admitted to me that it's a crappy design. It does what he wants, but what he wants is not what the world should want."

— Larry McVoy, 2021-02-20
https://news.ycombinator.com/item?id=26205688

In summary: More sloppy than clever

Git on TempleOS: functional, barely, but what did we learn?

  • Other things have better features
  • Other things can be fast, too
  • Use Git.HC or Bak.HC or design your own
  • Find the tool that works best for you
  • Remember to play it S.A.E.F.

Play it S.A.E.F.

"OSS maxim: Is there something you are looking for and it's not available? Then build it."

  • Simple
  • Accessible
  • Empowering
  • Fun

If it doesn't satisfy these principles, it doesn't belong in TempleOS.

Git: Extra credit

Tim Berglund - Git From the Bits Up - YouTube

https://youtu.be/mdvlu_R8EWE

New tools

New software:

  • Patched FileSysFAT.HC
  • Git.HC
  • Bak.HC
  • Tux.HC
  • KernMake.HC

Available at https://su.bze.ro/software.html

Slides available online