diff options
author | Junio C Hamano <junkio@cox.net> | 2007-02-28 11:57:39 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-28 12:00:00 -0800 |
commit | d0d8e14d1bad5f5ad3fb27a6ac819ff4e7006f03 (patch) | |
tree | f6219df5fd5a1f06a10be87fdd300ee676e580b6 | |
parent | index_fd(): pass optional path parameter as hint for blob conversion (diff) | |
download | tgif-d0d8e14d1bad5f5ad3fb27a6ac819ff4e7006f03.tar.xz |
index_fd(): convert blob only if it is a regular file.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | sha1_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c index fe73904cbe..6d0a72ed09 100644 --- 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)) { |