path: root/builtin.h
diff options
authorCarlos Rica <>2007-06-25 19:28:01 (GMT)
committerJunio C Hamano <>2007-06-27 04:55:55 (GMT)
commit9690c118facbdc4539bbc4921a94ac2edee5efd3 (patch)
tree1e397058df155e284541aec42a79f82afc23af18 /builtin.h
parent384f122b7c6dd2b52cc6029afee16560c38850ae (diff)
Fix git-stripspace to process correctly long lines and spaces.
Now the implementation gets more memory to store completely each line before removing trailing spaces, and does it right when the last line of the file ends with spaces and no newline at the end. Function stripspace needs again to be non-static in order to call it from "builtin-tag.c" and the upcoming "builtin-commit.c". A new parameter skip_comments was also added to the stripspace function to optionally strips every shell #comment from the input, needed for doing this task on those programs. Signed-off-by: Carlos Rica <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin.h b/builtin.h
index da4834c..661a92f 100644
--- a/builtin.h
+++ b/builtin.h
@@ -7,6 +7,7 @@ extern const char git_version_string[];
extern const char git_usage_string[];
extern void help_unknown_cmd(const char *cmd);
+extern void stripspace(FILE *in, FILE *out, int skip_comments);
extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix);
extern void prune_packed_objects(int);