Update Saturday, 24th of January, Anno Domini MMIX, at the hour of the Pig
[git/dscho.git] / index.html
blob1a8abd01402becd03cc2e2bb3c278a8b67513a1e
1 <html>
2 <head>
3 <title>Dscho's blog</title>
4 <meta http-equiv="Content-Type"
5 content="text/html; charset=UTF-8"/>
6 </head>
7 <body style="width:800px;background-image:url(dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=paper.jpg);background-repeat:repeat-y;background-attachment:scroll;padding:0px;">
8 <div style="width:610px;margin-left:120px;margin-top:50px;align:left;vertical-align:top;">
9 <h1>Dscho's blog</h1>
10 <div style="position:absolute;top:50px;left:810px;width=400px">
11 <table width=400px bgcolor=#e0e0e0 border=1>
12 <tr><th>Table of contents:</th></tr>
13 <tr><td>
14 <p><ul>
15 <li><a href=#1232828715>24 Jan 2009 Ideas for a major revamp of the <i>--preserve-merges</i> handling in <i>git rebase</i></a>
16 <li><a href=#1232778113>24 Jan 2009 Thoughts about <i>interactive rebase</i></a>
17 <li><a href=#1232745071>23 Jan 2009 Git Logos</a>
18 <li><a href=#1232742582>23 Jan 2009 How to deal with files that are not source code when merging</a>
19 <li><a href=#1232626236>22 Jan 2009 The UGFWIINI contest</a>
20 <li><a href=#1232611542>22 Jan 2009 Top-posting</a>
21 <li><a href=#1232607201>22 Jan 2009 Sverre's hat</a>
22 <li><a href=#1232604722>22 Jan 2009 Let there be images!</a>
23 <li><a href=#1232599693>22 Jan 2009 My blog has style</a>
24 <li><a href=#1232589695>22 Jan 2009 My new blog system... bloGit</a>
25 </ul></p>
26 </td></tr></table>
27 <br>
28 <div style="text-align:right;">
29 <a href="dscho.git?a=blob_plain;hb=blog;f=blog.rss"
30 title="Subscribe to my RSS feed"
31 class="rss" rel="nofollow"
32 style="background-color:orange;text-decoration:none;color:white;font-family:sans-serif;">RSS</a>
33 </div>
34 <br>
35 <table width=400px bgcolor=#e0e0e0 border=1>
36 <tr><th>Links:</th></tr>
37 <tr><td>
38 <ul>
39 <li> <a href=http://git-scm.com/>Git's homepage</a>
40 <li> <a href=http://gitster.livejournal.com/>Junio's blog</a>
41 <li> <a href=http://www.spearce.org/>Shawn's blog</a> seems to be sitting
42 idle ever since he started working for Google...
43 <li> <a href=http://torvalds-family.blogspot.com/>Linus' blog</a> does not
44 talk much about Git...
45 <li> Scott Chacon's <a href=http://whygitisbetterthanx.com/>Why Git is better
46 than X</a> site
47 <li> <a href=http://vilain.net/>The blog of mugwump</a>
48 <li> <a href=http://blogs.gnome.org/newren/>Elijah Newren</a> chose the
49 same path as Cogito, offering an alternative porcelain (an approach
50 that is doomed in my opinion)
51 <li> <a href=http://msysgit.googlecode.com/>The msysGit project</a>, a (mostly)
52 failed experiment to lure the many Windows developers out there to
53 contribute to Open Source for a change.
54 </ul>
55 </td></tr></table>
56 <br>
57 <table width=400px bgcolor=#e0e0e0 border=1>
58 <tr><th>Google Ads:</th></tr>
59 <tr><td align=center>
60 <script type="text/javascript"><!--
61 google_ad_client = "pub-5106407705643819";
62 /* 300x250, created 1/22/09 */
63 google_ad_slot = "6468207338";
64 google_ad_width = 300;
65 google_ad_height = 250;
66 //-->
67 </script>
68 <script type="text/javascript"
69 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
70 </script>
71 </td></tr></table>
72 </div>
73 <h6>Saturday, 24th of January, Anno Domini MMIX, at the hour of the Pig</h6>
74 <a name=1232828715>
75 <h2>Ideas for a major revamp of the <i>--preserve-merges</i> handling in <i>git rebase</i></h2>
77 <p>
78 </p><p>
79 As probably everybody agrees, the code to preserve merges is a big mess
80 right now.
81 </p><p>
82 Worse, the whole concept of "pick <merge-sha1>" just does not fly well.
83 </p><p>
84 So I started a <u>major</u> cleanup, which happens to reduce the code very
85 nicely so far.
86 </p><p>
87 It will take a few days to flesh out, I guess, but these are the major
88 ideas of my work:
89 </p><p>
90 <b>pick $sha1</b><br>
91 <blockquote>will only work on non-merges in the future.</blockquote>
92 <b>merge $sha1 [$sha1...] was $sha1 Merge ...</b><br>
93 <blockquote>will merge the given list of commits into the current HEAD, for
94 the user's reference and to keep up-to-date what was rewritten,
95 the original merge is shown after the keyword "was" (which is not
96 a valid SHA-1, luckily).</blockquote>
97 <b>goto $sha1</b><br>
98 <blockquote>will reset the HEAD to the given commit.</blockquote>
99 <b>$sha1'</b><br>
100 <blockquote>for merge and goto, if a $sha1 ends in a single quote, the
101 rewritten commit is substituted (if there is one).</blockquote>
102 </p><p>
103 Example:
104 </p><p>
105 <pre>
106 A - B - - - E
108 C - D
109 </pre>
110 </p><p>
111 could yield this TODO script:
112 </p><p>
113 <pre>
114 pick A
115 pick C
116 pick D
117 goto A'
118 pick B
119 merge D' was E
120 </pre>
121 </p><p>
122 This should lead to a much more intuitive user experience.
123 </p><p>
124 I am very sorry if somebody actually scripted <i>rebase -i -p</i> (by setting
125 GIT_EDITOR with a script), but I am very certain that this cleanup is
126 absolutely necessary to make <i>rebase -i -p</i> useful.
127 </p>
128 <h6>Saturday, 24th of January, Anno Domini MMIX, at the hour of the Dragon</h6>
129 <a name=1232778113>
130 <h2>Thoughts about <i>interactive rebase</i></h2>
133 </p><p>
134 Somebody mentioned that my <i>my-next</i> branch is a mess, as it mixes all
135 kinds of topics.
136 </p><p>
137 That is undeniably true, however, there is a good reason that I do not
138 have a lot of topic branches: I work on more than just one computer.
139 </p><p>
140 To make sure that I do not lose a commit by mistake, I always <i>rebase -i</i>
141 the <i>my-next</i> branch of the computer I happen to work on on top of the
142 <i>my-next</i> branch I fetch from <a href=http://repo.or.cz>repo.or.cz</a>.
143 </p><p>
144 To rebase a lot of topic branches at the same time seems a bit complicated.
145 But that is actually what the <i>-p</i> option (preserve merges) is all about.
146 </p><p>
147 The only problem is that the code for <i>rebase -i -p</i> has been messed up
148 recently, quite successfully, I might add.
149 </p><p>
150 Worse, some people are pushing for a completely and total unintuitive syntax.
151 </p><p>
152 So maybe I will start to work on <i>-p</i> again, for my own use (I should learn
153 to heed the principle more: work on things I can use myself).
154 </p><p>
155 My current idea is to implement a "goto" statement that will jump to another
156 commit. To make it easily usable, I will add the semantics that "goto" will
157 always try to go to the <u>rewritten</u> version of the given commit; if the user
158 wanted to have the original commit, she has to paste the unabbreviated commit
159 name.
160 </p><p>
161 The more I think about it, the more I actually like this idea &#x263a;
162 </p><p>
163 Of course, working on this little project means that I will have to cope with
164 that ugly code again. *urgh*
165 </p>
166 <h6>Friday, 23rd of January, Anno Domini MMIX, at the hour of the Pig</h6>
167 <a name=1232745071>
168 <h2>Git Logos</h2>
171 </p><p>
172 The other day, when I did not exactly have too much time on my hands, but
173 definitely too much motivation, I played around creating several logos.
174 </p><p>
175 An ambigram (if you turn it 180 degrees around the appropriate axis, it looks
176 exactly the same as unrotated):
177 </p><p>
178 <center>
179 <table border=0>
180 <tr>
181 <td align=center>
182 <embed type="image/svg+xml"
183 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-ambigram.svg" width=317 />
184 </td>
185 </tr>
186 <tr>
187 <td align=center>
188 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-ambigram.svg>git-ambigram.svg</a>
189 </td>
190 </tr>
191 </table>
192 </center>
193 </p><p>
194 A play on gitk:
195 </p><p>
196 <center>
197 <table border=0>
198 <tr>
199 <td align=center>
200 <embed type="image/svg+xml"
201 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-gitk-logo.svg" width=325 />
202 </td>
203 </tr>
204 <tr>
205 <td align=center>
206 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-gitk-logo.svg>git-gitk-logo.svg</a>
207 </td>
208 </tr>
209 </table>
210 </center>
211 </p><p>
212 A play on the test you have to go through before getting new glasses:
213 </p><p>
214 <center>
215 <table border=0>
216 <tr>
217 <td align=center>
218 <embed type="image/svg+xml"
219 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-visual-test.svg" width=325 />
220 </td>
221 </tr>
222 <tr>
223 <td align=center>
224 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-visual-test.svg>git-visual-test.svg</a>
225 </td>
226 </tr>
227 </table>
228 </center>
229 </p><p>
230 This is Henrik Nyh's logo (converted to .svg by yours truly):
231 </p><p>
232 <center>
233 <table border=0>
234 <tr>
235 <td align=center>
236 <embed type="image/svg+xml"
237 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=gitlogo.svg" width=165 />
238 </td>
239 </tr>
240 <tr>
241 <td align=center>
242 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=gitlogo.svg>gitlogo.svg</a>
243 </td>
244 </tr>
245 </table>
246 </center>
247 </p><p>
248 And of course, the original logo...
249 </p><p>
250 <center>
251 <table border=0>
252 <tr>
253 <td align=center>
254 <embed type="image/svg+xml"
255 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=original-git-logo.svg" width=165 />
256 </td>
257 </tr>
258 <tr>
259 <td align=center>
260 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=original-git-logo.svg>original-git-logo.svg</a>
261 </td>
262 </tr>
263 </table>
264 </center>
265 </p><p>
266 Maybe some of you have fun with them...
267 </p>
268 <h6>Friday, 23rd of January, Anno Domini MMIX, at the hour of the Pig</h6>
269 <a name=1232742582>
270 <h2>How to deal with files that are not source code when merging</h2>
273 </p><p>
274 Last week, one of the mentors of last year's <a href=http://code.google.com/soc>
275 Summer of Code</a> mentioned the idea that merge strategies are in dear need
276 for file types other than source code.
277 </p><p>
278 I think this idea is awesome, even if I cannot bring myself to believe that
279 any of the file types would make a good Summer of Code project: either they
280 are too complicated (think raster images such as .png or even .jpg), or they
281 are too straight-forward (think LaTeX, where all that is needed is a good
282 graphical user interface to inspect the three versions: <i>ours</i>, <i>baseline</i>
283 and <i>theirs</i>).
284 </p><p>
285 The LaTeX idea would be a good project for me to mentor, though: I have a
286 pretty clear idea how it should be done; I just lack the time (and motivation)
287 to do it myself.
288 </p><p>
289 As for OpenOffice text documents, vector graphics (such as .svg), or more
290 specific data such as spreadsheets, I think that all of these are really
291 difficult: the problem is not so much the implementation (i.e. the programming
292 part of it), but the design.
293 </p><p>
294 This design should involve much more than a Summer of Code project is about:
295 you would need to survey users' expectations, and at least the mentor -- if
296 not the student -- would need to be an expert in usability questions, which
297 is rather unlikely in the realm of Open Source.
298 </p><p>
299 Maybe this is the missing part in Open Source: we have many brilliant
300 programmers, but next to nobody with a good idea how to design intuitive
301 user interfaces.
302 </p><p>
303 That might be related to the fact that brilliant software engineers, as they
304 can be found in Open Source, are not exactly known for their social skills,
305 a human trait that seems to be a very important prerequisite for designing
306 intuitive user interfaces.
307 </p><p>
308 Well, I have <a href=http://git.or.cz/gitwiki/SoC2009Ideas#head-6188833471f79f277e162ef9fbe1592aa10b5f6c>
309 added</a> the proposal to Git's Summer of Code idea page on the Git Wiki; We will
310 see what comes out of it.
311 </p>
312 <h6>Thursday, 22nd of January, Anno Domini MMIX, at the hour of the Goat</h6>
313 <a name=1232626236>
314 <h2>The UGFWIINI contest</h2>
317 </p><p>
318 Just in case somebody finds this blog, here is a challenge. Inspired by my
319 own little hack (this blog), I announce the "Using Git For What It Is Not
320 Intended" contest.
321 </p><p>
322 And it is especially cool, since the acronym sounds cool! You might miss
323 this fact if you do no know that I pronounce the "F" like an "A" so that
324 it sounds cool.
325 </p><p>
326 This will be a running contest; whenever I have 10 valid applications, I
327 will announce a winner on the Git mailing list.
328 </p><p>
329 So, what accounts for a valid application?
330 </p><p>
331 <ul>
332 <li> You must use a Git program (the term is used loosely here, GitWeb is
333 considered a Git program, for example).
334 <li> The program must be intended for something completely different than
335 what you are using it for. E.g. GitWeb -- which was intended to let
336 you browse through the history using your web browser -- is used
337 to serve a blog to the wide world.
338 <li> You must be able to prove that you actually used the Git program to
339 the purpose you claim, preferably in a live demonstration like this
340 one.
341 <li> Nobody and nothing must be harmed in the process (except your
342 laughing muscle, that's okay).
343 </ul>
344 </p><p>
345 So, how does such an abuse look like?
346 </p><p>
347 <ul>
348 <li> ... like this blog.
349 <li> Managing your mail (in maildir format) in a Git repository.
350 <li> Finding duplicate files by
351 <table
352 border=1 bgcolor=black>
353 <tr><td bgcolor=lightblue colspan=3>
354 &nbsp;
355 </td></tr>
356 <tr><td>
357 <table cellspacing=5 border=0
358 style="color:white;">
359 <tr><td>
360 <pre>
361 $ git init
362 $ git add .
363 $ git ls-files --stage | sort -k2 | uniq -d -s7 -w40
364 </pre>
365 </td></tr>
366 </table>
367 </td></tr>
368 </table>
369 <li> Abusing the Git alias mechanism to call scripts defined directly in
370 the config.
371 </ul>
372 </p><p>
373 I am really looking forward to all of your submissions... *chuckles*
374 </p><p>
375 </p>
376 <h6>Thursday, 22nd of January, Anno Domini MMIX, at the hour of the Snake</h6>
377 <a name=1232611542>
378 <h2>Top-posting</h2>
381 </p><p>
382 Okay, last post for a while. But this is something that is nagging me
383 tremendously. I should probably just let go, but in my deepest inner self,
384 really close to my heart, I refuse to believe that any human beings could
385 be incapable of certain degrees of reason.
386 </p><p>
387 Take the example of top-posting. Everybody who read a top-posted email
388 knows that you have to scroll down, possibly weeding through tons of
389 pages to find out what the heck the author of the last reply was replying
391 </p><p>
392 Never mind that it would take the author of the reply just a couple of
393 seconds to remove all the irrelevant stuff -- as she already knows what
394 is the relevant part, saving minutes, in case of mailing lists hours,
395 easily, to the readers who otherwise would have to discern what is
396 irrelevant and what is relevant first.
397 </p><p>
398 It is a horrible time waste. But of course not for the top-poster.
399 </p><p>
400 The problem is that I frequently run into such people, and when I write
401 them a polite mail, explaining to them that it is impolite to top-post,
402 and why, the answers I get sometimes make me check if the sky is still up
403 and the earth down. Yesterday was an example of such a dubitable
404 pleasure.
405 </p><p>
406 Most funny are the ridiculous attempts by those persons at explaining why
407 top-posting is <i>so</i> much superior to anything else.
408 </p><p>
409 Which is good, because if they were not that funny, they would be pretty sad.
410 </p>
411 <h6>Thursday, 22nd of January, Anno Domini MMIX, at the hour of the Dragon</h6>
412 <a name=1232607201>
413 <h2>Sverre's hat</h2>
416 </p><p>
417 The fun part about a blog is that you can talk about less technical stuff.
418 For example, Sverre's hat.
419 </p><p>
420 Let me start a bit earlier, so that you get the context.
421 </p><p>
422 Last year, at the <a href=http://git.or.cz/gitwiki/GitTogether>GitTogether</a>,
423 we had an <a href=http://en.wikipedia.org/wiki/Unconference>unconference style
424 conference</a>, which basically meant that it was our job to decide what
425 we want to talk about.
426 </p><p>
427 It turned out to be pretty hard, because there was so much we wanted to
428 discuss, and because we wanted to get to know each other, and we wanted to
429 do some hacking.
430 </p><p>
431 So to help us decide what subjects, and in which order we wanted to have
432 scheduled, Shawn opened a series on <a href=http://moderator.appspot.com/>
433 Google Moderator</a>, a nifty, yet simple application which allows a group
434 to agree quickly on an agenda.
435 </p><p>
436 It worked quite well; However, that little saboteur displayed his sense of
437 humor so overtly that some entertaining Gitter put the question "Should Sverre
438 wear a hat?" on the agenda.
439 </p><p>
440 Sure enough, the subject got voted up, and eventually, we got Sverre a hat:
441 </p><p>
442 <center><img src=dscho.git?a=blob_plain;hb=30319f7436828cd15db8a531a0057351d8e361c0;f=sverre-hat.jpg sverre-hat.jpg></center>
443 </p><p>
444 By the way, another thing I like about this blog engine is that there are no
445 comments... Nothing is more annoying than leaving a comment on a blog,
446 forgetting about it for a few months, and then finding somebody answered
447 ages ago.
448 </p><p>
449 Update: Sverre says it was dsymonds idea.
450 </p>
451 <h6>Thursday, 22nd of January, Anno Domini MMIX, at the hour of the Dragon</h6>
452 <a name=1232604722>
453 <h2>Let there be images!</h2>
456 </p><p>
457 One of the most important features of blogs is the ability to insert images.
458 So what would this blog be, if it could not present something that says
459 more than a thousand words?
460 </p><p>
461 So here it goes, my first picture in this blog, taken from my Google Tech
462 Talk in Mountain View:
463 </p><p>
464 <center><img src=dscho.git?a=blob_plain;hb=85b89d1cd73acd65ca4381be901d50287dde8170;f=all-your-rebase.png width=500px></center>
465 </p><p>
466 Now this blog starts to look like a real blog...
467 </p>
468 <h6>Thursday, 22nd of January, Anno Domini MMIX, at the hour of the Rabbit</h6>
469 <a name=1232599693>
470 <h2>My blog has style</h2>
473 </p><p>
474 It is official. The blog has a style sheet now.
475 </p><p>
476 The major problem was how to design the system such that it would work
477 both locally and on <a href=http://repo.or.cz>repo.or.cz</a> via gitweb.
478 </p><p>
479 Basically, I realized that I'd need a dry run mode anyway, to prevent
480 all my failed attemp.. oops, I meant, to prevent an accidental push
481 when I am at an, ahem, intermediate state of the 'blog' branch.
482 </p><p>
483 Therefore, I could write a different file locally, which I can load
484 into my venerable Firefox.
485 </p><p>
486 The next plans with my new toy are to enable an easy way to support
487 showing images, and then maybe a table of contents. External links
488 would be cool (<a href=http://repo.or.cz>repo.or.cz</a> does not count, it is special-cased), too.
489 </p><p>
490 And later maybe a cut-off, with automatic generation of links to older
491 posts. Hmm, for those, I'll have to change the URL to include the
492 current commit name, so that the images will be found, too...
493 </p><p>
494 Which in turn means that I'll have to parse the source for new
495 images first, so that they can be in the commit that index.html
496 will link to, <u>before</u> it gets committed. Oh well, that cannot be
497 helped! &#x263a;
498 </p>
499 <h6>Thursday, 22nd of January, Anno Domini MMIX, at the hour of the Tiger</h6>
500 <a name=1232589695>
501 <h2>My new blog system... bloGit</h2>
504 </p><p>
505 Nowadays, you got to have your blog. Or better: your blogs. Even Junio
506 blogs about Git.
507 </p><p>
508 So I felt a little left behind, having no blog to show off. But then
509 I read about this fantastic new website on the mailing list, called
510 <i>git planet</i> which was supposed to be a place where you could have your
511 Git located blog.
512 </p><p>
513 Except that you could not have your blog <u>there</u>. Instead, it is just an
514 aggregator site.
515 </p><p>
516 I was disappointed.
517 </p><p>
518 But then, I had this (in my humble opinion very cute) idea that I already used to "publish"
519 my slides from the talk "Contributing with Git (AKA All your rebase are
520 belong to us)": back then, I just created a new branch, committed the
521 file, and uploaded the result to <a href=http://repo.or.cz>repo.or.cz</a>, to be downloaded via Gitweb.
522 </p><p>
523 So I asked Pasky via IRC, if he would have any objections if I abused
524 <a href=http://repo.or.cz>repo.or.cz</a> as a blog server. He understood at once, and found it "sounds
525 like a pretty cool idea".
526 </p><p>
527 Of course, just writing plain HTML and committing that is <i>too easy</i>,
528 therefore I decided to write a shell script that would turn some sort
529 of simple text file into proper HTML, commit it, and upload the result.
530 </p><p>
531 Well, about two hours later, I finished the first version of the script
532 turning plain text with minimal markup into an HTML page, and it obviously
533 worked -- otherwise nobody would be able to read this &#x263a;
534 </p>
535 </div>
536 </body>
537 </html>