Sourceforge layout changed
[git/dscho.git] / index.html
blob547fb65b247bb921df328b4a057e9965f240e29f
1 <html>
2 <head>
3 <title>Dscho's Git log</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=c33212b23b2b3e45c14403efe82cabb1cd53f6e3;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 Git log</h1>
10 <div style="position:absolute;top:50px;left:810px;width=400px">
11 <table width=400px bgcolor=#e0e0e0 border=0>
12 <tr><th>Table of contents:</th></tr>
13 <tr><td>
14 <p><ul>
15 <li><a href=#1249835938>09 Aug 2009 The dilemma of being correct</a>
16 <li><a href=#1245419588>19 Jun 2009 The GraphGUI project</a>
17 <li><a href=#1242408298>15 May 2009 Wasting way too much time on msysGit</a>
18 <li><a href=#1241995759>11 May 2009 Working on jgit diff</a>
19 <li><a href=#1239975597>17 Apr 2009 No time for Git</a>
20 <li><a href=#1238970571>06 Apr 2009 How to recover from a hackathon</a>
21 <li><a href=#1236554268>09 Mar 2009 So, what is missing from my <i>rebase-i-p</i> branch?</a>
22 <li><a href=#1236479389>08 Mar 2009 New Git for Windows version</a>
23 <li><a href=#1235092615>20 Feb 2009 Code reviews</a>
24 <li><a href=#1234409395>12 Feb 2009 Interactive <i>rebase</i> just learnt a new command: <i>topic</i></a>
25 </ul></p>
26 <a href=dscho.git?a=blob_plain;hb=d328cccacc66bc5d183790eebcf5a3334830ab55;f=index.html>Older posts</a>
27 </td></tr></table>
28 <br>
29 <div style="text-align:right;">
30 <a href="dscho.git?a=blob_plain;hb=blog;f=blog.rss"
31 title="Subscribe to my RSS feed"
32 class="rss" rel="nofollow"
33 style="background-color:orange;text-decoration:none;color:white;font-family:sans-serif;">RSS</a>
34 </div>
35 <br>
36 <table width=400px bgcolor=#e0e0e0 border=0>
37 <tr><th>About this blog:</th></tr>
38 <tr><td>
39 <p>It is an active <a href=http://repo.or.cz/w/git/dscho.git?a=blob_plain;f=index.html;hb=5f002cab57a837125a8f901bcd1f3c1477bc3119>abuse</a> of <a href=http://repo.or.cz/>repo.or.cz</a>,
40 letting gitweb unpack the objects in the current tip of the branch <i>blog</i>,
41 including the images and the RSS feed.
42 </p><p>
43 Publishing means running a script that collects the posts, turns them into
44 HTML, makes sure all the images are checked in, and pushes the result.
45 </p><p>
46 This blog also serves to grace the world with Dscho's random thoughts on and
47 around Git.
48 </p>
49 </td></tr></table>
50 <br>
51 <table width=400px bgcolor=#e0e0e0 border=0>
52 <tr><th>Links:</th></tr>
53 <tr><td>
54 <ul>
55 <li> <a href=http://git-scm.com/>Git's homepage</a>
56 <li> <a href=http://gitster.livejournal.com/>Junio's blog</a>
57 <li> <a href=http://www.spearce.org/>Shawn's blog</a> seems to be sitting
58 idle ever since he started working for Google...
59 <li> <a href=http://torvalds-family.blogspot.com/>Linus' blog</a> does not
60 talk much about Git...
61 <li> Scott Chacon's <a href=http://whygitisbetterthanx.com/>Why Git is better
62 than X</a> site
63 <li> <a href=http://vilain.net/>The blog of mugwump</a>
64 <li> <a href=http://merlyn.vox.com/>Merlyn's blog</a>
65 <li> <a href=http://blogs.gnome.org/newren/>Elijah Newren</a> chose the
66 same path as Cogito, offering an alternative porcelain (an approach
67 that is doomed in my opinion)
68 <li> <a href=http://msysgit.googlecode.com/>The msysGit project</a>, a (mostly)
69 failed experiment to lure the many Windows developers out there to
70 contribute to Open Source for a change.
71 </ul>
72 </td></tr></table>
73 <br>
74 <table width=400px bgcolor=#e0e0e0 border=0>
75 <tr><th>Google Ads:</th></tr>
76 <tr><td>
77 <script type="text/javascript"><!--
78 google_ad_client = "pub-5106407705643819";
79 /* 300x250, created 1/22/09 */
80 google_ad_slot = "6468207338";
81 google_ad_width = 300;
82 google_ad_height = 250;
83 //-->
84 </script>
85 <script type="text/javascript"
86 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
87 </script>
88 </td></tr></table>
89 </div>
90 <h6>Sunday, 9th of August, Anno Domini MMIX, at the hour of the Rooster</h6>
91 <a name=1249835938>
92 <h2>The dilemma of being correct</h2>
94 <p>
95 </p><p>
96 So I am opinionated. No news there. The problem of being opinionated, though,
97 is that people do not take you seriously even if you are correct.
98 </p><p>
99 For example, I vividly remember having had concerns about the Git wrapper
100 being linked to <a href=http://curl.haxx.se/>cURL</a>, and I vividly remember
101 that our maintainer did not have such concerns and took Daniel's patch. I could
102 not find proof of my public comment quickly enough to add a link here, though.
103 </p><p>
104 Alas, there are serious problems with being correct:
105 </p><p>
106 <ol>
107 <li>If you're correct, you waste a lot of time trying to convince people (but
108 they ignore you nevertheless),
109 <li>Other people are regularly p*ssed off, especially when they find out
110 (or even worse, when it is pointed out to them) that they were wrong, and
111 <li>You can buy <u>nothing</u> for having been correct.
112 </ol>
113 </p><p>
114 It is a lose-lose situation.
115 </p><p>
116 In the current context, I am pretty certain that the rev cache and the pack
117 index are so similar in nature that we'll find quite a few issues that we had
118 with one repeated with the other.
119 </p><p>
120 As I <u>hate</u> losing time over a discussion others try to "win" -- which
121 invariably means that they refuse to be convinced of anything disagreeing with
122 their opinion &#x263a; -- I will just shut up, and probably have one or two odd
123 feelings when it turns out I was right.
124 </p>
125 <h6>Friday, 19th of June, Anno Domini MMIX, at the hour of the Monkey</h6>
126 <a name=1245419588>
127 <h2>The GraphGUI project</h2>
130 </p><p>
131 After a few unfortunate delays (and some fortunate ones, just not for us), the
132 GraphGUI project finally takes off. A quick first glance:
133 </p><p>
134 <center><img src=dscho.git?a=blob_plain;hb=c33212b23b2b3e45c14403efe82cabb1cd53f6e3;f=basic-gui.jpg basic-gui.jpg></center>
135 </p><p>
136 The delays were a bit unnerving, but the student is really bright and still
137 has the chance to pull the project off.
138 </p><p>
139 Next plans are to show text, too, to invent a rudimentary layout engine that
140 can be adjusted manually (this is in contrast to <i>gitk</i> or <i>log --graph</i>).
141 </p><p>
142 After that, integration into JGit (this probably triggered the eGit/JGit
143 split).
144 </p><p>
145 And then we'll go wild!
146 </p>
147 <h6>Friday, 15th of May, Anno Domini MMIX, at the hour of the Dog</h6>
148 <a name=1242408298>
149 <h2>Wasting way too much time on msysGit</h2>
152 </p><p>
153 I recently got into the bad habit of spending a large amount of my waking
154 hours working on msysGit, more than is really healthy for me.
155 </p><p>
156 For example, I spent the whole morning -- when I should have worked on a
157 very important day-job project -- on trying to fix issue 258, where
158 <i>git web--browse</i> does not work as expected because of quoting issues
159 with cmd.exe.
160 </p><p>
161 This is reducing my Git time budget to negative numbers, so much so that I
162 cannot even work on Git projects that I actually like, such as <i>jgit diff</i>
163 or <i>git rebase -i -p</i>, or at least projects I felt obliged to continue
164 to work on, such as <i>git notes</i>.
165 </p><p>
166 Now, some people who tried to teach me some time management strongly
167 criticized me for ignoring their lessons, and unfortunately, I have to agree.
168 </p><p>
169 The problem is that I would <u>hate</u> to see msysGit fall to the same state it
170 was after I stopped working on it last year. I started it, and I would like
171 it to grow, but too few people took care of the issue tracker, too few tried
172 to debug their problems themselves, too few submitted fixes.
173 </p><p>
174 I note, though, that there is a positive trend. But being the impatient person
175 I am ("2 seconds is my attention span") I tend to want the trend to be more
176 impressive.
177 </p><p>
178 Anyway, no work on msysGit for at least 4 days, that's what the doctor (me)
179 said...
180 </p>
181 <h6>Monday, 11th of May, Anno Domini MMIX, at the hour of the Rat</h6>
182 <a name=1241995759>
183 <h2>Working on jgit diff</h2>
186 </p><p>
187 Shawn did so many useful things that I use on a daily basis that I felt really
188 awful when I realized just how <u>long</u> I had promised to clean up that diff
189 implementation I wrote for JGit.
190 </p><p>
191 Alas, it appears that the thing turned out to be almost a complete rewrite, as
192 the original implementation walked the edit graph in a rather inefficient way.
193 </p><p>
194 A little background: Myers' algorithm to generate "an edit script" works on
195 the <i>edit graph</i>: imagine you have all lines of file <i>A</i> as columns and
196 all lines of file <i>B</i> as rows, then the <i>edit graph</i> is a connection of
197 the upper left corner to the lower right corner, containing only horizontal,
198 vertical or diagonal elements, where diagonal elements are only allowed when
199 the lines of both files agree at that point:
200 </p><p>
201 <pre>
202 H E L L O , W O R L D
203 ----
209 --------
210 </pre>
211 </p><p>
212 The <i>shortest</i> edit path minimizes the number of non-diagonal elements.
213 </p><p>
214 Myers' idea is to develop forward and backward paths at the same time
215 (increasing the number of non-diagonal elements uniformly), storing
216 only the latest end points. Once the paths meet, divide and conquer.
217 </p><p>
218 In theory, it would be quicker to store <u>all</u> end points and then just
219 reconstruct the shortest paths, alas, this takes way too much memory.
220 </p><p>
221 My first implementation did not remember start or end of the non-diagonal
222 parts, and had to recurse way more often than really necessary (in the end,
223 we will order the non-diagonal parts into horizontal and vertical parts
224 anyway, so start and end are sufficient).
225 </p><p>
226 The current progress can be seen <a href=http://repo.or.cz/w/egit/dscho.git/>
227 here</a>.
228 </p>
229 <h6>Friday, 17th of April, Anno Domini MMIX, at the hour of the Monkey</h6>
230 <a name=1239975597>
231 <h2>No time for Git</h2>
234 </p><p>
235 It is a shame, but most of my Git time budget is taken by msysGit these
236 days.
237 </p><p>
238 But at least msysGit is moving again; I'll probably write a Herald about
240 </p>
241 <h6>Monday, 6th of April, Anno Domini MMIX, at the hour of the Rat</h6>
242 <a name=1238970571>
243 <h2>How to recover from a hackathon</h2>
246 </p><p>
247 Phew, 2 crazy and fantastic weeks are behind me. But it takes its toll:
248 a weekend I was more offline than online.
249 </p><p>
250 Things that are important now: relax. sleep. take a walk. learn to sleep
251 more than 4 hours a night again. learn to watch a movie without thinking
252 about code. go for a run.
253 </p><p>
254 And after recovering, back to the rebase-i-p branch!
255 </p>
256 <h6>Monday, 9th of March, Anno Domini MMIX, at the hour of the Rat</h6>
257 <a name=1236554268>
258 <h2>So, what is missing from my <i>rebase-i-p</i> branch?</h2>
261 </p><p>
262 I regularly use <i>rebase -i -p</i> these days, to update my personal Git
263 tree (which used to be <i>my-next</i>).
264 </p><p>
265 There are a few things missing before I can start assembling a patch
266 series for submission:
267 </p><p>
268 <ul>
269 <li>I need to handle the commit parents which are outside of the rebased
270 ones properly. In other words, when a commit is picked whose parent is
271 not rebased, it needs to be rebased onto $ONTO.
272 <li>The patch which uses patch-id to generate DROPPED directly also tries to
273 consolidate the handling of DROPPED commits by putting them into REWRITTEN
274 instead of DROPPED, but that breaks the tests. So, this patch needs to be
275 split.
276 <li>I want to introduce one more command, <i>rephrase</i>, which allows you to
277 modify the commit message, and nothing more, and <i>halt</i>, which does the
278 same as <i>edit</i> without <i>pick</i>. Then there needs to be a new test script
279 for those commands, and this will be an early patch series.
280 <li>Time. I need time, desperately. If my day job was not as exciting as it
281 is, I would have more time for Git. As it is, I have to budget my time so
282 that I get anything done at all.
283 </ul>
284 </p><p>
285 These issues have been postponed due to Steffen taking a well-deserved
286 vacation, which means that I have to act as msysGit maintainer again.
287 </p><p>
288 And this coming week, I will have other things to do in all likeliness, so
289 that I expect to be able to submit a <i>rebase -i -p</i> patch series only next
290 week. If not then, due to a heavy workload, it will be postponed to early
291 April.
292 </p><p>
293 Oh well, the joys of being excited by several competing projects! &#x263a;
294 </p>
295 <h6>Sunday, 8th of March, Anno Domini MMIX, at the hour of the Tiger</h6>
296 <a name=1236479389>
297 <h2>New Git for Windows version</h2>
300 </p><p>
301 Phew. That was quite a day, almost exclusively spent on finishing that
302 installer. The worst part: updating GCC seemed not to be such a good idea
303 after all...
304 </p><p>
305 For Windows, we need to use the printf format <i>%I64u</i> (which is
306 non-standard, in the common way of Microsoft) if you want to print 64-bit
307 wide unsigned numbers. The rest of the world accepts the standard <i>%llu</i>.
308 </p><p>
309 After upgrading to the new GCC, a lot of warnings appeared, complaining
310 about <i>%I64u</i>. The warnings went away when I replaced the format with
311 <i>%llu</i>.
312 </p><p>
313 Being the naive I am, I mistook that for a sign that we could finally go
314 more standards-compliant.
315 </p><p>
316 However, it only means that we have to live with the warnings for now, as
317 the C runtime provided on Windows still strongly disagrees with standards
318 (and it has to continue to do so, lest it break existing programs).
319 </p><p>
320 Sigh.
321 </p><p>
322 At least I have the feeling that I caught the most important bugs before
323 releasing.
324 </p>
325 <h6>Friday, 20th of February, Anno Domini MMIX, at the hour of the Buffalo</h6>
326 <a name=1235092615>
327 <h2>Code reviews</h2>
330 </p><p>
331 It has been said that reviewing patches is a most thankless job. As I really
332 like the elegance of Git's source code, and care a lot about it, I did not
333 think that it was thankless, just a little bit tedious (especially when the
334 patch authors mistake criticism for personal attacks).
335 </p><p>
336 Usually, I am pretty good at ignoring insults as responses to my comments;
337 after all, I have a lot more enjoyable things to do than to spend time talking
338 to a guy who shows how wise he is when he thinks that I criticize him
339 <u>personally</u> when I just try to enhance his work, by offering a little bit of
340 my knowledge.
341 </p><p>
342 However, in the last days, three people really seemed to want to insult me,
343 to make me go away, to stop the fun I have with Git.
344 </p><p>
345 And they almost succeeded.
346 </p><p>
347 So I guess it is time to reassess my priorities, and maybe stop reviewing
348 Git patches altogether.
349 </p>
350 <h6>Thursday, 12th of February, Anno Domini MMIX, at the hour of the Tiger</h6>
351 <a name=1234409395>
352 <h2>Interactive <i>rebase</i> just learnt a new command: <i>topic</i></h2>
355 </p><p>
356 Today I am pretty pleased with myself. Two projects at my day job got a real
357 boost, and I implemented a shortcut that avoids the ugly 'bookmark' statement
358 in rebase scripts most of the time.
359 </p><p>
360 A typical rebase script, generated by <i>git rebase -i -p $COMMIT</i> will look
361 something like this:
362 </p><p>
363 <table
364 border=1 bgcolor=black>
365 <tr><td bgcolor=lightblue colspan=3>
366 <pre> </pre>
367 </td></tr>
368 <tr><td>
369 <table cellspacing=5 border=0
370 style="color:white;">
371 <tr><td>
372 <pre>
373 pick 1234567 My first commit
374 topic begin super-cool-feature
375 pick 2345678 The super cool feature
376 pick 3456789 Documentation for the super cool feature
377 topic end super-cool-feature
378 </pre>
379 </td></tr>
380 </table>
381 </td></tr>
382 </table>
383 </p><p>
384 The result will be a merge commit at the HEAD whose first parent is
385 "My first commit", whose second parent is "Documentation for the super
386 cool feature" and whose commit message is "Merge branch 'super-cool-feature'".
387 </p><p>
388 Side note: internally, <i>topic begin $NAME [at $COMMIT]</i> will be handled as if
389 you wrote <i>bookmark merge-parent-of-$NAME; goto $COMMIT</i>, and
390 <i>topic end $NAME [$MESSAGE]</i> will be handled as if you wrote
391 <i>bookmark $NAME; goto merge-parent-of-$NAME; merge parents $NAME [original $MARK Merge branch '$NAME']</i>.
392 </p><p>
393 Of course, being more concise, the 'topic' statement is not only nicer to the
394 eye, but also less error-prone.
395 </p><p>
396 And hopefully many people will agree with me that this rebase script is pretty
397 intuitive.
398 </p>
399 </div>
400 </body>
401 </html>