english

gestern

Trying something new for git commit-ids

one disadvantage of git is, that its commit-ids are ugly.

b1e7470 (even the short form of b1e74702c83accb73d60e884f7a46fc06d5d51b2) is something nobody can remember. With SVN you can say "i am using svn revision 754". a number with three to six digits for most project can be memorized.

But a commit-id of git is in the short form a seven-digit hex-number, and its "randomly" choosen (by a hash function). SVN numbers a strictly monotone, so you know the project is approximate at 750 commits, and you remember the last digit, so you can say "the commit was 754".

now i am trying something new on the otfbot project: the ver2name function uses the seven-digit version of a git commit-id to generate a fantasy-name.

b1e7470 → Radwalhel

now Radwalhel may be funny enough, so you can remeber it, when someone asks you, which version you are running.

The cool function about ver2name is, that it preserves all important information, so you can convert it back to a git commit-id. So the developer can use the "funny" name to find the git-revision the user is using:

Radwalhel → b1e7470

some more examples:

0000000 ⇔ Babbabbab
8080808 ⇔ Mebmobmob
fffffff ⇔ Zozzazzaz

you see how its working: one hexdigit is mapping to one consonant, the 7th digit is mapping to two vocals. the third vocal is created by a hash of the last two digits, but it carries no additional information and is ignored in parsing the name back to a version.

we will see, if this helps against the confusion caused by git-commit-ids. its an experiment. And its still no solution to the problem, that two consecutive commits have totally different IDs.

Kategorien Software english
Tagged git svn vcs commit names commit-id svn-rev

2 Kommentare

Jan. 5, 2009

lyrics search for the current song with MPD

Another Tipp for Users of MPD:
firefox "https://ssl.scroogle.org/cgi-bin/nbbw.cgi?Gw=$(mpc|head -n1) lyrics&n=1"
searches for the current songname + "lyrics" on Scroogle (yeah, privacy).

Of course you can just change "firefox" i.e to "opera" and "https://ssl.scroogle.org/cgi-bin/nbbw.cgi?Gw=" to "http://google.de/search?q=" or what search-engine and browser you like.

Kategorien Software english
Tagged Tipps Song MPD Lyrics current current Song search

0 Kommentare

Aug. 27, 2008

The Game

In Soviet Russia, the Game loses YOU!

Kategorien Fun english
Tagged Game russian Reversal the Game Smirnoff Soviet Russia Russia Soviet Witz

0 Kommentare