]> git.ipfire.org Git - thirdparty/git.git/commit - vcs-svn/svndump.c
vcs-svn: Unclutter handle_node by introducing have_props var
authorJonathan Nieder <jrnieder@gmail.com>
Sat, 20 Nov 2010 00:47:41 +0000 (18:47 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Nov 2010 22:51:42 +0000 (14:51 -0800)
commitd6e81a03153810f122f1b8ec3635fd84c5429f69
treef034fbc353a61a75a4d43ca90c8def383d604e79
parentda3e217447390d52363989474a5e33bd298ff3ad
vcs-svn: Unclutter handle_node by introducing have_props var

It is possible for a path node in an SVN-format dump file to leave out
the properties section.  svn-fe handles this by carrying over the
properties (in particular, file type) from the old version of that
node.

To support this, handle_node tests several times whether a
Prop-content-length field is present.  Ancient Subversion actually
leaves out the Prop-content-length field even for nodes with
properties, so that's not quite the right check.  Besides, this detail
of mechanism is distracting when the question at hand is instead what
content the new node should have.

So introduce a local have_props variable.  The semantics are the same
as before; the adaptations to support ancient streams that leave out
the prop-content-length can wait until someone needs them.

Signed-off-by: Jonathan Nieder <jrnieer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
vcs-svn/svndump.c