You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/05/31 12:49:00 UTC

svn commit: r1682714 - /subversion/trunk/subversion/libsvn_fs_x/tree.c

Author: stefan2
Date: Sun May 31 10:49:00 2015
New Revision: 1682714

URL: http://svn.apache.org/r1682714
Log:
Follow-up to r1595277:
Restore logic that got accidentally removed during conflict resolution.

* subversion/libsvn_fs_x/tree.c
  (compare_dir_structure): Re-introduce shortcut condition. This ensures
                           that the following iteration is valid on both
                           arrays.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/tree.c

Modified: subversion/trunk/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/tree.c?rev=1682714&r1=1682713&r2=1682714&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/tree.c Sun May 31 10:49:00 2015
@@ -1694,6 +1694,15 @@ compare_dir_structure(svn_boolean_t *cha
   SVN_ERR(svn_fs_x__dag_dir_entries(&rhs_entries, rhs, scratch_pool,
                                     iterpool));
 
+  /* different number of entries -> some addition / removal */
+  if (lhs_entries->nelts != rhs_entries->nelts)
+    {
+      svn_pool_destroy(iterpool);
+      *changed = TRUE;
+
+      return SVN_NO_ERROR;
+    }
+
   /* Since directories are sorted by name, we can simply compare their
      entries one-by-one without binary lookup etc. */
   for (i = 0; i < lhs_entries->nelts; ++i)