projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-rev-list: split out commit limiting from main() too.
[git.git]
/
diff-tree.c
diff --git
a/diff-tree.c
b/diff-tree.c
index
db37aa7
..
a6d358f
100644
(file)
--- a/
diff-tree.c
+++ b/
diff-tree.c
@@
-44,10
+44,12
@@
static const unsigned char *extract(void *tree, unsigned long size, const char *
int len = strlen(tree)+1;
const unsigned char *sha1 = tree + len;
const char *path = strchr(tree, ' ');
int len = strlen(tree)+1;
const unsigned char *sha1 = tree + len;
const char *path = strchr(tree, ' ');
+ unsigned int mode;
- if (!path || size < len + 20 || sscanf(tree, "%o",
modep
) != 1)
+ if (!path || size < len + 20 || sscanf(tree, "%o",
&mode
) != 1)
die("corrupt tree file");
*pathp = path+1;
die("corrupt tree file");
*pathp = path+1;
+ *modep = DIFF_FILE_CANON_MODE(mode);
return sha1;
}
return sha1;
}