diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-02-14 12:54:23 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-02-14 12:54:23 -0800 |
| commit | aa21cc97bd10ab0b62f6d951ff2ff725261e326e (patch) | |
| tree | 69e983408fd1a4f599ea00d6b70599a00282be06 /path.c | |
| parent | 883326077a1995a5ea122c298ff47fcd85782c49 (diff) | |
| parent | 5290d4513496d89f84570985a0e02e97dff477ff (diff) | |
| download | git-aa21cc97bd10ab0b62f6d951ff2ff725261e326e.tar.gz | |
Merge branch 'jk/alloc-cleanups'
Misc code clean-ups.
* jk/alloc-cleanups:
tree-walk.c: break circular dependency with unpack-trees
traverse_trees(): use stack array for name entries
walker_fetch(): avoid raw array length computation
normalize_path_copy(): document "dst" size expectations
Diffstat (limited to 'path.c')
| -rw-r--r-- | path.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1077,6 +1077,8 @@ const char *remove_leading_path(const char *in, const char *prefix) /* * It is okay if dst == src, but they should not overlap otherwise. + * The "dst" buffer must be at least as long as "src"; normalizing may shrink + * the size of the path, but will never grow it. * * Performs the following normalizations on src, storing the result in dst: * - Ensures that components are separated by '/' (Windows only) |
