From: Johannes Schindelin Date: Thu, 19 Feb 2009 19:10:49 +0000 (+0100) Subject: Introduce the function strip_path_suffix() X-Git-Tag: v1.6.2-rc2~21 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4fcc86b07db26da17f17af0fd777cab78fcaaf4c?hp=4fcc86b07db26da17f17af0fd777cab78fcaaf4c Introduce the function strip_path_suffix() The function strip_path_suffix() will try to strip a given suffix from a given path. The suffix must start at a directory boundary (i.e. "core" is not a path suffix of "libexec/git-core", but "git-core" is). Arbitrary runs of directory separators ("slashes") are assumed identical. Example: strip_path_suffix("C:\\msysgit/\\libexec\\git-core", "libexec///git-core", &prefix) will set prefix to "C:\\msysgit" and return 0. Signed-off-by: Johannes Schindelin Acked-by: Johannes Sixt Signed-off-by: Junio C Hamano ---