|
95117d47
|
2021-10-31T09:45:46
|
|
path: separate git-specific path functions from util
Introduce `git_fs_path`, which operates on generic filesystem paths.
`git_path` will be kept for only git-specific path functionality (for
example, checking for `.git` in a path).
|
|
f0e693b1
|
2021-09-07T17:53:49
|
|
str: introduce `git_str` for internal, `git_buf` is external
libgit2 has two distinct requirements that were previously solved by
`git_buf`. We require:
1. A general purpose string class that provides a number of utility APIs
for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
can take ownership of.
By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.
Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class. The name also
is an homage to Junio Hamano ("gitstr").
The public API remains `git_buf`, and has a much smaller footprint. It
is generally only used as an "out" param with strict requirements that
follow the documentation. (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)
Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
|
|
658022c4
|
2019-07-18T13:53:41
|
|
configuration: cvar -> configmap
`cvar` is an unhelpful name. Refactor its usage to `configmap` for more
clarity.
|
|
0b5ba0d7
|
2019-06-06T16:36:23
|
|
Rename opt init functions to `options_init`
In libgit2 nomenclature, when we need to verb a direct object, we name
a function `git_directobject_verb`. Thus, if we need to init an options
structure named `git_foo_options`, then the name of the function that
does that should be `git_foo_options_init`.
The previous names of `git_foo_init_options` is close - it _sounds_ as
if it's initializing the options of a `foo`, but in fact
`git_foo_options` is its own noun that should be respected.
Deprecate the old names; they'll now call directly to the new ones.
|
|
168fe39b
|
2018-11-28T14:26:57
|
|
object_type: use new enumeration names
Use the new object_type enumeration names within the codebase.
|
|
e4ac4000
|
2018-07-02T12:57:56
|
|
checkout tests: test symlinks based on support, not platform
When testing whether symlinks are correctly checked out, examine the
`core.symlinks` configuration option to determine if symlinks are
supported in a repository, don't simply assume that Windows means that
symbolic links are not supported.
Further, when testing the expected default behavior of `core.symlinks`,
test the filesystem's support to determine if symlinks are supported.
Finally, ensure that `core.symlinks=true` fails on a system where
symlinks are actually not supported. This aligns with the behavior of
Git for Windows.
|
|
7b6875f4
|
2018-07-02T12:25:45
|
|
checkout tests: don't use GetFinalPathNameByHandle
To determine the canonical filename for a given path, we previously
looked at the directory entries on POSIX systems and used
GetFinalPathNameByHandle on Windows. However, GetFinalPathNameByHandle
requires a HANDLE - the results of CreateFile - and you cannot
CreateFile on a symbolic link.
To support finding the canonical path of a symbolic link, simply use the
existing POSIX code to look at the directory entries.
|
|
ecf4f33a
|
2018-02-08T11:14:48
|
|
Convert usage of `git_buf_free` to new `git_buf_dispose`
|
|
26d5c0b8
|
2015-06-12T09:28:47
|
|
Fix leaks in tests/checkout/icase
|
|
cd79d99a
|
2015-04-23T15:58:53
|
|
checkout test: better case-insensitive test on Mac
On Mac OS, `realpath` is deficient in determining the actual filename
on-disk as it will simply provide the string you gave it if that file
exists, instead of returning the filename as it exists. Instead we
must read the directory entries for the parent directory to get the
canonical filename.
|
|
64842d87
|
2015-04-23T09:21:33
|
|
checkout test: only run icase on icase platform
|
|
05f69012
|
2015-03-31T16:28:13
|
|
checkout: remove blocking dir when FORCEd
|
|
118e6fdc
|
2015-03-16T23:08:16
|
|
Lower case the include directive of windows header
Since the Linux platform has a case sensitive file system, the header name should be lower case for cross compiling purposes. (On Linux, the mingw header is called ```windows.h```).
|
|
e0902fbc
|
2015-01-15T17:17:01
|
|
checkout tests: cleanup realpath impl on Win32
|
|
53eb139d
|
2015-01-14T20:16:01
|
|
checkout tests: emulate p_realpath poorly on Win32
|
|
e74340b0
|
2015-01-14T18:47:00
|
|
checkout: remove files before writing new ones
On case insensitive filesystems, we may have files in the working
directory that case fold to a name we want to write. Remove those
files (by default) so that we will not end up with a filename that
has the unexpected case.
|