1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version=
"2.0" xmlns:
atom=
"http://www.w3.org/2005/Atom">
4 <title>Dscho's blog
</title>
5 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html
</link>
6 <atom:link href=
"http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=blog.rss" rel=
"self" type=
"application/rss+xml"/>
7 <description>A few stories told by Dscho
</description>
8 <lastBuildDate>Sun,
25 Jan
2009 14:
29:
08 +
0100</lastBuildDate>
9 <language>en-us
</language>
11 <title>Regular diff with word coloring (as opposed to word diff)
</title>
12 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232888842</link>
13 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232888842</guid>
14 <pubDate>Sun,
25 Jan
2009 14:
07:
22 +
0100</pubDate>
15 <description><![CDATA[Regular diff with word coloring (as opposed to word diff)
17 You know, if I were a bit faster with everything I do, I could do so much more!
19 For example, Junio's idea that you could keep showing a regular diff, only
20 coloring the words that have been removed/deleted.
22 Just imagine looking at the diff of a long line in LaTeX source code. It
23 should be much nicer to the eye to see the complete removed/added sentences
24 instead of one sentence with colored words in between, disrupting your read
27 Compare these two versions:
29 Regular diff with colored words:
31 -This sentence has a
<font color=red
>tyop
</font> in it.
<br>
32 +This sentence has a
<font color=green
>typo
</font> in it.
<br>
37 This sentence has a
<font color=red
>tyop
</font><font color=green
>typo
</font> in it.
<br>
40 And it should not be hard to do at all!
42 In
<i>diff
_words
_show()
</i>, we basically get the minus lines as
43 <i>diff
_words-
>minus
</i> and the plus lines as
<i>diff
_words-
>plus
</i>. The
44 function then prepares the word lists and calls the xdiff engine to do all the
45 hard work, analyzing the result from xdiff and printing the lines in
46 <i>fn
_out
_diff
_words
_aux()
</i>.
48 So all that would have to be changed would be to
<u>record
</u> the positions
49 of the removed/added words instead of outputting them, and at the end printing
50 the minus/plus buffers using the recorded information to color the words.
55 <li>adding two new members holding the offsets in the
<i>diff
_words
</i>
57 <li>having a special handling for that mode in
58 <i>fn
_out
_diff
_words
_aux()
</i> that appends the offsets and
60 <li>adding a function
<i>show
_lines
_with
_colored
_words()
</i> that
61 outputs a buffer with a given prefix ('-' or '+') and coloring the words at
62 given offsets with a given color,
63 <li>modify
<i>diff
_words
_show()
</i> to call that function for the
"special
64 case: only removal" and at the end of the function, and
65 <li> disabling the
<i>fwrite()
</i> at the end of
<i>diff
<u>words
</u>show()
</i> for that
69 Of course, the hardest part is to find a nice user interface for that. Maybe
70 <i>--colored-words
</i>?
☺]]
></description>
73 <title>Ideas for a major revamp of the
<i>--preserve-merges
</i> handling in
<i>git rebase
</i></title>
74 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232828715</link>
75 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232828715</guid>
76 <pubDate>Sat,
24 Jan
2009 21:
25:
15 +
0100</pubDate>
77 <description><![CDATA[Ideas for a major revamp of the
<i>--preserve-merges
</i> handling in
<i>git rebase
</i>
79 As probably everybody agrees, the code to preserve merges is a big mess
82 Worse, the whole concept of
"pick <merge-sha1>" just does not fly well.
84 So I started a
<u>major
</u> cleanup, which happens to reduce the code very
87 It will take a few days to flesh out, I guess, but these are the major
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>
98 <blockquote>will reset the HEAD to the given commit.
</blockquote>
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>
111 could yield this TODO script:
122 This should lead to a much more intuitive user experience.
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.]]
></description>
129 <title>Thoughts about
<i>interactive rebase
</i></title>
130 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232778113</link>
131 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232778113</guid>
132 <pubDate>Sat,
24 Jan
2009 07:
21:
53 +
0100</pubDate>
133 <description><![CDATA[Thoughts about
<i>interactive rebase
</i>
135 Somebody mentioned that my
<i>my-next
</i> branch is a mess, as it mixes all
138 That is undeniably true, however, there is a good reason that I do not
139 have a lot of topic branches: I work on more than just one computer.
141 To make sure that I do not lose a commit by mistake, I always
<i>rebase -i
</i>
142 the
<i>my-next
</i> branch of the computer I happen to work on on top of the
143 <i>my-next
</i> branch I fetch from
<a href=http://repo.or.cz
>repo.or.cz
</a>.
145 To rebase a lot of topic branches at the same time seems a bit complicated.
146 But that is actually what the
<i>-p
</i> option (preserve merges) is all about.
148 The only problem is that the code for
<i>rebase -i -p
</i> has been messed up
149 recently, quite successfully, I might add.
151 Worse, some people are pushing for a completely and total unintuitive syntax.
153 So maybe I will start to work on
<i>-p
</i> again, for my own use (I should learn
154 to heed the principle more: work on things I can use myself).
156 My current idea is to implement a
"goto" statement that will jump to another
157 commit. To make it easily usable, I will add the semantics that
"goto" will
158 always try to go to the
<u>rewritten
</u> version of the given commit; if the user
159 wanted to have the original commit, she has to paste the unabbreviated commit
162 The more I think about it, the more I actually like this idea
☺
164 Of course, working on this little project means that I will have to cope with
165 that ugly code again. *urgh*]]
></description>
168 <title>Git Logos
</title>
169 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232745071</link>
170 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232745071</guid>
171 <pubDate>Fri,
23 Jan
2009 22:
11:
11 +
0100</pubDate>
172 <description><![CDATA[Git Logos
174 The other day, when I did not exactly have too much time on my hands, but
175 definitely too much motivation, I played around creating several logos.
177 An ambigram (if you turn it
180 degrees around the appropriate axis, it looks
178 exactly the same as unrotated):
184 <embed type=
"image/svg+xml"
185 src=
"dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-ambigram.svg" width=
317 />
190 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-ambigram.svg
>git-ambigram.svg
</a>
202 <embed type=
"image/svg+xml"
203 src=
"dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-gitk-logo.svg" width=
325 />
208 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-gitk-logo.svg
>git-gitk-logo.svg
</a>
214 A play on the test you have to go through before getting new glasses:
220 <embed type=
"image/svg+xml"
221 src=
"dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-visual-test.svg" width=
325 />
226 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-visual-test.svg
>git-visual-test.svg
</a>
232 This is Henrik Nyh's logo (converted to .svg by yours truly):
238 <embed type=
"image/svg+xml"
239 src=
"dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=gitlogo.svg" width=
165 />
244 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=gitlogo.svg
>gitlogo.svg
</a>
250 And of course, the original logo...
256 <embed type=
"image/svg+xml"
257 src=
"dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=original-git-logo.svg" width=
165 />
262 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=original-git-logo.svg
>original-git-logo.svg
</a>
268 Maybe some of you have fun with them...]]
></description>
271 <title>How to deal with files that are not source code when merging
</title>
272 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232742582</link>
273 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232742582</guid>
274 <pubDate>Fri,
23 Jan
2009 21:
29:
42 +
0100</pubDate>
275 <description><![CDATA[How to deal with files that are not source code when merging
277 Last week, one of the mentors of last year's
<a href=http://code.google.com/soc
>
278 Summer of Code
</a> mentioned the idea that merge strategies are in dear need
279 for file types other than source code.
281 I think this idea is awesome, even if I cannot bring myself to believe that
282 any of the file types would make a good Summer of Code project: either they
283 are too complicated (think raster images such as .png or even .jpg), or they
284 are too straight-forward (think LaTeX, where all that is needed is a good
285 graphical user interface to inspect the three versions:
<i>ours
</i>,
<i>baseline
</i>
288 The LaTeX idea would be a good project for me to mentor, though: I have a
289 pretty clear idea how it should be done; I just lack the time (and motivation)
292 As for OpenOffice text documents, vector graphics (such as .svg), or more
293 specific data such as spreadsheets, I think that all of these are really
294 difficult: the problem is not so much the implementation (i.e. the programming
295 part of it), but the design.
297 This design should involve much more than a Summer of Code project is about:
298 you would need to survey users' expectations, and at least the mentor -- if
299 not the student -- would need to be an expert in usability questions, which
300 is rather unlikely in the realm of Open Source.
302 Maybe this is the missing part in Open Source: we have many brilliant
303 programmers, but next to nobody with a good idea how to design intuitive
306 That might be related to the fact that brilliant software engineers, as they
307 can be found in Open Source, are not exactly known for their social skills,
308 a human trait that seems to be a very important prerequisite for designing
309 intuitive user interfaces.
311 Well, I have
<a href=http://git.or.cz/gitwiki/SoC2009Ideas#head-
6188833471f79f277e162ef9fbe1592aa10b5f6c
>
312 added
</a> the proposal to Git's Summer of Code idea page on the Git Wiki; We will
313 see what comes out of it.]]
></description>
316 <title>The UGFWIINI contest
</title>
317 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232626236</link>
318 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232626236</guid>
319 <pubDate>Thu,
22 Jan
2009 13:
10:
36 +
0100</pubDate>
320 <description><![CDATA[The UGFWIINI contest
322 Just in case somebody finds this blog, here is a challenge. Inspired by my
323 own little hack (this blog), I announce the
"Using Git For What It Is Not
326 And it is especially cool, since the acronym sounds cool! You might miss
327 this fact if you do no know that I pronounce the
"F" like an
"A" so that
330 This will be a running contest; whenever I have
10 valid applications, I
331 will announce a winner on the Git mailing list.
333 So, what accounts for a valid application?
336 <li> You must use a Git program (the term is used loosely here, GitWeb is
337 considered a Git program, for example).
338 <li> The program must be intended for something completely different than
339 what you are using it for. E.g. GitWeb -- which was intended to let
340 you browse through the history using your web browser -- is used
341 to serve a blog to the wide world.
342 <li> You must be able to prove that you actually used the Git program to
343 the purpose you claim, preferably in a live demonstration like this
345 <li> Nobody and nothing must be harmed in the process (except your
346 laughing muscle, that's okay).
349 So, how does such an abuse look like?
352 <li> ... like this blog.
353 <li> Managing your mail (in maildir format) in a Git repository.
354 <li> Finding duplicate files by
356 border=
1 bgcolor=white
>
357 <tr><td bgcolor=lightblue colspan=
3>
361 <table cellspacing=
5 border=
0
362 style=
"color:black;">
367 $ git ls-files --stage | sort -k2 | uniq -d -s7 -w40
373 <li> Abusing the Git alias mechanism to call scripts defined directly in
377 I am really looking forward to all of your submissions... *chuckles*
378 </p><p>]]
></description>
381 <title>Top-posting
</title>
382 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232611542</link>
383 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232611542</guid>
384 <pubDate>Thu,
22 Jan
2009 09:
05:
42 +
0100</pubDate>
385 <description><![CDATA[Top-posting
387 Okay, last post for a while. But this is something that is nagging me
388 tremendously. I should probably just let go, but in my deepest inner self,
389 really close to my heart, I refuse to believe that any human beings could
390 be incapable of certain degrees of reason.
392 Take the example of top-posting. Everybody who read a top-posted email
393 knows that you have to scroll down, possibly weeding through tons of
394 pages to find out what the heck the author of the last reply was replying
397 Never mind that it would take the author of the reply just a couple of
398 seconds to remove all the irrelevant stuff -- as she already knows what
399 is the relevant part, saving minutes, in case of mailing lists hours,
400 easily, to the readers who otherwise would have to discern what is
401 irrelevant and what is relevant first.
403 It is a horrible time waste. But of course not for the top-poster.
405 The problem is that I frequently run into such people, and when I write
406 them a polite mail, explaining to them that it is impolite to top-post,
407 and why, the answers I get sometimes make me check if the sky is still up
408 and the earth down. Yesterday was an example of such a dubitable
411 Most funny are the ridiculous attempts by those persons at explaining why
412 top-posting is
<i>so
</i> much superior to anything else.
414 Which is good, because if they were not that funny, they would be pretty sad.]]
></description>
417 <title>Sverre's hat
</title>
418 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232607201</link>
419 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232607201</guid>
420 <pubDate>Thu,
22 Jan
2009 07:
53:
21 +
0100</pubDate>
421 <description><![CDATA[Sverre's hat
423 The fun part about a blog is that you can talk about less technical stuff.
424 For example, Sverre's hat.
426 Let me start a bit earlier, so that you get the context.
428 Last year, at the
<a href=http://git.or.cz/gitwiki/GitTogether
>GitTogether
</a>,
429 we had an
<a href=http://en.wikipedia.org/wiki/Unconference
>unconference style
430 conference
</a>, which basically meant that it was our job to decide what
431 we want to talk about.
433 It turned out to be pretty hard, because there was so much we wanted to
434 discuss, and because we wanted to get to know each other, and we wanted to
437 So to help us decide what subjects, and in which order we wanted to have
438 scheduled, Shawn opened a series on
<a href=http://moderator.appspot.com
/>
439 Google Moderator
</a>, a nifty, yet simple application which allows a group
440 to agree quickly on an agenda.
442 It worked quite well; However, that little saboteur displayed his sense of
443 humor so overtly that some entertaining Gitter put the question
"Should Sverre
444 wear a hat?" on the agenda.
446 Sure enough, the subject got voted up, and eventually, we got Sverre a hat:
448 <center><img src=dscho.git?a=blob_plain;hb=
30319f7436828cd15db8a531a0057351d8e361c0;f=sverre-hat.jpg sverre-hat.jpg
></center>
450 By the way, another thing I like about this blog engine is that there are no
451 comments... Nothing is more annoying than leaving a comment on a blog,
452 forgetting about it for a few months, and then finding somebody answered
455 Update: Sverre says it was dsymonds idea.]]
></description>
458 <title>Let there be images!
</title>
459 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232604722</link>
460 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232604722</guid>
461 <pubDate>Thu,
22 Jan
2009 07:
12:
02 +
0100</pubDate>
462 <description><![CDATA[Let there be images!
464 One of the most important features of blogs is the ability to insert images.
465 So what would this blog be, if it could not present something that says
466 more than a thousand words?
468 So here it goes, my first picture in this blog, taken from my Google Tech
469 Talk in Mountain View:
471 <center><img src=dscho.git?a=blob_plain;hb=
85b89d1cd73acd65ca4381be901d50287dde8170;f=all-your-rebase.png width=
500px
></center>
473 Now this blog starts to look like a real blog...]]
></description>
476 <title>My blog has style
</title>
477 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232599693</link>
478 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#
1232599693</guid>
479 <pubDate>Thu,
22 Jan
2009 05:
48:
13 +
0100</pubDate>
480 <description><![CDATA[My blog has style
482 It is official. The blog has a style sheet now.
484 The major problem was how to design the system such that it would work
485 both locally and on
<a href=http://repo.or.cz
>repo.or.cz
</a> via gitweb.
487 Basically, I realized that I'd need a dry run mode anyway, to prevent
488 all my failed attemp.. oops, I meant, to prevent an accidental push
489 when I am at an, ahem, intermediate state of the 'blog' branch.
491 Therefore, I could write a different file locally, which I can load
492 into my venerable Firefox.
494 The next plans with my new toy are to enable an easy way to support
495 showing images, and then maybe a table of contents. External links
496 would be cool (
<a href=http://repo.or.cz
>repo.or.cz
</a> does not count, it is special-cased), too.
498 And later maybe a cut-off, with automatic generation of links to older
499 posts. Hmm, for those, I'll have to change the URL to include the
500 current commit name, so that the images will be found, too...
502 Which in turn means that I'll have to parse the source for new
503 images first, so that they can be in the commit that index.html
504 will link to,
<u>before
</u> it gets committed. Oh well, that cannot be
505 helped!
☺]]
></description>