Rob Taylor: In Critique of Git
Now as anyone who knows me knows, I love Git. I find it gives a very productive and comfortable workflow. One of my favourite new(ish) features is
Looks like people had some problems with my OpenID based login. Comments are now open.
git rebase --interactive, which along with cheap’n'fast branching gives a great way to hack and commit as you go and then later on refactor your work into sets of nice orthogonal patches.
However, there I do still find a good few things wrong with git, so I’d like to discuss these problems and possible solutions:
- Error Messages
In general git has some terrible cryptic error messages. My favourite example is if you modify a file and then pull a change that modifies that file before you commit it:
Updating beb8c37..b953e6fWTF? what does uptodate mean? why isn’t it up to date? whats gone wrong? what should i do?
test: needs update
fatal: Entry 'test' not uptodate. Cannot merge.
Surely something like:Cancelling pull as 'test' has changes that would be overwritten by this pull. Please commit your changes or force an overwrite using the '--force' flagwould be a lot better? I leave it as a reader excercise to repeat this process for most error messages… - The index
Why oh why oh why is it called the index? It does no indexing as far as the user is concerned. Its name gives you no clue to what it is, you don’t know when or how you’re supposed to use it.
git addandgit rmmodify it and it’s used all over the place by the obscure low-level git helpers that you stumble over. How about commit staging area, that being what it actually is. You could have nice commands likegit stageandgit unstageandgit stage --interactive. That’d make more sense, right? Thengit addandgit rmwould be a lot more meaningful, being only used when you actually want add or remove a file. - Remotes
With
git remotethis is a lot better than it used to be - having to use cryptic refspecs (seegit-pullmanpage for the gory details). Unfortunately refspecs are still scattered all over the documentation just to confuse you… That should almost certainly be moved out to less user-visible documentation. The main issues I have now are:- Remote branches don’t always behave like local branches when they should. In particular
git pull . <remote branch name>doesn’t work (and gives an obscure error) butgit merge <remote branch name>does. remote branches should act just like local branches you can’t modify. - I’m not sure I like
git branch -rto list remote branches, maybegit remote brancheswould be nicer and more obvious, or evengit branch --remote
- Remote branches don’t always behave like local branches when they should. In particular
- Lots of
git-*commands that confuse people This is a common complaint, and I have to say that I agree. Why not put all the low-level commands in libexec? People who really use them often (which can’t be many!) can always add it to their path. - No bug tracker! For such a user-facing tool, a bug tracker would be very useful for users who lack the experience or time to get their hands dirty in the codebase. It certainly seems that just taking bugs to the mailinglist without a patch isn’t generally useful.
Looks like people had some problems with my OpenID based login. Comments are now open.
After posting about 
If you have a (public) revision controlled ~/bin/, or bash/shell scripts I'd love to see them. Feel free to post links to your repositories as comments.
I'm certain there are some great tools and utilities out there with I could be using. Right now the only external thing I'm using is Martin Krafft's
Apparently some people worry that Gforge may be abandoned, or on the
verge of being superseded with the proprietary "Gforge Advanced
Server" rewrite. Let it be known that I for one have no plans to
switch to Gforge AS, for all the reasons you'd expect from a free
software user and advocate: I don't have access to the source code
(it's made illegible by some sort of industrial PHP obfuscator), I
can't hack it because the license doesn't allow me to, I can't audit
it for security flaws, I can't adapt it to particular needs, etc.
Since a significant part of my income comes from maintaining Gforge
instances for clients, with local modifications for their particular
needs, it's an economical necessity that Gforge stays free. And
evolving.
Right. Having said that, I guess I have to show concrete evolutions
in addition to principles and ideals. So what changed recently?
It's quite some time since I didn't blog about D-I i18n and the number of new languages we'll support in the next Debian version, lalala...
A few works are on their way, indeed:
I've used the Quod Libet music player
What does this topic mean? Hmh... Maybe you don't know
I've given the idea of centrally configuring my hosts another go. Previously I
had some meta packages that would pull in packages, but that's not very
interesting. Furthermore the archive I set up didn't scale, dpkg-scanpackages
plus makefiles aren't really fun to use.
Now, I have a set of cfengine scripts that gets distributed as .deb. That
sounds messy, but connecting reprepro with the right .dput.cf makes updating a
breeze.
cfengine itself is a beast not easily tamed. It has some weird ideas about
timeouts and when (not) to execute scripts. So far I'm only using "editfiles"
in this setup to do tweaks like comment HashKnownHosts in ssh_config, add some
sources.list entries, add %adm to sudoers, etc. Next step will be to also
automatically push config into chroots, and to pull passwd.db and friends for
use with libnss-db.
My girlfriend has to use Windows, because university she studies does not give
her another option. Now she got some crap on which she should do some
statistics. This crap is being called SAS. I have not yet seen how does it
look like, but I already enjoyed funny hours with it's installer. As I'm
currently on the other side of world, I have to do all remotely...
The basic problem is simple: I do not have much space on C: drive and it does
not provide option to install on another drive. First she tried to install it
herself, the setup fucked up so much, that it deleted NTLDR and friends from
root folder, so Windows didn't boot up again. Fortunately there is also Debian
on that machine, so she booted to it, I installed ntfs-3g and restored needed
files from Windows XP installation CD (the recovery console did not work,
don't ask me why). So great, after about one hour we have back working
Windows!
Now I still did not have idea what is the problem. However the failure
appeared when the crap was trying to install some special JRE it has included.
When I started the installer for this JRE manually, it showed that there is
not enough space. Why the hell did not the original installer show this? Well
I did some cleanup on the disk and I got 1GB of free space. Hope that it will
be enough.
No. Somewhere near 58% installation is fucked up again with error -2147483648.
Wow nice number! Looking at disk space, it's down to few kilobytes. So again
the same problem! Okay, let's clean it up more and hopefully installer will
resume. But I should not hope for anything good from this installer. The only
option it now gives me is to reboot.
Reboot, start again installer and let's see what will break this time. Now it
found out that some Microsofts runtime is missing. Why it was not missing last
time? Okay, let's install it and (of course) we need another reboot. System
started up, installer launched and it seems to go on quite well, only the
last few percents are taking incredibly long, but the crap seems to finally
installed and it even runs!
Few questions: Why they do not check for required space in installer? Why do
they force me to disable anti virus during installation? Why does not remote
desktop from Windows work? Why is there such mess in Windows, especially in
Windows folder? Why are temporary files located all over the disk?
As last but not least thing I would like to thanks everybody who made ntfs-3g
and VNC work, I would never fix this without these tools.
Oh well.. I asked for a couple of brave testers