Saturday, October 16, 2010

git flaw or feature?

Overall, git is a no-nonsense distributed software version control tool. So no-nonsense that it omits virtually all metadata one might use.

Like project names, for instance. Follow almost any tutorial on GIT, and by the end you won't be able to use a shell command to determine the name of your project.

You can guess the name based on your source tree directory. It just doesn't exist anywhere as an authoritative field in the SCM.

Generally, git avoids metadata and methods to set or display such metadata. One exception is the "description", an obscure file that lives under your .git/ folder.

According to one blog post, if you don't fill in the "description" file, pushing your repository to a remote location will fail with the error

! [remote rejected] master -> master (hook declined)

error: failed to push some refs to ‘ssh://username@hostname/~/projectname’

Well, that's no fun.

I want to update my setview shell scripts -- originally written for Tom Lord's tla/arch (the original dvcs) -- and the spartan metadata probably means the scripts will have do to much more handholding than I'd like.

Setview provides compartmentalized shell environments, emulating the workflow of the ClearCase command of the same name: think of it as an organizer for your local repositories. For Ruby developers, it is a shell environment analog to RVM.
Post a Comment