Files
git/cache.h
Johannes Schindelin b824fc9cef 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:

	prefix = strip_path_suffix("C:\\msysgit/\\libexec\\git-core",
			"libexec///git-core");

will set prefix to "C:\\msysgit".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2009-02-19 21:10:30 +01:00

33 KiB