fast_export: Add comment listing valid dirent modes

The fast_export_modify helper passes a mode value from the
caller without checking it.

In keeping with svn-dump-fast-export’s usual permissiveness, do
not change this.  Instead, add a comment to warn the reader.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
line_buffer: Simplify by removing push-back buffer

Nobody ungets characters, so let stdio take care of buffering.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
buffer_copy_bytes: avoid infinite loop from I/O error

Silently return when failing to read or write during a copy
operation.  This is not ideal, but it’s better than freezing;
usually a later operation will notice the error and halt.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
line_buffer: Allow reading from files other than stdin

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
allocator: Style fixes

free() already is a no-op when its argument is NULL.  Remove
unnecessary braces around if () body.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reorder declarations in repo_tree

Declare data before functions.  While at it, simplify some
comments.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
repo_tree: Rename _mark to mark

ISO C reserves names that begin with an underscore for the
compiler and libc implementation.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
repo_tree: Trivial style fixes

Remove unnecessary braces.  Put the return value type on the same
line as the name in function prototypes.  Break long lines.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
repo_diff: Clean up

Make the logic of the matching-path case a little clearer by
decreasing nesting.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
string_pool: Rename node_t to struct node

Avoid using typedefs for non-abstract types.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
svndump: Style fixes

Remove some unnecessary braces.  Use two lines for simple if
statements.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Update treap API docs

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
trp: Style fixes

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
string_pool: Whitespace fix

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
obj_pool: Remove documenting comment

It is likely to fall out of date soon enough, anyway.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Give main() into its own file

Outside projects may want to use the svndump code with their own
main() functions.  Make this a little easier by putting the svn-fe
frontend in a separate file.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Add a sample user for the svndump library

The svn-fe tool takes a Subversion dump file as input and produces
a fast-import stream as output.  This can be useful as a low-level
tool in building other importers, or for debugging the vcs-svn
library.

 make svn-fe
 make svn-fe.1

to test.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Minor whitespace cleanups

Minor whitespace cleanups from git.git `pu` courtesey Jonathan Nieder.
Turn off persistence

The version merged into git.git `pu` has persistence turned off. Don't
re-enable it until it's ready.
contrib/svn-fe: Fix IncludePath

Include the path "../../vcs-svn" while compiling it in the Makefile
and change svn-fe.c to include svndump.h.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>