summaryrefslogtreecommitdiff
path: root/subversion/libsvn_fs_base/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_fs_base/tree.c')
-rw-r--r--subversion/libsvn_fs_base/tree.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/subversion/libsvn_fs_base/tree.c b/subversion/libsvn_fs_base/tree.c
index e603af41e7781..046ab5daa0725 100644
--- a/subversion/libsvn_fs_base/tree.c
+++ b/subversion/libsvn_fs_base/tree.c
@@ -4811,6 +4811,13 @@ base_node_origin_rev(svn_revnum_t *revision,
prev_location() does below will work. */
path = svn_fs__canonicalize_abspath(path, pool);
+ /* Special-case the root node (for performance reasons) */
+ if (strcmp(path, "/") == 0)
+ {
+ *revision = 0;
+ return SVN_NO_ERROR;
+ }
+
/* If we have support for the node-origins table, we'll try to use
it. */
if (bfd->format >= SVN_FS_BASE__MIN_NODE_ORIGINS_FORMAT)