Merge with http://members.cox.net/junkio/git-jc.git
[git.git] / diff-tree-helper.c
index 621f90a..51bb658 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2005 Junio C Hamano
  */
+#include <limits.h>
 #include "cache.h"
 #include "strbuf.h"
 #include "diff.h"
@@ -35,7 +36,7 @@ static int parse_oneside_change(const char *cp, struct diff_spec *one,
        if (strncmp(cp, "\tblob\t", 6))
                return -1;
        cp += 6;
-       if (get_sha1_hex(cp, one->u.sha1))
+       if (get_sha1_hex(cp, one->blob_sha1))
                return -1;
        cp += 40;
        if (*cp++ != '\t')
@@ -83,13 +84,13 @@ static int parse_diff_tree_output(const char *buf,
                if (strncmp(cp, "\tblob\t", 6))
                        return -1;
                cp += 6;
-               if (get_sha1_hex(cp, old.u.sha1))
+               if (get_sha1_hex(cp, old.blob_sha1))
                        return -1;
                cp += 40;
                if (strncmp(cp, "->", 2))
                        return -1;
                cp += 2;
-               if (get_sha1_hex(cp, new.u.sha1))
+               if (get_sha1_hex(cp, new.blob_sha1))
                        return -1;
                cp += 40;
                if (*cp++ != '\t')