![]() Over the years, developers of Git have tried to solve these problems. And the size of the repository increases with every commit, because Git has to store the exact binary, rather than the change from the last version. Because Git tracks the changes in files, it’s not able to interpret the change in the content of binary files. Therefore, when you run a simple git status command, Git has to sift through all these objects, which takes a considerable amount of time (in spite of the high efficiency of Git).Īnother area where Git might fall short is managing large binary files in the repository. Therefore, on increasing the number of commits, the number of objects in Mercurial remains constant, in contrast to a linear increase in Git. Mercurial manages a couple of objects (or files) for each file in your repository, whereas Git creates an object for each commit. Where did Git fail? A Mercurial contributor, Prasoon Shukla, on the comparison of scaling in Git and Mercurial, says that this can be attributed to the way Mercurial and Git store commits. Facebook shifted its whole codebase to Mercurial, and its team actively started contributing to Mercurial to meet Facebook's needs. Facebook's team projected that in a few years, a simple git status would take up to half a minute to show the result, as Facebook adds a large number of commits from thousands of developers every day. How large are we talking here? It's Facebook large. A link to my bashrc flake ( GitHub - abathur/bashrc.nix: A nix flake for my bashrc to show how I build lilgit and shell-hag into my shell init) if you want to see how I integrate it.Fast forward a few years, and people started noticing the first real flaw in Git: it was difficult to handle very large repositories.The demo enables you to poke at the output and timing without having to integrate it. Flake-compatible demo instructions ( GitHub - abathur/lilgit: a smol (quick) git status prompt plugin).I haven’t finished updating the readme yet, but I did update it with: I got it converted it from crate2nix to crane, which seems to have fixed the need to pin its nixpkgs. I optimistically worked on it a bit yesterday just in case. So, if you ever finish packaging it, I’ll give it a try. But since I basically pass all my time into a non-detached mode anyways, it’s not that useful to spend energy in trying to find a nice name where 90% of the time it’s just the name of the branch. it also takes into account tags), and, of course, the colors have been tailored to my needs. It looks like lilgit does basically what my prompt does, except my prompt tries a little harder in finding a nice name to be shown (ie. Not looking at my notes, but I think the main thing I wanted to fix is figuring out why the rust component stopped building against nixpkgs-unstable on darwin back in October. I’ve been picking at converting more of my own packages to flakes over the past few months and have one almost ready for lilgit. post here: Slow prompt in large git repos? speed up with lilgit.gh: GitHub - abathur/lilgit: a smol (quick) git status prompt plugin.I tried gitstatusd but still wasn’t super pleased so I ended up writing a bash prompt plugin to claw back that time in most contexts:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |