Author: kotkov
Date: Tue Mar  2 19:08:39 2021
New Revision: 1887112

URL: http://svn.apache.org/viewvc?rev=1887112&view=rev
Log:
* 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.

Modified:
    subversion/trunk/subversion/libsvn_wc/working_file_writer.c

Modified: subversion/trunk/subversion/libsvn_wc/working_file_writer.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/working_file_writer.c?rev=1887112&r1=1887111&r2=1887112&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/working_file_writer.c (original)
+++ subversion/trunk/subversion/libsvn_wc/working_file_writer.c Tue Mar  2 
19:08:39 2021
@@ -73,9 +73,6 @@ svn_wc__working_file_writer_open(svn_wc_
   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_
 
   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,


Reply via email to