summaryrefslogtreecommitdiff
path: root/subversion/libsvn_wc/diff_local.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2014-02-20 19:26:10 +0000
committerPeter Wemm <peter@FreeBSD.org>2014-02-20 19:26:10 +0000
commit219f5ebf8fca3572d8d4265d78d0e4670ca35a27 (patch)
treee6232088e2faabbf0f1a6e568df3285323f27c5c /subversion/libsvn_wc/diff_local.c
parenteeb88685bfa4ef1c0639f1136d83ff19de1b4595 (diff)
Notes
Diffstat (limited to 'subversion/libsvn_wc/diff_local.c')
-rw-r--r--subversion/libsvn_wc/diff_local.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/subversion/libsvn_wc/diff_local.c b/subversion/libsvn_wc/diff_local.c
index 0bd4a45cd44e..04d4c480b751 100644
--- a/subversion/libsvn_wc/diff_local.c
+++ b/subversion/libsvn_wc/diff_local.c
@@ -116,13 +116,20 @@ ensure_state(struct diff_baton *eb,
apr_pool_t *ns_pool;
if (!eb->cur)
{
- if (!svn_dirent_is_ancestor(eb->anchor_abspath, local_abspath))
+ const char *relpath;
+
+ relpath = svn_dirent_skip_ancestor(eb->anchor_abspath, local_abspath);
+ if (! relpath)
return SVN_NO_ERROR;
- SVN_ERR(ensure_state(eb,
- svn_dirent_dirname(local_abspath,scratch_pool),
- FALSE,
- scratch_pool));
+ /* Don't recurse on the anchor, as that might loop infinately because
+ svn_dirent_dirname("/",...) -> "/"
+ svn_dirent_dirname("C:/",...) -> "C:/" (Windows) */
+ if (*relpath)
+ SVN_ERR(ensure_state(eb,
+ svn_dirent_dirname(local_abspath,scratch_pool),
+ FALSE,
+ scratch_pool));
}
else if (svn_dirent_is_child(eb->cur->local_abspath, local_abspath, NULL))
SVN_ERR(ensure_state(eb, svn_dirent_dirname(local_abspath,scratch_pool),