diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2011-01-11 20:12:53 +0100 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2011-01-11 20:12:53 +0100 |
| commit | 170d3f2fbbaf529afc209f78fc7ee88b5680eb5d (patch) | |
| tree | cb8b671e4152fb34a68ffad6c1c689c3495f8ee1 /src/blob.c | |
| parent | 0740b462da240a455ad35e011a44832d04fa2d7a (diff) | |
| download | libgit2-170d3f2fbbaf529afc209f78fc7ee88b5680eb5d.tar.gz | |
Added git_prettify_dir_path().
Clean up a provided absolute or relative directory path.
This prettification relies on basic operations such as coalescing multiple forward slashes into a single slash, removing '.' and './' current directory segments, and removing parent directory whenever '..' is encountered. If not empty, the returned path ends with a forward slash.
For instance, this will turn "d1/s1///s2/..//../s3" into "d1/s3/".
This only performs a string based analysis of the path. No checks are done to make sure the path actually makes sense from the file system perspective.
Diffstat (limited to 'src/blob.c')
0 files changed, 0 insertions, 0 deletions
