summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-16 21:42:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-16 21:42:46 (GMT)
commitc6185c0b17636a9178bc3047ed90c071ca062a51 (patch)
treefe9c76bef9f03cc5c676537ecc12ef311e7be956 /path.c
parenta838ae9d49d8917781ada5c3f41504dac288df04 (diff)
parentb2a7123b997f950e9785a5e7df64c3104270fef3 (diff)
downloadgit-c6185c0b17636a9178bc3047ed90c071ca062a51.zip
git-c6185c0b17636a9178bc3047ed90c071ca062a51.tar.gz
git-c6185c0b17636a9178bc3047ed90c071ca062a51.tar.bz2
Merge branch 'rd/test-path-utils'
The normalize_ceiling_entry() function does not muck with the end of the path it accepts, and the real world callers do rely on that, but a test insisted that the function drops a trailing slash. * rd/test-path-utils: test-path-utils.c: remove incorrect assumption
Diffstat (limited to 'path.c')
-rw-r--r--path.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/path.c b/path.c
index 62a2ae8..1352952 100644
--- a/path.c
+++ b/path.c
@@ -910,6 +910,11 @@ const char *remove_leading_path(const char *in, const char *prefix)
* normalized, any time "../" eats up to the prefix_len part,
* prefix_len is reduced. In the end prefix_len is the remaining
* prefix that has not been overridden by user pathspec.
+ *
+ * NEEDSWORK: This function doesn't perform normalization w.r.t. trailing '/'.
+ * For everything but the root folder itself, the normalized path should not
+ * end with a '/', then the callers need to be fixed up accordingly.
+ *
*/
int normalize_path_copy_len(char *dst, const char *src, int *prefix_len)
{