- 09 Feb, 2018 1 commit
-
-
Return an error to the caller when we can't create an object header for some reason (printf failure) instead of simply asserting.
Edward Thomson committed
-
- 23 Dec, 2017 1 commit
-
-
If an element has been cached, but then the call to packfile_unpack_compressed() fails, the very next thing that happens is that its data is freed and then the element is not removed from the cache, which frees the data again. This change sets obj->data to NULL to avoid the double-free. It also stops trying to resolve deltas after two continuous failed rounds of resolution, and adds a test for this.
lhchavez committed
-
- 08 Dec, 2017 1 commit
-
-
This change fixes an invalid memory access when the trailer is missing / corrupt. Found using libFuzzer.
lhchavez committed
-
- 06 Dec, 2017 1 commit
-
-
This change ensures that the git_packfile_stream object in git_indexer_append() does not leak when the stream has errors. Found using libFuzzer.
lhchavez committed
-
- 03 Jul, 2017 1 commit
-
-
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.
Patrick Steinhardt committed
-
- 08 Jun, 2017 1 commit
-
-
Initially, the setting has been solely used to enable the use of `fsync()` when creating objects. Since then, the use has been extended to also cover references and index files. As the option is not yet part of any release, we can still correct this by renaming the option to something more sensible, indicating not only correlation to objects. This commit renames the option to `GIT_OPT_ENABLE_FSYNC_GITDIR`. We also move the variable from the object to repository source code.
Patrick Steinhardt committed
-
- 19 May, 2017 1 commit
-
-
Upstream git.git has changed the way how packfiles are named. Previously, they were using a hash of the contained object's OIDs, which has then been changed to use the hash of the complete packfile instead. See 1190a1acf (pack-objects: name pack files after trailer hash, 2013-12-05) in the git.git repository for more information on this change. This commit changes our logic to match the behavior of core git.
Chris Hescock committed
-
- 02 Mar, 2017 1 commit
-
-
Edward Thomson committed
-
- 28 Feb, 2017 3 commits
-
-
Rename `GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION` -> `GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`.
Edward Thomson committed -
When fsync'ing files, fsync the parent directory in the case where we rename a file into place, or create a new file, to ensure that the directory entry is flushed correctly.
Edward Thomson committed -
Honor `git_object__synchronized_writing` when creating a packfile and corresponding index.
Edward Thomson committed
-
- 17 Feb, 2017 6 commits
-
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
- 21 Jan, 2017 3 commits
-
-
It must be non-NULL to have a valid `git_indexer`.
Edward Thomson committed -
Encapsulation!
Edward Thomson committed -
Only try to `unlink` our temp file when we know that we didn't copy it into its permanent location.
Edward Thomson committed
-
- 14 Jan, 2017 1 commit
-
-
lhchavez committed
-
- 04 Jan, 2017 1 commit
-
-
I forgot that Windows chokes while trying to delete open files.
lhchavez committed
-
- 01 Jan, 2017 1 commit
-
-
This change deletes the temporary packfile that the indexer creates to avoid littering the pack/ directory with garbage.
lhchavez committed
-
- 29 Dec, 2016 2 commits
-
-
This improves performance by reducing the number of I/O operations.
Chris Hescock committed -
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
Edward Thomson committed
-
- 16 Mar, 2016 1 commit
-
-
While often similar, these are not the same on Windows. We want to use the page size on Windows for the pools, but for mmap we need to use the allocation granularity as the alignment. On the other platforms these values remain the same.
Carlos Martín Nieto committed
-
- 13 Jan, 2016 1 commit
-
-
P.S.V.R committed
-
- 04 Jan, 2016 1 commit
-
-
Yong Li committed
-
- 31 Jul, 2015 1 commit
-
-
Without this change, compiling with gcc and pedantic generates warning: ISO C does not allow extra ‘;’ outside of a function.
Stefan Widgren committed
-
- 09 Jun, 2015 1 commit
-
-
Coverity complains about the git_rawobj ones because we use a loop in which we keep remembering the old version, and we end up copying our object as the base, so we want to have the data pointer be NULL.
Carlos Martín Nieto committed
-
- 02 Jun, 2015 1 commit
-
-
We've been using `p_ftruncate()` to extend the packfile in order to mmap it and write the new data into it. This works well in the general case, but as truncation does not allocate space in the filesystem, it must do so when we write data to it. The only way the OS has to indicate a failure to allocate space is via SIGBUS which means we tried to write outside the file. This will cause everyone to crash as they don't expect to handle this signal. Switch to using `p_lseek()` and `p_write()` to extend the file in a way which tells the filesystem to allocate the space for the missing data. We can then be sure that we have space to write into.
Carlos Martín Nieto committed
-
- 22 May, 2015 1 commit
-
-
When thickening a pack, avoid loading already loaded bases and trying to insert them all over again.
Edward Thomson committed
-
- 13 Mar, 2015 3 commits
-
-
It turns out that erroring out on duplicate commits is the right thing to do, but git was not hitting the bug on the server-side. Bring back a descriptive error message in case of duplicate entries and error out.
Carlos Martín Nieto committed -
If a packfile includes duplicate objects, we can choose to use the secon copy instead of the first by using the same logic as if it were the first. Change the error condition from 0 to -1, which indicates a bad resize, and set the OOM message in that case. This does mean we will leak the first copy of the object. We can deal with that later, but making fetches work is more important.
Carlos Martín Nieto committed -
While this is not even close to a fix, we can at least set an error message so we know which error we are facing. Up to know we just returned an error without a message.
Carlos Martín Nieto committed
-
- 11 Mar, 2015 1 commit
-
-
Keep the definitions in the headers, while putting the declarations in the C files. Putting the function definitions in headers causes them to be duplicated if you include two headers with them.
Carlos Martín Nieto committed
-
- 09 Dec, 2014 1 commit
-
-
Edward Thomson committed
-
- 21 Nov, 2014 1 commit
-
-
Ravindra Patel committed
-
- 19 Nov, 2014 1 commit
-
-
Ravindra Patel committed
-
- 09 Jul, 2014 1 commit
-
-
William Swanson committed
-