svn_wc_get_actual_target() will place NULL in target when the
passed-in path is a directory. This is inconsistent with the practice
of using "" as a non-operative path element.
As a result of this inconsistency, a number of functions allow or
require target paths to be NULL for the case where anchor+target =
anchor, including:
ra_lib->do_{update,switch,status,diff}
svn_wc_get_update_editor
svn_wc_diff
svn_wc_get_switch_editor
directory_elements_diff (libsvn_wc/diff.c)
svn_wc_get_status_editor (some confusing code here)
do_diff (libsvn_client/diff.c)
svn_client_commit
svn_cl__commit
svn_repos_dir_delta
This problem can be fixed in two phases:
Phase 1: Adjust svn_wc_get_actual_path to return "" for a
non-operative target. Fix all code to allow for, if not demand, "" as
a non-operative target path.
Phase 2: Fix all code to demand "" as a non-operative target path.
I took a stab at phase 1, but found that the fingers were very
complicated. I will attach the patch I wound up with, but it still
fails "make check" in the diff tests.