<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2009-04-08:20791</id>
  <title>Philip Newton's journal</title>
  <subtitle>Philip Newton</subtitle>
  <author>
    <name>Philip Newton</name>
  </author>
  <link rel="alternate" type="text/html" href="https://pne.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://pne.dreamwidth.org/data/atom"/>
  <updated>2011-12-09T20:29:44Z</updated>
  <dw:journal username="pne" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2009-04-08:20791:973315</id>
    <link rel="alternate" type="text/html" href="https://pne.dreamwidth.org/973315.html"/>
    <link rel="self" type="text/xml" href="https://pne.dreamwidth.org/data/atom/?itemid=973315"/>
    <title>Yay for git!</title>
    <published>2011-12-09T20:29:44Z</published>
    <updated>2011-12-09T20:29:44Z</updated>
    <category term="git"/>
    <dw:mood>grateful</dw:mood>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;So I’m working on a font in FontForge for several days, when suddenly the program crashes. OK, not the first time, so I restart: and am greeted with an error message (“Internal Error: Invalid 2nd order spline in SplineRefigure2”). Oops, what now.&lt;/p&gt;

&lt;p&gt;Apparently, that happens when the quadratic splines which are internally represented as cubic splines end up not being a valid quadratic spline after all. But how to fix that?&lt;/p&gt;

&lt;p&gt;Now I was happy that I had added the file to a local git repository and had been committing regularly, typically after every letter. So I could have gone back in time until a good place and then started redoing my work without the bad letter(s). Annoying, but possible.&lt;/p&gt;

&lt;p&gt;But enter &lt;code&gt;git bisect&lt;/code&gt;! That identified the single bad commit for me (the letter &lt;b&gt;R&lt;/b&gt;, for what it’s worth).&lt;/p&gt;

&lt;p&gt;And then &lt;code&gt;git rebase -i&lt;/code&gt; let me reply the series of commits from &lt;b&gt;T&lt;/b&gt; to the end onto &lt;b&gt;Q&lt;/b&gt; (the last good one), so the end result was the same as before, except minus the bad commit. (I had two conflicts along the way, but they were easily resolved.)&lt;/p&gt;

&lt;p&gt;So yay! It seems that the error was only in the &lt;b&gt;R&lt;/b&gt;. And it’s much less annoying to redraw one letter than a whole bunch!&lt;/p&gt;

&lt;p&gt;Git saves the day!&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=pne&amp;ditemid=973315" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
