summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2007-03-22 17:32:51 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2007-03-22 17:32:51 -0700
commitcc96fd092a55a7a8685f0dee1e287ded70bc08b7 (patch)
tree7f06e01abd58cbb9e6200dc8a2e16d8fc5687030 /contrib/fast-import
parentMerge git://git2.kernel.org/pub/scm/gitk/gitk (diff)
downloadtgif-cc96fd092a55a7a8685f0dee1e287ded70bc08b7.tar.xz
git-apply: Do not free the wrong buffer when we convert the data for writeout
When we write out the result of patch application, we sometimes need to munge the data (e.g. under core.autocrlf). After doing so, what we should free is the temporary buffer that holds the converted data returned from convert_to_working_tree(), not the original one. This patch also moves the call to open() up in the function, as the caller expects us to fail cheaply if leading directories need to be created (and then the caller creates them and calls us again). For that calling pattern, attempting conversion before opening the file adds unnecessary overhead. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'contrib/fast-import')
0 files changed, 0 insertions, 0 deletions