summaryrefslogtreecommitdiff
path: root/subversion/libsvn_fs_base/tree.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2013-07-28 05:04:41 +0000
committerPeter Wemm <peter@FreeBSD.org>2013-07-28 05:04:41 +0000
commit97551b2898eb459e9b616947d87d026d27b61518 (patch)
treea851d66ec0c51a7321b30a677a0e55f1655af4d6 /subversion/libsvn_fs_base/tree.c
parentfec88c40a7bace625f49c3234a71560a161ee0ef (diff)
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)