1. Stefan Saasen
  2. git-in-haskell-from-the-bottom-up

Commits

Stefan Saasen  committed 72e0810

Use isMsbSet function in Delta.runCommand

  • Participants
  • Parent commits c3120fe
  • Branches master

Comments (0)

Files changed (1)

File src/Git/Delta.hs

View file
 -- restore the target buffer
 runCommand :: Word8 -> B.ByteString -> B.ByteString -> t -> Get B.ByteString
 runCommand cmd acc source delta = do
-    toAdd <- if cmd .&. 0x80 /= 0 then
+    toAdd <- if isMsbSet cmd then
         copyCommand cmd source
     else
         insertCommand cmd