author | Dmitry Potapov <dpotapov@gmail.com> | |
Sun, 3 Aug 2008 04:39:16 +0000 (08:39 +0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 3 Aug 2008 20:14:35 +0000 (13:14 -0700) | ||
commit | 43df4f86e035056605ceb757029181d7ddee1e7e | |
tree | 8b6e0b8bc97343fc34328fd44bd26bf0d60a165d | tree | snapshot |
parent | 2b603260f325b895baa20867bd45c8e251f19b78 | commit | diff |
teach index_fd to work with pipes
index_fd can now work with file descriptors that are not normal files
but any readable file. If the given file descriptor is a regular file
then mmap() is used; for other files, strbuf_read is used.
The path parameter, which has been used as hint for filters, can be
NULL now to indicate that the file should be hashed literally without
any filter.
The index_pipe function is removed as redundant.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
index_fd can now work with file descriptors that are not normal files
but any readable file. If the given file descriptor is a regular file
then mmap() is used; for other files, strbuf_read is used.
The path parameter, which has been used as hint for filters, can be
NULL now to indicate that the file should be hashed literally without
any filter.
The index_pipe function is removed as redundant.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h | diff | blob | history | |
hash-object.c | diff | blob | history | |
sha1_file.c | diff | blob | history |