thblt / write-yourself-a-git

Learn Git by reimplementing it from scratch
https://wyag.thb.lt
GNU General Public License v3.0
655 stars 75 forks source link

Implement staging area/status/commit #17

Closed thblt closed 1 year ago

thblt commented 5 years ago

The staging area remains to be implemented. It's not hard, but it's tedious. The main difficulty is that it's it's not just a stupid tree object (for performance reasons) but the “index file”, whose format is documented here: https://github.com/git/git/blob/master/Documentation/technical/index-format.txt. Also it's a binary file, which is the kind of format where C shines and Python, well, shines a bit less.

cutebbb commented 2 years ago

Maybe we can start with the ls-files command. And I've made a PR for it;