Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-11-13Don't leak memory when duplicating a NULL signatureBen Straub
2013-08-17Add new git_signature_default API using configRussell Belfer
This adds a new API for creating a signature that uses the config to look up "user.name" and "user.email".
2013-06-13Merge pull request #1642 from arrbee/diff-function-contextVicent Martí
Diff code reorg plus function context in diff headers
2013-06-11signature: extend trimming to more whitespaceCarlos Martín Nieto
There are all sorts of misconfiguration in the wild. We already rely on the signature constructor to trim SP. Extend the logic to use `isspace` to decide whether a character should be trimmed.
2013-06-10Reorganize diff and add basic diff driverRussell Belfer
This is a significant reorganization of the diff code to break it into a set of more clearly distinct files and to document the new organization. Hopefully this will make the diff code easier to understand and to extend. This adds a new `git_diff_driver` object that looks of diff driver information from the attributes and the config so that things like function content in diff headers can be provided. The full driver spec is not implemented in the commit - this is focused on the reorganization of the code and putting the driver hooks in place. This also removes a few #includes from src/repository.h that were overbroad, but as a result required extra #includes in a variety of places since including src/repository.h no longer results in pulling in the whole world.
2013-06-02Don't bail on parsing commits with an invalid timezoneScott J. Goldman
git doesn't do that, and it's not something that's usually actionable to fix. if you have a git repository with one bad timezone in the history, it's too late to change it most likely.
2013-05-16Fix trailing whitespacesnulltoken
2013-05-15signature: Lenient when dupping, strict when creatingVicent Marti
2013-04-18Return error for empty name/emailNicolas Viennot
2013-02-20signature: Small cleanupsignatures-2Vicent Marti
2013-02-20signature: Shut up MSVC, you silly gooseVicent Marti
2013-02-20Simplify signature parsingVicent Marti
2013-01-22Parse commit time as uint64_t to avoid overflowRussell Belfer
The commit time is already stored as a git_time_t, but we were parsing is as a uint32_t. This just switches the parser to use uint64_t which will handle dates further in the future (and adds some tests of those future dates).
2013-01-09update copyrightsEdward Thomson
2012-12-04Remove GIT_SIGNATURE_VERSION and friendsBen Straub
2012-12-01Deploy GIT_SIGNATURE_INITBen Straub
2012-09-04Fix MSVC compilation warningsnulltoken
2012-08-28signature: make the OS give us the offset for git_signature_nowCarlos Martín Nieto
There is a better and less fragile way to calculate time offsets. Let the OS take care of dealing with DST and simply take the the offset between the local time and UTC that it gives us.
2012-07-11signature: prevent angle bracket usage in identitynulltoken
2012-06-07Rename posix wrappers with 'p_' prefix.Ben Straub
2012-06-05Merge branch 'development' into rev-parseBen Straub
Conflicts: src/util.h tests-clar/refs/branches/listall.c
2012-05-18errors: Rename the generic return codesVicent Martí
2012-05-16Fix date.c build in msvc.Ben Straub
Ported the win32 implementations of gmtime_r, localtime_r, and gettimeofday to be part of the posix compatibility layer, and fixed git_signature_now to use them.
2012-04-17Fix warnings on 64-bit windows buildsRussell Belfer
This fixes all the warnings on win64 except those in deps, which come from the regex code.
2012-03-21Convert reflog to new errorsRussell Belfer
Cleaned up some other issues.
2012-03-20Convert indexer, notes, sha1_lookup, and signatureRussell Belfer
More files moved to new error handling style.
2012-02-13Update Copyright headerschu
Signed-off-by: schu <schu-github@schulog.org>
2011-12-08Use git_buf for path storage instead of stack-based buffersRussell Belfer
This converts virtually all of the places that allocate GIT_PATH_MAX buffers on the stack for manipulating paths to use git_buf objects instead. The patch is pretty careful not to touch the public API for libgit2, so there are a few places that still use GIT_PATH_MAX. This extends and changes some details of the git_buf implementation to add a couple of extra functions and to make error handling easier. This includes serious alterations to all the path.c functions, and several of the fileops.c ones, too. Also, there are a number of new functions that parallel existing ones except that use a git_buf instead of a stack-based buffer (such as git_config_find_global_r that exists alongsize git_config_find_global). This also modifies the win32 version of p_realpath to allocate whatever buffer size is needed to accommodate the realpath instead of hardcoding a GIT_PATH_MAX limit, but that change needs to be tested still.
2011-10-29global: Properly use `git__` memory wrappersVicent Marti
Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
2011-10-13signature: don't blow up trying to parse names containing '>'Brodie Rao
When trying to find the end of an email, instead of starting at the beginning of the signature, we start at the end of the name (after the first '<'). This brings libgit2 more in line with Git's behavior when reading out existing signatures. However, note that Git does not allow names like these through the usual porcelain; instead, it silently strips any '>' characters it sees.
2011-09-22config: make git_config_[get|set]_long() able to properly deal with 8 bytes ↵nulltoken
wide values Should fix issue #419. Signed-off-by: nulltoken <emeric.fermas@gmail.com>
2011-09-19Merge pull request #384 from kiryl/warningsVicent Martí
Add more -W flags to CFLAGS
2011-09-19Cleanup legal dataVicent Marti
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.
2011-08-31CMakefile: add -Wmissing-prototypes and fix warningsKirill A. Shutemov
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-08-03signature: adjust API to return error codesschu
git_signature_new() and git_signature_now() currently don't return error codes. Change the API to return error codes and not pointers to let the user handle errors properly. Signed-off-by: schu <schu-github@schulog.org>
2011-08-03signature.c: fix off-by-one errorschu
Signed-off-by: schu <schu-github@schulog.org>
2011-07-10reflog: Fix reflog writer/readernulltoken
- Use a space to separate oids and signature - Enforce test coverage - Make test run in a temporary folder in order not to alter the test repository
2011-07-09Remove unused methodsVicent Marti
The direct-writes commit left some (slow) internals methods that were no longer needed. These have been removed. Also, the Reflog code was using the old `git_signature__write`, so it has been rewritten to use a normal buffer and the new `writebuf` signature writer. It's now slightly simpler and faster.
2011-07-09odb: Direct writes are backVicent Marti
DIRECT WRITES ARE BACK AND FASTER THAN EVER. The streaming writer to the ODB was an overkill for the smaller objects like Commit and Tags; most of the streaming logic was taking too long. This commit makes Commits, Tags and Trees to be built-up in memory, and then written to disk in 2 pushes (header + data), instead of streaming everything. This is *always* faster, even for big files (since the git_filebuf class still does streaming writes when the memory cache overflows). This is also a gazillion lines of code smaller, because we don't have to precompute the final size of the object before starting the stream (this was kind of defeating the point of streaming, anyway). Blobs are still written with full streaming instead of loading them in memory, since this is still the fastest way. A new `git_buf` class has been added. It's missing some features, but it'll get there.
2011-07-09signature: Fix optional headerVicent Marti
2011-07-09git_signature__write: make header optionallyschu
Signed-off-by: schu <schu-github@schulog.org>
2011-07-05signature: Fix warningsVicent Marti
Add extra braces to avoid ambiguous if-else. Also, free() doesn't need a check.
2011-07-05signature: straighten the creation of a signaturenulltoken
- Fails on empty name and/or email - Trims leading and trailing spaces of name and email
2011-07-05signature: enhance relaxed parsing of bogus signaturesnulltoken
Final fix for issue #278
2011-07-05git_signature__parse: make parsing less strictschu
git_signature__parse used to be very strict about what's a well-formed signature. Since git_signature__parse is used only when reading already existing signatures, we should not care about if it's a valid signature too much but rather show what we got. Reported-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
2011-07-01cleanup: remove trailing spacesKirill A. Shutemov
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-06-29sig: allow empty namesCarlos Martín Nieto
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-28commit: Allow spaces inside email addressesVicent Marti
Core Git doesn't care when people use spaces in the email address, even though this kind of foolery receives the capital punishment in several states of the USA. We must obey.
2011-06-02signature: Fix compilationVicent Marti
2011-05-31Fix tag and signature parsingDavid Glesser
Before this commit, malformed tag and signature were considered as valid by the parser. See the test t3800-mktag.sh of git to see example of malformed tag and signature.