diff options
author | peter <peter@FreeBSD.org> | 2014-02-20 19:26:10 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2014-02-20 19:26:10 +0000 |
commit | b168ae828108b6f3a7d68ace24b6e8383a081fb5 (patch) | |
tree | e6232088e2faabbf0f1a6e568df3285323f27c5c /subversion/libsvn_wc/diff_local.c | |
parent | d071fadd4866ee3cac65d15a4f6283a75939137d (diff) | |
download | FreeBSD-src-b168ae828108b6f3a7d68ace24b6e8383a081fb5.zip FreeBSD-src-b168ae828108b6f3a7d68ace24b6e8383a081fb5.tar.gz |
Vendor import svn-1.8.8
Diffstat (limited to 'subversion/libsvn_wc/diff_local.c')
-rw-r--r-- | subversion/libsvn_wc/diff_local.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/subversion/libsvn_wc/diff_local.c b/subversion/libsvn_wc/diff_local.c index 0bd4a45..04d4c48 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), |