TMI: Exhaustive (and exhausted)
Aug. 25th, 2012 12:09 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
It's late, so one (or two) brief notes: match check is gone! Huzzah! I will perhaps write a longer post later on about what I learned about non-exhaustive matches, but for now, I'll just say they're a bad idea.
Of course, without any deliberate action, I managed to change the LLVM revision in one of my commits. In trying to revert that change without reverting the whole patch (which would have been tedious, since I would have had to re-commit everything else), I discovered git checkout --patch, which was exactly what I needed (I just had to git checkout --patch the last good revision before my unfortunate change; then say "yes" to the patch undoing my LLVM change, and "no" to the patches undoing all my other changes). How did I not know about this all my life? Anyway, now I'm in love.
Of course, without any deliberate action, I managed to change the LLVM revision in one of my commits. In trying to revert that change without reverting the whole patch (which would have been tedious, since I would have had to re-commit everything else), I discovered git checkout --patch, which was exactly what I needed (I just had to git checkout --patch the last good revision before my unfortunate change; then say "yes" to the patch undoing my LLVM change, and "no" to the patches undoing all my other changes). How did I not know about this all my life? Anyway, now I'm in love.