Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
git-sh-setup.sh: make GIT_EDITOR/core.editor/VISUAL/EDITOR accept commands
[gitweb.git]
/
builtin-stripspace.c
diff --git
a/builtin-stripspace.c
b/builtin-stripspace.c
index 0c970aa945a5ae615a2a7af2b2c0c75fb14f0b8e..55716873dc4f4a8baa5f2b37d6dca1de488b38e4 100644
(file)
--- a/
builtin-stripspace.c
+++ b/
builtin-stripspace.c
@@
-79,8
+79,10
@@
int cmd_stripspace(int argc, const char **argv, const char *prefix)
size = 1024;
buffer = xmalloc(size);
- if (read_pipe(0, &buffer, &size))
+ if (read_fd(0, &buffer, &size)) {
+ free(buffer);
die("could not read the input");
+ }
size = stripspace(buffer, size, 0);
write_or_die(1, buffer, size);