summaryrefslogtreecommitdiff
path: root/src/commit_list.c
Commit message (Collapse)AuthorAgeFilesLines
* git_error: use new names in internal APIs and usageEdward Thomson2019-01-221-3/+3
| | | | | Move to the `git_error` name in the internal API for error-related functions.
* object_type: use new enumeration namesethomson/index_fixesEdward Thomson2018-12-011-1/+1
| | | | Use the new object_type enumeration names within the codebase.
* commit_list: avoid use of strtol64 without length limitPatrick Steinhardt2018-10-181-1/+3
| | | | | | | | | | When quick-parsing a commit, we use `git__strtol64` to parse the commit's time. The buffer that's passed to `commit_quick_parse` is the raw data of an ODB object, though, whose data may not be properly formatted and also does not have to be `NUL` terminated. This may lead to out-of-bound reads. Use `git__strntol64` to avoid this problem.
* Make sure to always include "common.h" firstPatrick Steinhardt2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* giterr_set: consistent error messagesEdward Thomson2016-12-291-2/+2
| | | | | | | | 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
* commit_list: fix the date comparison functionCarlos Martín Nieto2016-10-061-3/+8
| | | | | This returns the integer-cast truth value comparing the dates. What we want instead of a (-1, 0, 1) output depending on how they compare.
* pool: Dot not assume mallocs are zeroed outVicent Marti2015-10-281-1/+1
|
* revwalk: make commit list use 64 bits for timecmn/quick-parse-64Carlos Martín Nieto2015-10-141-3/+3
| | | | | | | | We moved the "main" parsing to use 64 bits for the timestamp, but the quick parsing for the revwalk did not. This means that for large timestamps we fail to parse the time and thus the walk. Move this parser to use 64 bits as well.
* Spelling fixesWill Stamper2014-12-041-1/+1
|
* Replace pqueue with code from hashsig heapRussell Belfer2014-02-031-3/+3
| | | | | | | | | | | I accidentally wrote a separate priority queue implementation when I was working on file rename detection as part of the file hash signature calculation code. To simplify licensing terms, I just adapted that to a general purpose priority queue and replace the old priority queue implementation that was borrowed from elsewhere. This also removes parts of the COPYING document that no longer apply to libgit2.
* Prefer younger merge bases over older ones.Arthur Schreiber2013-06-251-1/+1
| | | git-core prefers younger merge bases over older ones in case that multiple valid merge bases exists.
* Use git_odb_object_data/_size whereever possibleRussell Belfer2013-04-221-5/+8
| | | | | This uses the odb object accessors so we can change the internals more easily...
* What has science done.Vicent Marti2013-04-221-6/+9
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Fix error condition typoScott J. Goldman2012-11-291-1/+1
|
* Fix function name and add real error checkRussell Belfer2012-11-291-3/+7
| | | | | | | `revwalk.h:commit_lookup()` -> `git_revwalk__commit_lookup()` and make `git_commit_list_parse()` do real error checking that the item in the list is an actual commit object. Also fixed an apparent typo in a test name.
* Move merge functions to merge.cBen Straub2012-11-271-0/+190
In so doing, promote commit_list to git_commit_list, with its own internal API header.