aboutsummaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-03-22 17:32:51 -0700
committerJunio C Hamano <junkio@cox.net>2007-03-22 17:32:51 -0700
commitcc96fd092a55a7a8685f0dee1e287ded70bc08b7 (patch)
tree7f06e01abd58cbb9e6200dc8a2e16d8fc5687030 /help.c
parent00cec846f157b5363b0967d1e4cba76b44d48e77 (diff)
downloadgit-cc96fd092a55a7a8685f0dee1e287ded70bc08b7.tar.gz
git-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 'help.c')
0 files changed, 0 insertions, 0 deletions