Files
DIY_GIT_in_Python/how_to/Change_10.md
2024-02-28 19:50:41 +01:00

548 B
Raw Blame History

  • write-tree: Hash the files

Instead of only printing the file name, lets put all files in the object database. For now well print their OID and their name.

Notice that instead of getting one OID to represent a directory we now get a separate OID for each file, which isnt very useful. Plus, note that the names of the files arent stored in the object database, they are just printed and then the information is discarded.

So at this stage write-tree isnt useful (it just saves a bunch of files as blobs) but the next change will fix it.