|
644c973f
|
2018-05-22T15:21:08
|
|
path: accept the name length as a parameter
We may take in names from the middle of a string so we want the caller to let us
know how long the path component is that we should be checking.
|
|
dc5591b4
|
2018-05-18T15:16:53
|
|
path: hide the dotgit file functions
These can't go into the public API yet as we don't want to introduce API or ABI
changes in a security release.
|
|
4656e9c4
|
2018-05-16T15:42:08
|
|
path: add a function to detect an .gitmodules file
Given a path component it knows what to pass to the filesystem-specific
functions so we're protected even from trees which try to use the 8.3 naming
rules to get around us matching on the filename exactly.
The logic and test strings come from the equivalent git change.
|
|
318b825e
|
2016-02-16T17:11:46
|
|
index: allow read of index w/ illegal entries
Allow `git_index_read` to handle reading existing indexes with
illegal entries. Allow the low-level `git_index_add` to add
properly formed `git_index_entry`s even if they contain paths
that would be illegal for the current filesystem (eg, `AUX`).
Continue to disallow `git_index_add_bypath` from adding entries
that are illegal universally illegal (eg, `.git`, `foo/../bar`).
|
|
07c989e9
|
2015-02-03T20:01:24
|
|
win32: further cleanups for 8.3 disabling
|
|
5f28ec84
|
2015-02-03T12:16:11
|
|
win32: cleanup 8.3 disabled tests
|
|
9dcc4a36
|
2015-01-28T23:04:50
|
|
Fix test failures when 8.3 is disabled
|
|
1fbfcdfc
|
2015-01-12T15:48:53
|
|
git_path_join_unrooted: return base len
The documentation for `git_path_join_unrooted` states that the base
length will be returned, so that consumers like checkout know where
to start creating directories instead of always creating directories
at the directory root.
|
|
6987a580
|
2014-12-19T23:54:42
|
|
Add more Windows reserved filenames
|
|
6fd00266
|
2014-12-19T23:54:01
|
|
COM0 is a valid path, although Windows Explorer does not allow to create this
|
|
ec74b40c
|
2014-12-16T18:53:55
|
|
Introduce core.protectHFS and core.protectNTFS
Validate HFS ignored char ".git" paths when `core.protectHFS` is
specified. Validate NTFS invalid ".git" paths when `core.protectNTFS`
is specified.
|
|
11d67b75
|
2014-12-10T19:12:16
|
|
checkout: disallow bad paths on HFS
HFS filesystems ignore some characters like U+200C. When these
characters are included in a path, they will be ignored for the
purposes of comparison with other paths. Thus, if you have a ".git"
folder, a folder of ".git<U+200C>" will also match. Protect our
".git" folder by ensuring that ".git<U+200C>" and friends do not match it.
|
|
a64119e3
|
2014-11-25T18:13:00
|
|
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.
|
|
cceae9a2
|
2014-12-01T13:09:58
|
|
win32: use NT-prefixed "\\?\" paths
When turning UTF-8 paths into UCS-2 paths for Windows, always use
the \\?\-prefixed paths. Because this bypasses the system's
path canonicalization, handle the canonicalization functions ourselves.
We must:
1. always use a backslash as a directory separator
2. only use a single backslash between directories
3. not rely on the system to translate "." and ".." in paths
4. remove trailing backslashes, except at the drive root (C:\)
|
|
bbb988a5
|
2014-09-17T14:52:31
|
|
path: Fix `git_path_walk_up` to work with non-rooted paths
|
|
1d20092c
|
2014-09-16T18:36:49
|
|
Remove unused buf variable from path/core test.
|
|
ccd8ba9b
|
2014-09-08T16:45:57
|
|
Fix warnings in thread-utils.h when building without -DTHREADSAFE=ON
The compiler was generating a bunch of warnings for
git_mutex_init and git_mutex_lock when GIT_THREADS
was not defined (i.e. when not using -DTHREADSAFE=ON).
Also remove an unused variable from tests/path/core.c.
|
|
0ee9f31c
|
2014-08-20T10:23:39
|
|
Introduce git_path_make_relative
|