diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2014-11-25 18:13:00 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2014-12-16 10:08:53 -0600 |
| commit | a64119e3963fcd358ba914c9e1a81a890666d15a (patch) | |
| tree | f81788b6b64bc56b84f59da979895078ec93b246 /src/util.h | |
| parent | 0d388adc86946f3c8cddc2493b470d47a653c4a5 (diff) | |
| download | libgit2-a64119e3963fcd358ba914c9e1a81a890666d15a.tar.gz | |
checkout: disallow bad paths on win32
Disallow:
1. paths with trailing dot
2. paths with trailing space
3. paths with trailing colon
4. paths that are 8.3 short names of .git folders ("GIT~1")
5. paths that are reserved path names (COM1, LPT1, etc).
6. paths with reserved DOS characters (colons, asterisks, etc)
These paths would (without \\?\ syntax) be elided to other paths - for
example, ".git." would be written as ".git". As a result, writing these
paths literally (using \\?\ syntax) makes them hard to operate with from
the shell, Windows Explorer or other tools. Disallow these.
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index 6e57ad8c3..17cc08987 100644 --- a/src/util.h +++ b/src/util.h @@ -106,6 +106,7 @@ GIT_INLINE(void) git__free(void *ptr) extern int git__prefixcmp(const char *str, const char *prefix); extern int git__prefixcmp_icase(const char *str, const char *prefix); +extern int git__prefixncmp_icase(const char *str, size_t str_n, const char *prefix); extern int git__suffixcmp(const char *str, const char *suffix); GIT_INLINE(int) git__signum(int val) |
