projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53bca91
)
index_fd(): convert blob only if it is a regular file.
author
Junio C Hamano
<junkio@cox.net>
Wed, 28 Feb 2007 19:57:39 +0000
(11:57 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 28 Feb 2007 20:00:00 +0000
(12:00 -0800)
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c
patch
|
blob
|
history
diff --git
a/sha1_file.c
b/sha1_file.c
index fe73904cbed4b10af46a4f85b58b1943d5d69295..6d0a72ed093d353a672129f7e460d0c1015212d7 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-2071,7
+2071,7
@@
int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,
/*
* Convert blobs to git internal format
*/
- if (
type == OBJ_BLOB
) {
+ if (
(type == OBJ_BLOB) && S_ISREG(st->st_mode)
) {
unsigned long nsize = size;
char *nbuf = buf;
if (convert_to_git(path, &nbuf, &nsize)) {