summaryrefslogtreecommitdiff
path: root/bulk-checkin.c
Commit message (Collapse)AuthorAgeFilesLines
* finish_tmp_packfile():use strbuf for pathname constructionsh/finish-tmp-packfileSun He2014-03-031-3/+5
| | | | | | | | | | | The old version fixes a maximum length on the buffer, which could be a problem if one is not certain of the length of get_object_directory(). Using strbuf can avoid the protential bug. Helped-by: Michael Haggerty <mhagger@alum.mit.edu> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Sun He <sunheehnus@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* stream_to_pack: xread does not guarantee to read all requested bytesjs/xread-in-fullJohannes Sixt2013-08-201-1/+1
| | | | | | | | | | The deflate loop in bulk-checkin::stream_to_pack expects to get all bytes from a file that it requests to read in a single function call. But it used xread(), which does not give that guarantee. Replace it by read_in_full(). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bulk-checkin: replace fast-import based implementationjc/stream-to-packJunio C Hamano2011-12-011-0/+275
This extends the earlier approach to stream a large file directly from the filesystem to its own packfile, and allows "git add" to send large files directly into a single pack. Older code used to spawn fast-import, but the new bulk-checkin API replaces it. Signed-off-by: Junio C Hamano <gitster@pobox.com>