Philip Newton (pne) wrote,
Philip Newton

  • Mood:

Yay for git!

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.

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?

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.

But enter git bisect! That identified the single bad commit for me (the letter R, for what it’s worth).

And then git rebase -i let me reply the series of commits from T to the end onto Q (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.)

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

Git saves the day!

Tags: git
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded