3 ms·
Show HN: ReGit – A Tiny Git-Compatible Git Implementation
- kevinhack 5y agoReGit is a tiny Git implementation written in Golang. It uses the same underlying file formats as Git. Therefore, all the changes made by ReGit can be checked by Git. This project does not aim at implementing all the features of Git. It is just an experimental implementation for learning purpose.
- 0des 5y agoI just want to chime in and say thanks for writing everything in a very clear and descriptive, yet concise style with regard to naming. That is something that I value a lot when reading others' work, it is less mental burden to get the gist of what's going on.
- kevinhack 5y agoThanks for your appreciation :)
- ABS 5y agoagreed! more often than not even interesting and well structured golang projects end up with i, j, k, m, f, mx, gh, and so forth variable names. I thought we had gotten over this as a community by and large many, many years ago. No need to be enteprise-Java-style verbose but surely there is a happy middle and ReGit seems to nail it so kudos
- pwdisswordfish8 5y ago> written in a garbage-collected language where the original implementation is written in C > ‘tiny’
- _ph_ 5y agoVery nice! You should attach a (liberal) licence to your code, so others could use it.
- kevinhack 5y agoThanks for your friendly reminder :)
- moondev 5y agoI like the idea - but does it support cloning from a remote? Or is the designed use-case to act on existing local repos
- kevinhack 5y agoThe main purpose of this project is to write a minimal implementation of Git for me to understand how Git works. Yes, supporting it is under my plan.
- forgotmypw17 5y agoIs there a way to somehow compile this with just cc, without installing go first? (On a machine with no admin rights, and no git, but cc is available.)
- cglong 5y agoYou can install Go without admin rights :)
- forgotmypw17 5y agoThanks!
- pharmakom 5y agoI actually think C++ would be a great implementation language for such a foundational technology. I'm sure this is appreciated by Go teams though.
- girishso 5y agoWhat's wrong with go? What C++ provides that go does not?
- _ph_ 5y agoC++ is actually a very bad choice for "foundational" technology, as it is quite difficult for other languages to link against C++ libraries. Plain C, or any language which out of the box supports C compatible linkage for the API, is a much better choice. Here, Go is a very good choice. Easy to read, very approachable. In general, the greater memory safety and simpler memory handling, makes it a great choice for software like this.
- asddubs 5y agoI mean C++ does support C compatible linkage for the API
- deleted 5y ago[deleted]