|
f673e232
|
2018-12-27T13:47:34
|
|
git_error: use new names in internal APIs and usage
Move to the `git_error` name in the internal API for error-related
functions.
|
|
0c7f49dd
|
2017-06-30T13:39:01
|
|
Make sure to always include "common.h" first
Next to including several files, our "common.h" header also declares
various macros which are then used throughout the project. As such, we
have to make sure to always include this file first in all
implementation files. Otherwise, we might encounter problems or even
silent behavioural differences due to macros or defines not being
defined as they should be. So in fact, our header and implementation
files should make sure to always include "common.h" first.
This commit does so by establishing a common include pattern. Header
files inside of "src" will now always include "common.h" as its first
other file, separated by a newline from all the other includes to make
it stand out as special. There are two cases for the implementation
files. If they do have a matching header file, they will always include
this one first, leading to "common.h" being transitively included as
first file. If they do not have a matching header file, they instead
include "common.h" as first file themselves.
This fixes the outlined problems and will become our standard practice
for header and source files inside of the "src/" from now on.
|
|
909d5494
|
2016-12-29T12:25:15
|
|
giterr_set: consistent error messages
Error messages should be sentence fragments, and therefore:
1. Should not begin with a capital letter,
2. Should not conclude with punctuation, and
3. Should not end a sentence and begin a new one
|
|
f1453c59
|
2015-02-12T12:19:37
|
|
Make our overflow check look more like gcc/clang's
Make our overflow checking look more like gcc and clang's, so that
we can substitute it out with the compiler instrinsics on platforms
that support it. This means dropping the ability to pass `NULL` as
an out parameter.
As a result, the macros also get updated to reflect this as well.
|
|
2884cc42
|
2015-02-11T09:39:38
|
|
overflow checking: don't make callers set oom
Have the ALLOC_OVERFLOW testing macros also simply set_oom in the
case where a computation would overflow, so that callers don't
need to.
|
|
392702ee
|
2015-02-09T23:41:13
|
|
allocations: test for overflow of requested size
Introduce some helper macros to test integer overflow from arithmetic
and set error message appropriately.
|
|
c2c81615
|
2014-04-19T18:05:31
|
|
Win32: UTF-8 <-> WCHAR conversion overhaul
|
|
0228a514
|
2013-08-13T10:20:25
|
|
Missed one path for path_as_utf8 type
|
|
ee065601
|
2013-08-13T09:53:56
|
|
Minor win32 fixes and improvements
This is just a bunch of small fixes that I noticed while looking
at the UTF8 and UTF16 path stuff. It fixes a slowdown in looking
for an empty directory (not exiting loop asap), makes the dir name
in the git__DIR structure be a GIT_FLEX_ARRAY to save an allocation,
and fixes some slightly odd assumptions in the cl_getenv helper.
|
|
841034a3
|
2013-08-13T09:45:56
|
|
Reintroduce type for UTF8 win32 path conversions
|
|
d4cff0cb
|
2013-08-13T09:40:32
|
|
Rename git__win32_path fns to git_win32_path
|
|
3948e862
|
2013-08-13T09:38:37
|
|
windows: Fuck me
|
|
345b6307
|
2013-08-13T09:35:07
|
|
windows: Require order
|
|
abf37327
|
2013-08-13T09:15:39
|
|
windows: Path conversion with better semantics
|
|
aaefbdee
|
2013-08-08T08:48:57
|
|
Discriminate path-specific and general UTF-X conversions
|
|
2c0128ee
|
2013-08-07T19:29:33
|
|
Rename git_win_str_utf* to git_win32_path_utf*
|
|
9c38f7a6
|
2013-08-07T13:22:41
|
|
Add typedefs for win32 utf-8 and utf-16 buffers
...and normalize the signatures of the two conversion functions.
|
|
d8563619
|
2013-08-05T11:41:39
|
|
Split UTF-16 and UTF-8 buffer sizes for win32
Also fixed up call-sites to use the correct buffer sizes, especially
when converting to utf-8.
|
|
7026ad89
|
2013-05-16T21:08:55
|
|
calloc() to initialize memory
|
|
359fc2d2
|
2013-01-08T17:07:25
|
|
update copyrights
|
|
0f4c6175
|
2012-08-28T22:19:08
|
|
Add bounds checking to UTF-8 conversion
|
|
6813169a
|
2012-08-06T12:45:59
|
|
windows: Keep UTF-8 on the stack yo
|
|
deafee7b
|
2012-03-14T17:36:15
|
|
Continue error conversion
This converts blob.c, fileops.c, and all of the win32 files.
Also, various minor cleanups throughout the code. Plus, in
testing the win32 build, I cleaned up a bunch (although not
all) of the warnings with the 64-bit build.
|
|
74fa4bfa
|
2012-02-28T16:14:47
|
|
Update diff to use iterators
This is a major reorganization of the diff code. This changes
the diff functions to use the iterators for traversing the
content. This allowed a lot of code to be simplified. Also,
this moved the functions relating to outputting a diff into a
new file (diff_output.c).
This includes a number of other changes - adding utility
functions, extending iterators, etc. plus more tests for the
diff code. This also takes the example diff.c program much
further in terms of emulating git-diff command line options.
|
|
290f240e
|
2012-02-23T11:16:47
|
|
Fix readdir usage across platforms
This fixes the missing readdir_r from win32 and fixes other
platforms to always use the reentrant readdir_r form for reading
directory contents.
|
|
5e0de328
|
2012-02-13T17:10:24
|
|
Update Copyright header
Signed-off-by: schu <schu-github@schulog.org>
|
|
3286c408
|
2011-10-28T14:51:13
|
|
global: Properly use `git__` memory wrappers
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.
|
|
11d51ca6
|
2011-10-26T16:43:55
|
|
windows: Add support for non-UTF codepages
Our previous assumption that all paths in Windows are encoded in UTF-8
is rather weak, specially when considering that Git is
encoding-agnostic.
These set of functions allow the user to change the library's active
codepage globally, so it is possible to access paths and files on all
international versions of Windows.
Note that the default encoding here is UTF-8 because we assume that 99%
of all Git repositories will be in UTF-8.
Also, if you use non-ascii characters in paths, anywhere, please burn on
a fire.
|
|
6d0ef974
|
2011-09-19T12:41:27
|
|
Fix opendir/readdir and friends on Win32 to use Unicode
|
|
7998ae5a
|
2011-09-19T12:36:12
|
|
Rewrite p_* functions to use Unicode and marshal to UTF8 internally
|
|
bb742ede
|
2011-09-19T01:54:32
|
|
Cleanup legal data
1. The license header is technically not valid if it doesn't have a
copyright signature.
2. The COPYING file has been updated with the different licenses used in
the project.
3. The full GPLv2 header in each file annoys me.
|
|
e97179b6
|
2010-01-13T20:01:11
|
|
win32: Add a 'git__' prefix to the directory reading routines
This reduces the global namespace pollution and allows for
a win32 compiler (eg. Open Watcom) to provide these routines
in a header other than <dirent.h> (eg in <io.h>).
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
10aa3fa7
|
2009-06-04T17:14:35
|
|
Fix some "signed/unsigned mismatch" (msvc) compiler warnings
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
0234c186
|
2009-03-20T19:52:50
|
|
win32: Add <dirent.h> directory reading routines
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|