made RSS title and description configurable
[git/dscho.git] / index.html
blob21be0503130de6a40df4f35d80dad289f518b306
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=832be85c785c80202f17b87db7f063ae57ec2cac;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=1>
12 <tr><th>Table of contents:</th></tr>
13 <tr><td>
14 <p><ul>
15 <li><a href=#1236554268>09 Mar 2009 So, what is missing from my <i>rebase-i-p</i> branch?</a>
16 <li><a href=#1236479389>08 Mar 2009 New Git for Windows version</a>
17 <li><a href=#1235092615>20 Feb 2009 Code reviews</a>
18 <li><a href=#1234409395>12 Feb 2009 Interactive <i>rebase</i> just learnt a new command: <i>topic</i></a>
19 <li><a href=#1234320806>11 Feb 2009 Thunderbird, oh Thunderbird, you always make my small brain hurt</a>
20 <li><a href=#1234141489>09 Feb 2009 <i>format-patch --thread</i> and Alpine</a>
21 <li><a href=#1234140696>09 Feb 2009 <i>rebase</i> updates</a>
22 <li><a href=#1234040744>07 Feb 2009 The infamous <i>mark</i> command in the <i>rebase</i> command</a>
23 <li><a href=#1233707628>04 Feb 2009 New valgrind series</a>
24 <li><a href=#1233706294>04 Feb 2009 Problems with split-topic-branches.sh</a>
25 </ul></p>
26 <a href=dscho.git?a=blob_plain;hb=f62f49b4faeb477b348f51f3865dc9f4650d3029;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=1>
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=1>
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://blogs.gnome.org/newren/>Elijah Newren</a> chose the
65 same path as Cogito, offering an alternative porcelain (an approach
66 that is doomed in my opinion)
67 <li> <a href=http://msysgit.googlecode.com/>The msysGit project</a>, a (mostly)
68 failed experiment to lure the many Windows developers out there to
69 contribute to Open Source for a change.
70 </ul>
71 </td></tr></table>
72 <br>
73 <table width=400px bgcolor=#e0e0e0 border=1>
74 <tr><th>Google Ads:</th></tr>
75 <tr><td>
76 <script type="text/javascript"><!--
77 google_ad_client = "pub-5106407705643819";
78 /* 300x250, created 1/22/09 */
79 google_ad_slot = "6468207338";
80 google_ad_width = 300;
81 google_ad_height = 250;
82 //-->
83 </script>
84 <script type="text/javascript"
85 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
86 </script>
87 </td></tr></table>
88 </div>
89 <h6>Monday, 9th of March, Anno Domini MMIX, at the hour of the Rat</h6>
90 <a name=1236554268>
91 <h2>So, what is missing from my <i>rebase-i-p</i> branch?</h2>
93 <p>
94 </p><p>
95 I regularly use <i>rebase -i -p</i> these days, to update my personal Git
96 tree (which used to be <i>my-next</i>).
97 </p><p>
98 There are a few things missing before I can start assembling a patch
99 series for submission:
100 </p><p>
101 <ul>
102 <li>I need to handle the commit parents which are outside of the rebased
103 ones properly. In other words, when a commit is picked whose parent is
104 not rebased, it needs to be rebased onto $ONTO.
105 <li>The patch which uses patch-id to generate DROPPED directly also tries to
106 consolidate the handling of DROPPED commits by putting them into REWRITTEN
107 instead of DROPPED, but that breaks the tests. So, this patch needs to be
108 split.
109 <li>I want to introduce one more command, <i>rephrase</i>, which allows you to
110 modify the commit message, and nothing more, and <i>halt</i>, which does the
111 same as <i>edit</i> without <i>pick</i>. Then there needs to be a new test script
112 for those commands, and this will be an early patch series.
113 <li>Time. I need time, desperately. If my day job was not as exciting as it
114 is, I would have more time for Git. As it is, I have to budget my time so
115 that I get anything done at all.
116 </ul>
117 </p><p>
118 These issues have been postponed due to Steffen taking a well-deserved
119 vacation, which means that I have to act as msysGit maintainer again.
120 </p><p>
121 And this coming week, I will have other things to do in all likeliness, so
122 that I expect to be able to submit a <i>rebase -i -p</i> patch series only next
123 week. If not then, due to a heavy workload, it will be postponed to early
124 April.
125 </p><p>
126 Oh well, the joys of being excited by several competing projects! &#x263a;
127 </p>
128 <h6>Sunday, 8th of March, Anno Domini MMIX, at the hour of the Tiger</h6>
129 <a name=1236479389>
130 <h2>New Git for Windows version</h2>
133 </p><p>
134 Phew. That was quite a day, almost exclusively spent on finishing that
135 installer. The worst part: updating GCC seemed not to be such a good idea
136 after all...
137 </p><p>
138 For Windows, we need to use the printf format <i>%I64u</i> (which is
139 non-standard, in the common way of Microsoft) if you want to print 64-bit
140 wide unsigned numbers. The rest of the world accepts the standard <i>%llu</i>.
141 </p><p>
142 After upgrading to the new GCC, a lot of warnings appeared, complaining
143 about <i>%I64u</i>. The warnings went away when I replaced the format with
144 <i>%llu</i>.
145 </p><p>
146 Being the naive I am, I mistook that for a sign that we could finally go
147 more standards-compliant.
148 </p><p>
149 However, it only means that we have to live with the warnings for now, as
150 the C runtime provided on Windows still strongly disagrees with standards
151 (and it has to continue to do so, lest it break existing programs).
152 </p><p>
153 Sigh.
154 </p><p>
155 At least I have the feeling that I caught the most important bugs before
156 releasing.
157 </p>
158 <h6>Friday, 20th of February, Anno Domini MMIX, at the hour of the Buffalo</h6>
159 <a name=1235092615>
160 <h2>Code reviews</h2>
163 </p><p>
164 It has been said that reviewing patches is a most thankless job. As I really
165 like the elegance of Git's source code, and care a lot about it, I did not
166 think that it was thankless, just a little bit tedious (especially when the
167 patch authors mistake criticism for personal attacks).
168 </p><p>
169 Usually, I am pretty good at ignoring insults as responses to my comments;
170 after all, I have a lot more enjoyable things to do than to spend time talking
171 to a guy who shows how wise he is when he thinks that I criticize him
172 <u>personally</u> when I just try to enhance his work, by offering a little bit of
173 my knowledge.
174 </p><p>
175 However, in the last days, three people really seemed to want to insult me,
176 to make me go away, to stop the fun I have with Git.
177 </p><p>
178 And they almost succeeded.
179 </p><p>
180 So I guess it is time to reassess my priorities, and maybe stop reviewing
181 Git patches altogether.
182 </p>
183 <h6>Thursday, 12th of February, Anno Domini MMIX, at the hour of the Tiger</h6>
184 <a name=1234409395>
185 <h2>Interactive <i>rebase</i> just learnt a new command: <i>topic</i></h2>
188 </p><p>
189 Today I am pretty pleased with myself. Two projects at my day job got a real
190 boost, and I implemented a shortcut that avoids the ugly 'bookmark' statement
191 in rebase scripts most of the time.
192 </p><p>
193 A typical rebase script, generated by <i>git rebase -i -p $COMMIT</i> will look
194 something like this:
195 </p><p>
196 <table
197 border=1 bgcolor=black>
198 <tr><td bgcolor=lightblue colspan=3>
199 <pre> </pre>
200 </td></tr>
201 <tr><td>
202 <table cellspacing=5 border=0
203 style="color:white;">
204 <tr><td>
205 <pre>
206 pick 1234567 My first commit
207 topic begin super-cool-feature
208 pick 2345678 The super cool feature
209 pick 3456789 Documentation for the super cool feature
210 topic end super-cool-feature
211 </pre>
212 </td></tr>
213 </table>
214 </td></tr>
215 </table>
216 </p><p>
217 The result will be a merge commit at the HEAD whose first parent is
218 "My first commit", whose second parent is "Documentation for the super
219 cool feature" and whose commit message is "Merge branch 'super-cool-feature'".
220 </p><p>
221 Side note: internally, <i>topic begin $NAME [at $COMMIT]</i> will be handled as if
222 you wrote <i>bookmark merge-parent-of-$NAME; goto $COMMIT</i>, and
223 <i>topic end $NAME [$MESSAGE]</i> will be handled as if you wrote
224 <i>bookmark $NAME; goto merge-parent-of-$NAME; merge parents $NAME [original $MARK Merge branch '$NAME']</i>.
225 </p><p>
226 Of course, being more concise, the 'topic' statement is not only nicer to the
227 eye, but also less error-prone.
228 </p><p>
229 And hopefully many people will agree with me that this rebase script is pretty
230 intuitive.
231 </p>
232 <h6>Wednesday, 11th of February, Anno Domini MMIX, at the hour of the Tiger</h6>
233 <a name=1234320806>
234 <h2>Thunderbird, oh Thunderbird, you always make my small brain hurt</h2>
237 </p><p>
238 There was a lengthy discussion on the Git mailing list about using Thunderbird,
239 a not quite unpopular mailing program, to send inline patches.
240 </p><p>
241 It is really kind of sad that the Thunderbird developers do not see how
242 stubbornly they offend quite a number of people and scare them away from their
243 program. After all, you should try to be liberal in what you accept and strict
244 in what you emit. No, that does not mean that you should force others to
245 switch their mailers because you strictly adher to your philosophy in what you
246 emit, ignoring the rest of the world.
247 </p><p>
248 In any case, I am not affected (as long as I do not get mails from a poor soul
249 stuck with Thunderbird).
250 </p><p>
251 But I was a bit mean to that Thunderbird guy I dragged into the discussion, and
252 he seems really offended.
253 </p><p>
254 So I thought I'd give him a real reason to feel offended: I'll just do his work:
255 </p><p>
256 http://<a href=http://repo.or.cz>repo.or.cz</a>/w/UnFlowedThunderbird.git
257 </p><p>
258 It took my free time of two days, being not a Thunderbird developer myself.
259 Hopefully it works, and hopefully some people will feel really ashamed now.
260 </p>
261 <h6>Monday, 9th of February, Anno Domini MMIX, at the hour of the Buffalo</h6>
262 <a name=1234141489>
263 <h2><i>format-patch --thread</i> and Alpine</h2>
266 </p><p>
267 I started recently to pipe the output of
268 <i>git format-patch --cover-letter --stdout ...</i> directly into the
269 <i>postponed-msgs</i> folder Alpine uses, instead of pasting files into the
270 mailer.
271 </p><p>
272 The idea is to pretend that I continue a postponed mail, but in reality I
273 never wrote it, <i>format-patch</i> did.
274 </p><p>
275 However, I had problems with the <i>--thread</i> option that is implied by
276 <i>--cover-letter</i>. Alpine always generated new message IDs without adjusting
277 the <i>In-reply-to:</i> and <i>References:</i> headers of the other mails.
278 </p><p>
279 Now I found out that the reason is that the <i>Fcc:</i> headers were missing in
280 the mails, and Alpine generated them, making up new message IDs in the process.
281 </p><p>
282 Therefore I have an alias now which sets not only the <i>Fcc:</i> header, but also
283 the <i>To:</i> headers by rewriting the stream using <i>sed</i>. This is slightly
284 ugly, but so is the handling of headers in <i>format-patch</i>: if you thought
285 you could specify arbitrary headers using the command line, you are mistaken:
286 you can do that only by editing the config.
287 </p><p>
288 While at it, I also noticed a bug whereby <i>--thread --in-reply-to=...</i> simply
289 forgets the <i>--thread</i>. Maybe this week I will find time to address this bug.
290 </p>
291 <h6>Monday, 9th of February, Anno Domini MMIX, at the hour of the Buffalo</h6>
292 <a name=1234140696>
293 <h2><i>rebase</i> updates</h2>
296 </p><p>
297 Phew. The last few days, I was mainly chasing bugs I introduced due to being
298 too tired to work on the merge-preserving, interactive <i>rebase</i>.
299 </p><p>
300 But finally I have something I can start working with. After my failed
301 experiment to use git-blame to split topic branches, I will sort the commits
302 in my <i>my-next</i> branch into topic branches manually.
303 </p><p>
304 Then I will add an option to <i>rebase -i -p</i> to rewrite refs which point to
305 rewritten commits, so that I can have branches <i>rebase-i-p</i>, <i>add-e</i>, etc
306 and all of them are automatically updated when I <i>rebase -i -p</i> the <i>my-next</i>
307 branch.
308 </p><p>
309 In the process, not only have I learnt the value of the <i>bookmark</i> command,
310 but made quite a few-much needed cleanups (which make
311 <i>git-rebase--interactive.sh</i> longer, but much more understandable).
312 </p><p>
313 Hopefully Stephan will pick the changes in the "rebase protocol" up, and then
314 we can have a sequencer with which I can start to make a graphical interactive
315 rebase using git-gui. Or gitk.
316 </p><p>
317 Maybe.
318 </p>
319 <h6>Saturday, 7th of February, Anno Domini MMIX, at the hour of the Pig</h6>
320 <a name=1234040744>
321 <h2>The infamous <i>mark</i> command in the <i>rebase</i> command</h2>
324 </p><p>
325 I realized today how easy it is to lose commits with the "merge preserving"
326 mode of the interactive rebase. In my case, it was when I tried to move a
327 bunch of commits from the tip of my branch into a topic branch.
328 </p><p>
329 But after moving the commits, I forgot to update the parent of the merge
330 commit. Possibly a mark command could have helped. The very same command
331 I called a nightmare for usability.
332 </p><p>
333 So I was wrong. Big news. &#x263a;
334 </p><p>
335 However, I think that the syntax "mark :1" is something best left for
336 machine consumption, not for human beings.
337 </p><p>
338 But I have an idea: we could use some garbled commit subject, or in case of
339 merge parents, the merge subject as some human readable title of the mark.
340 </p><p>
341 The rebase script would then look something like this:
342 </p><p>
343 <table
344 border=1 bgcolor=black>
345 <tr><td bgcolor=lightblue colspan=3>
346 <pre> </pre>
347 </td></tr>
348 <tr><td>
349 <table cellspacing=5 border=0
350 style="color:white;">
351 <tr><td>
352 <pre>
353 pick abcdefg Some ultra cool commit
354 bookmark ultra-cool
355 goto upstream
356 pick hijklmn Some other cool commit
357 merge parent ultra-cool Merge 'ultra-cool' into master
358 </pre>
359 </td></tr>
360 </table>
361 </td></tr>
362 </table>
363 </p><p>
364 The good news is: I added code that refuses to finish a rebase when there
365 are commits that were rewritten, but not part of the new HEAD's ancestry.
366 </p>
367 <h6>Wednesday, 4th of February, Anno Domini MMIX, at the hour of the Buffalo</h6>
368 <a name=1233707628>
369 <h2>New valgrind series</h2>
372 </p><p>
373 I spent quite some time cleaning up that patch series, and feel pretty
374 exhausted.
375 </p><p>
376 Granted, the new <i>git rebase -i -p</i> does its job without complaint so far
377 (so much so that I think I'll release a version of my <i>rebase</i> series
378 soonish), but it <u>is</u> a hassle when you have patches that you have a hard
379 time to decide upon the order/commit boundaries.
380 </p><p>
381 For example, I could imagine that the patch making the location of the
382 templates independent of the location of the Git binaries should come
383 <u>before</u> my patch series, and the valgrind specific part should then
384 be squashed into the first valgrind commit.
385 </p><p>
386 Also, it uses two features of valgrind 3.4.0:
387 </p><p>
388 <ul>
389 <li><i>...</i> in the suppression file, and
390 <li><i>--track-origins=yes</i>
391 </ul>
392 </p><p>
393 The latter is actually the reason I am pretty willing to keep the
394 requirement of that valgrind version, as it is really, really useful.
395 </p><p>
396 I guess we will see what happens to it.
397 </p>
398 <h6>Wednesday, 4th of February, Anno Domini MMIX, at the hour of the Buffalo</h6>
399 <a name=1233706294>
400 <h2>Problems with split-topic-branches.sh</h2>
403 </p><p>
404 So my little script that should help me to split my topic branches does
405 not work properly.
406 </p><p>
407 First some background: the idea was to let <i>git blame</i> do the hard work
408 to find overlapping changes, i.e. changes that would conflict when
409 changing the order (or skipping the first change, on which the next builds).
410 </p><p>
411 The first problem with that approach: when lines are <u>removed</u> by one
412 commit, and the next commit touches the same location, <i>git blame</i> does
413 not find that the first commit is required by the second.
414 </p><p>
415 Therefore I introduced a really slow reverse thing which tries to find
416 those commits whose removals survived until the parent of a particular
417 commit, but not further.
418 </p><p>
419 However, it does not work properly. Basically, only context sizes that
420 span the whole files lead to conflict-free topic branches so far.
421 </p><p>
422 As a consequence, I think I'll add an option --sprout to the revision
423 walker which will fake octopus merges (or a series of two-parent merges)
424 whenever it finds a perl of non-merge commits that are theoretically
425 independent, i.e. whose patches apply cleanly.
426 </p>
427 </div>
428 </body>
429 </html>