Make sure the empty tree exists when needed in merge-recursive.
[gitweb.git] / index-pack.c
index 8331d99a62a457cb341a834792aedf5de9c5625f..6d6c92bf14803923f4c98678ae682aef4d41d3ab 100644 (file)
@@ -96,7 +96,7 @@ static void flush(void)
                if (output_fd >= 0)
                        write_or_die(output_fd, input_buffer, input_offset);
                SHA1_Update(&input_ctx, input_buffer, input_offset);
-               memcpy(input_buffer, input_buffer + input_offset, input_len);
+               memmove(input_buffer, input_buffer + input_offset, input_len);
                input_offset = 0;
        }
 }