summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | diff: remove unused parameternulltoken2012-05-071-4/+1
| |/
* | Merge pull request #676 from carlosmn/remotesVicent Martí2012-05-082-7/+39
|\ \ | | | | | | Add git_remote_add() and change signature for _new()
| * | remotes: change git_remote_new's signatureCarlos Martín Nieto2012-05-081-6/+13
| | | | | | | | | | | | | | | Add a fetch refspec arguemnt and make the arguments (name, url, refspec), as that order makes more sense.
| * | remote: add git_remote_add()Carlos Martín Nieto2012-05-081-0/+25
| | | | | | | | | | | | Helper function to create a remote with the default settings
| * | config: don't use freed memory on errorCarlos Martín Nieto2012-05-081-6/+6
| | | | | | | | | | | | | | | Change the order and set a NULL so we don't try to access freed memory in case of an error.
* | | Clean up warnings and testsRussell Belfer2012-05-081-1/+1
|/ /
* | Merge pull request #674 from nulltoken/topic/GIT_ENOTFOUNDRussell Belfer2012-05-086-23/+47
|\ \ | | | | | | Improve the interop with bindings
| * | status: Prevent git_status_file() from returning ENOTFOUND when not applicablenulltoken2012-05-081-4/+4
| | |
| * | repository: ensure git_repository_discover() returns ENOTFOUND when unable ↵nulltoken2012-05-081-2/+3
| | | | | | | | | | | | to find a repository given the constraints
| * | compat: make p_realpath Windows implementation be a bit more POSIX compliant ↵nulltoken2012-05-082-5/+22
| | | | | | | | | | | | and fail if the provided path does not lead to an existing entry
| * | path: Make git_path_prettify() properly handle ENOTDIR errno valuenulltoken2012-05-081-1/+1
| | |
| * | object: make git_object_lookup() return GIT_ENOTFOUND when searching for an ↵nulltoken2012-05-081-2/+2
| | | | | | | | | | | | existing object by specifying an incorrect type
| * | remote: make git_remote_load() return GIT_ENOTFOUND when the remote url ↵nulltoken2012-05-081-3/+1
| | | | | | | | | | | | cannot be retrieved from the config file
| * | remote: ensure the allocated remote is freed when an error occurs during its ↵nulltoken2012-05-081-8/+16
| | | | | | | | | | | | loading
* | | Minor error fixesCarlos Martín Nieto2012-05-082-1/+2
|/ / | | | | | | | | | | | | Clear the error in pkt when we notice that the remote is starting to send the packfile. Fix the format string for Windows networking errors.
* | Merge pull request #672 from scottjg/more-mingw32-fixesVicent Martí2012-05-071-1/+0
|\ \ | | | | | | More mingw32 compilation fixes.
| * | Define explicit _WIN32_WINNT version in makefileScott J. Goldman2012-05-071-1/+0
| |/ | | | | | | | | | | | | | | | | Previously, it was defined in netops.c, but it's also needed in one of the clar tests, so I figured we might as well just make it global for the whole project. Without it, the mingw32 linker won't resolve GetProcessId() (called from the core/errors.c clar test) because of some conditionals in windows.h.
* | Fix directory finding for attrsRussell Belfer2012-05-071-3/+3
| | | | | | | | | | | | The fix to support attrs on bare repos went a little too far in trying to avoid using the working directory and ended up not processing the input path quite correctly.
* | compat: make p_open able to accept optional mode when passing the O_CREAT flagnulltoken2012-05-074-7/+32
|/ | | | This has the nice side effect of making test_attr_repo__staging_properly_normalizes_line_endings_according_to_gitattributes_directives() test pass again on Windows. This test started to fail after commit 674a198 was applied.
* transport git: don't use 'error' uninitializedCarlos Martín Nieto2012-05-061-1/+1
|
* compat: Add `stdarg.h` includeVicent Martí2012-05-051-0/+1
|
* Merge remote-tracking branch 'scottjg/fix-mingw32' into developmentVicent Martí2012-05-055-17/+24
|\ | | | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/transports/http.c tests-clar/clar
| * Fix missing prototype warning in utf-conv.cScott J. Goldman2012-05-051-0/+1
| |
| * Fix gitno_connect() error handling on WindowsScott J. Goldman2012-05-054-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | gitno_connect() can return an error or socket, which is fine on most platforms where sockets are file descriptors (signed int), but on Windows, SOCKET is an unsigned type, which is problematic when we are trying to test if the socket was actually a negative error code. This fix seperates the error code and socket in gitno_connect(), and fixes the error handling in do_connect() functions to compensate. It appears that git_connect() and the git-transport do_connect() functions had bugs in the non-windows cases too (leaking sockets, and not properly reporting connection error, respectively) so I went ahead and fixed those too.
* | Merge pull request #664 from arrbee/attrs-from-indexdevelopment-mergeVicent Martí2012-05-0520-246/+462
|\ \ | | | | | | Support git attrs from index (and bare repo)
| * | Fix valgrind issuesRussell Belfer2012-05-046-18/+37
| | | | | | | | | | | | | | | | | | | | | There are three changes here: - correctly propogate error code from failed object lookups - make zlib inflate use our allocators - add OID to notfound error in ODB lookups
| * | Fix memory leaks and use after freeRussell Belfer2012-05-045-16/+32
| | |
| * | Support reading attributes from indexRussell Belfer2012-05-0312-214/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the operation, we need to consider gitattributes in both the work dir and the index. This adds a parameter to all of the gitattributes related functions that allows user control of attribute reading behavior (i.e. prefer workdir, prefer index, only use index). This fix also covers allowing us to check attributes (and hence do diff and status) on bare repositories. This was a somewhat larger change that I hoped because it had to change the cache key used for gitattributes files.
* | | notes: Cleanup error handlingVicent Martí2012-05-051-19/+11
| | |
* | | Merge pull request #663 from schu/notes-honor-configVicent Martí2012-05-051-6/+41
|\ \ \ | | | | | | | | Honor core.notesRef config option
| * | | notes: add git_note_default_ref()Michael Schubert2012-05-031-0/+6
| | | | | | | | | | | | | | | | | | | | Add git_note_default_ref to allow easy retrieval of the currently set default notes reference.
| * | | notes: honor core.notesRefMichael Schubert2012-05-031-6/+35
| | | | | | | | | | | | | | | | | | | | Setting core.notesRef allows to change the default notes reference used by Git. Check if set before using GIT_NOTES_DEFAULT_REF. Fixes #649.
* | | | compat: va_copy on Win32 systemsVicent Martí2012-05-041-0/+8
|/ / /
* | | errors: Use a git_buf for building error stringsVicent Martí2012-05-031-29/+42
| | |
* | | buffer: Add `git_buf_vprintf`Vicent Martí2012-05-032-6/+23
|/ /
* | Remove old and unused error codesVicent Martí2012-05-0218-208/+62
| |
* | Update test suiteVicent Martí2012-05-021-2/+1
| |
* | Merge branch 'new-error-handling' into developmentVicent Martí2012-05-02104-6878/+8877
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .travis.yml include/git2/diff.h src/config_file.c src/diff.c src/diff_output.c src/mwindow.c src/path.c tests-clar/clar_helpers.c tests-clar/object/tree/frompath.c tests/t00-core.c tests/t03-objwrite.c tests/t08-tag.c tests/t10-refs.c tests/t12-repo.c tests/t18-status.c tests/test_helpers.c tests/test_main.c
| * Convert from strnlen to git_text_is_binaryRussell Belfer2012-05-021-4/+16
| | | | | | | | | | | | Since strnlen is not supported on all platforms and since we now have the shiny new git_text_is_binary in the filtering code, let's convert diff binary detection to use the new stuff.
| * Copy values to avoid strict aliasing warningRussell Belfer2012-05-021-1/+6
| | | | | | | | | | | | To make this code more resilient to future changes, we'll explicitly translate the libgit2 structure to the libxdiff structure.
| * Fix usage of "new" for fieldname in public headerRussell Belfer2012-05-024-166/+166
| | | | | | | | | | | | | | | | This should restore the ability to include libgit2 headers in C++ projects. Cherry picked 2de60205dfea2c4a422b2108a5e8605f97c2e895 from development into new-error-handling.
| * Merge remote-tracking branch 'carlosmn/remaining-errors' into new-error-handlingVicent Martí2012-05-017-306/+286
| |\ | | | | | | | | | | | | Conflicts: src/refspec.c
| | * error handling: move the missing parts over to the new error handlingCarlos Martín Nieto2012-04-267-306/+286
| | |
| * | remote: don't free transport on disconnectMichael Schubert2012-05-021-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, git_remote_disconnect not only closes the connection but also frees the underlying transport object, making it impossible to write code like // fetch stuff git_remote_download() // close connection git_remote_disconnect() // call user provided callback for each ref git_remote_update_tips(remote, callback) because remote->refs points to references owned by the transport object. This means, we have an idling connection while running the callback for each reference. Instead, allow immediate disconnect and free the transport later in git_remote_free().
| * | Merge pull request #654 from carlosmn/pkt-errVicent Martí2012-04-304-0/+50
| |\ \ | | | | | | | | Recognize and report server-side error messages
| | * | net: recognize and report server-side error messagesCarlos Martín Nieto2012-04-304-0/+50
| | | | | | | | | | | | | | | | | | | | When e.g. a repository isn't found, the server sends an error saying so. Put that error message in our error buffer.
| * | | buf: deploy git_buf_len()nulltoken2012-04-3014-43/+43
| | | |
| * | | diff: provide more context to the consumer of the callbacksnulltoken2012-04-301-18/+17
| | | | | | | | | | | | | | | | Update the callback to provide some information related to the file change being processed and the range of the hunk, when applicable.
| * | | buf: add git_buf_len() accessor to expose the current length of the buffer ↵nulltoken2012-04-291-1/+6
| |/ / | | | | | | | | | content
| * | pkt: bring back GIT_ESHORTBUFFERCarlos Martín Nieto2012-04-291-8/+4
| | | | | | | | | | | | | | | | | | The recent 64-bit Windows fixes changed the return code in git_pkt_parse_line() so it wouldn't signal a short buffer, breaking the network code. Bring it back.