5 ms·
Legit: Git Commands as an Esoteric Programming Language
- zeotroph 8y agoThe mentioned git-in-git problem always annoyed me, at least it should be possible to store .git/ subtrees anywhere else but on the toplevel (it very likely is already supported in the data model). Then git can scream at me for not using submodules, and I can then silence that warning because I obviously know what I am doing! legit might be an esoteric use case for that, but storing raw testdata for git hooks (not a zip or the commands to create the repo) are actual usecases.
- Phrodo_00 8y agoFor now I guess you could use a different dvcs like mercurial
- codetrotter 8y agoOr you could serialize the original git tree into another format and commit that. Then have a build step that deserializes it back into a git tree. And if you make a change to your legit program then you serialize the new tree and make a new commit with that. I think git format-patch would be "appropriate" for this. git format-patch will generate a patch-file per commit. It might not be very pleasant and I wouldn't suggest doing it this way for most cases, but I think in the context of "legit" it would be the most obvious way and it would be in line with the spirit of "legit" itself. And in fact if Mercurial Queues are what you were referring to then I seem to recall that it works somewhat in the same way that I described above, doesn't it? At least in terms of being about working with diffs of diffs I mean.
- bayareanative 8y agoI wonder if you can use gitmodules configured out-of-tree in .git/config. In my experience, git in git ignores other git trees like they're not there IIRC.
- purpleidea 8y agoI'm not sure this was very clever. It basically just says "I made a weird programming language with a tree data structure". But that's any AST, and not special to use git. So not especially interesting here. Or maybe I misunderstood this completely.
- aasasd 8y agoYeah, putting programs in commit messages isn't too impressive. I expected something like ‘git commands turn out to be Turing-complete.’
- saagarjha 8y agoThere are Git commands that you can massage into calling an arbitrary shell program you specify: I had a fun little challenge once where I constructed a “jail” that let you pass arbitrary arguments to git.
- inflatableDodo 8y agoNow you got me trying to see if I can somehow construct a nand gate out of git commands.
- bayareanative 8y agoLe Git should be git's official newsletter.
- tempodox 8y agoOr the bon-mot for The Obfuscated git Contest...
- zeckalpha 8y agoUsing the graph to connect “variables” is clever. Lisp is to lists as TCL is to strings as this is to a graph.
- cheschire 8y agoNow I'm having a hard time not reading Git with a soft G like Gif[0] 0: https://www.dictionary.com/browse/gif https://www.dictionary.com/browse/gif
- oarabbus_ 8y agoGif should be pronounced "jif" regardless of what the creator claims.
- ofrzeta 8y agoUnfortunately there's already a Git-related Project called Legit: http://www.git-legit.org/ http://www.git-legit.org/
- skrebbel 8y agoI think the logo is a work of genius
- smith-kyle 8y agoCommit messages can contain a series of instructions, seperated with spaces, which are executed one by one. Only the first line is considered, so lines after that can be used for comments. Oh good.