1. 05 Nov, 2018 4 commits
    • apply: handle exact renames · 6fecf4d1
      Deltas containing exact renames are special; they simple indicate that a
      file was renamed without providing additional metadata (like the
      filemode).  Teach the reader to provide the file mode and use the
      preimage's filemode in the case that the delta does not provide one.)
      Edward Thomson committed
    • reader: free is unused and unnecessary · 52e27b84
      None of the reader implementations actually allocate anything
      themselves, so they don't need a free function.  Remove it.
      Edward Thomson committed
    • reader: optionally validate index matches workdir · 0f4b2f02
      When using a workdir reader, optionally validate that the index contents
      match the working directory contents.
      Edward Thomson committed
    • apply: use preimage as the checkout baseline · 5b8d5a22
      Use the preimage as the checkout's baseline.  This allows us to support
      applying patches to files that are modified in the working directory
      (those that differ from the HEAD and index).  Without this, files will
      be reported as (checkout) conflicts.  With this, we expect the on-disk
      data when we began the patch application (the "preimage") to be on-disk
      during checkout.
      
      We could have also simply used the `FORCE` flag to checkout to
      accomplish a similar mechanism.  However, `FORCE` ignores all
      differences, while providing a preimage ensures that we will only
      overwrite the file contents that we actually read.
      
      Modify the reader interface to provide the OID to support this.
      Edward Thomson committed
  2. 04 Nov, 2018 1 commit