* subversion/libsvn_wc/working_file_writer.c
(svn_wc__working_file_writer_open): Perform all keyword-related checks
in a single place, just before we open the translation stream.
The svn_subst_stream_translated() function handles NULL and zero-sized
keyword hashes equivalently, so there is no need for us to set KEYWORDS
to NULL.
@@ -73,9 +73,6 @@ svn_wc__working_file_writer_open(svn_wc__working_file_writer_t **writer_p,
svn_stream_t *install_stream;
svn_stream_t *write_stream;
- if (keywords && apr_hash_count(keywords) <= 0)
- keywords = NULL;
-
SVN_ERR(svn_stream__create_for_install(&install_stream, tmp_abspath,
result_pool, scratch_pool));
@@ -88,7 +85,8 @@ svn_wc__working_file_writer_open(svn_wc__working_file_writer_t **writer_p,
write_stream = install_stream;
- if (keywords || eol_style != svn_subst_eol_style_none)
+ if ((keywords && apr_hash_count(keywords) > 0) ||
+ eol_style != svn_subst_eol_style_none)
{
write_stream = svn_subst_stream_translated(write_stream,
eol,
