summaryrefslogtreecommitdiff
path: root/entry.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2007-04-19 02:05:03 +0200
committerJunio C Hamano <junkio@cox.net>2007-04-20 23:24:34 -0700
commitac78e548049f4e86b38368d2c4b4dbb546c64ac6 (patch)
tree37994b847883946eefb34b50d53549335525d428 /entry.c
parent88e7fdf2cb436e068434241b0519577293055c19 (diff)
downloadgit-ac78e548049f4e86b38368d2c4b4dbb546c64ac6.tar.gz
Simplify calling of CR/LF conversion routines
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'entry.c')
-rw-r--r--entry.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/entry.c b/entry.c
index d72f811580..3771209f19 100644
--- a/entry.c
+++ b/entry.c
@@ -79,7 +79,6 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
}
switch (ntohl(ce->ce_mode) & S_IFMT) {
char *buf;
- unsigned long nsize;
case S_IFREG:
if (to_tempfile) {
@@ -96,12 +95,10 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
/*
* Convert from git internal format to working tree format
*/
- buf = new;
- nsize = size;
- if (convert_to_working_tree(ce->name, &buf, &nsize)) {
+ buf = convert_to_working_tree(ce->name, new, &size);
+ if (buf) {
free(new);
new = buf;
- size = nsize;
}
wrote = write_in_full(fd, new, size);