You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2005/09/03 17:33:38 UTC
[PATCH] Clarify doc string of svn_path_is_child()
svn_path_is_child() determines whether one path is a child of another, and
returns the extra portion if so. It wasn't clear what this function would make
of a potentially-child path which is identical to the parent path. I rather
assumed it would say, "Yes, it's a child; the child part is the empty string,"
but it doesn't, it returns null. This patch clarifies the behaviour.
OK to commit it?
- Julian
Re: [PATCH] Clarify doc string of svn_path_is_child()
Posted by kf...@collab.net.
Julian Foad <ju...@btopenworld.com> writes:
> svn_path_is_child() determines whether one path is a child of another,
> and returns the extra portion if so. It wasn't clear what this
> function would make of a potentially-child path which is identical to
> the parent path. I rather assumed it would say, "Yes, it's a child;
> the child part is the empty string," but it doesn't, it returns null.
> This patch clarifies the behaviour.
>
> OK to commit it?
Not only "OK", but +1! :-)
-Karl
--
www.collab.net <> CollabNet | Distributed Development On Demand
> - Julian
> Clarify a doc string.
>
> * subversion/include/svn_path.h
> (svn_path_is_child): Make the doc string more explicit.
>
> Index: subversion/include/svn_path.h
> ===================================================================
> --- subversion/include/svn_path.h (revision 16034)
> +++ subversion/include/svn_path.h (working copy)
> @@ -351,6 +351,9 @@ svn_boolean_t svn_path_is_backpath_prese
> * Both paths must be in canonical form, and must either be absolute,
> * or contain no ".." components.
> *
> + * If @a path2 is the same as @a path1, it is not a child, so the
> + * result is @c NULL; an empty string is never returned.
> + *
> * ### todo: the ".." restriction is unfortunate, and would ideally
> * be lifted by making the implementation smarter. But this is not
> * trivial: if the path is "../foo", how do you know whether or not
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
--
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org