summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Fix indentation.Ben Straub2012-06-191-6/+6
| | | |
* | | | Avoid uninitialized variable error.Ben Straub2012-06-191-2/+2
| | | |
* | | | diff: make sure we free all allocated resourcesCarlos Martín Nieto2012-06-201-6/+21
| | | | | | | | | | | | | | | | | | | | When the creation of one iterator fails, we need to free the prefix and possibly one of the iterators. Make sure we do so.
* | | | odb: don't leak when detecting id ambiguityCarlos Martín Nieto2012-06-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we find several objects with the same prefix, we need to free the memory where we stored the earlier object. Keep track of the raw.data pointer across read_prefix calls and free it if we find another object.
* | | | Plug a few leaksCarlos Martín Nieto2012-06-201-0/+2
| | | |
* | | | Merge pull request #775 from arrbee/fix-index-filemodesVicent Martí2012-06-194-20/+80
|\ \ \ \ | | | | | | | | | | Make index add/append support core.filemode flag
| * | | | Make index add/append support core.filemode flagRussell Belfer2012-06-194-20/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes git_index_add and git_index_append to behave more like core git, preserving old filemode data in the index when adding and/or appending with core.filemode = false. This also has placeholder support for core.symlinks and core.ignorecase, but those flags are not implemented (well, symlinks has partial support for preserving mode information in the same way that git does, but it isn't tested).
* | | | | Merge pull request #768 from nulltoken/topic/expose-message-prettifyVicent Martí2012-06-193-12/+27
|\ \ \ \ \ | | | | | | | | | | | | message: Expose git_message_prettify()
| * | | | | message: Expose git_message_prettify()nulltoken2012-06-193-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git_commit() and git_tag() no longer prettify the message by default. This has to be taken care of by the caller. This has the nice side effect of putting the caller in position to actually choose to strip the comments or not.
* | | | | | revparse: handle a non-existent path in the colon syntaxCarlos Martín Nieto2012-06-191-1/+6
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | oid_for_tree_path may not always find the path in the tree, in which case we need to return an error. The current code doesn't do this and results in undefined behavior.
* | | | | Fix potential segfault in revparse.Ben Straub2012-06-191-1/+6
|/ / / /
* | | | Merge pull request #758 from libgit2/config-values-containing-quotesVicent Martí2012-06-181-6/+47
|\ \ \ \ | | | | | | | | | | Quotes inside config values don't survive serialization/deserialization
| * | | | config: correctly escape quotes in the valueCarlos Martín Nieto2012-06-131-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a configuration option is set, we didn't check to see whether there was any escaping needed. Escape the available characters so we can unescape them correctly when we read them.
* | | | | clar: Fix warningsVicent Marti2012-06-191-1/+1
| | | | |
* | | | | Merge pull request #753 from nulltoken/topic/merge-base-manyVicent Martí2012-06-181-0/+56
|\ \ \ \ \ | | | | | | | | | | | | Expose git_merge_base_many()
| * | | | | merge: Expose git_merge_base_many()nulltoken2012-06-071-0/+56
| | | | | |
* | | | | | Merge remote-tracking branch 'yorah/fix/notes-creation' into developmentVicent Marti2012-06-192-241/+310
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/notes.c
| * | | | | | notes: simplify the handling of fanoutsyorah2012-06-081-239/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Do not create new levels of fanout when creating notes from libgit2 - Insert a note in an existing matching fanout - Remove a note from an existing fanout - Cleanup git_note_read, git_note_remove, git_note_foreach, git_note_create methods in order use tree structures instead of tree_oids
| * | | | | | treebuilder: prevent git_treebuilder_free() from segfaulting when being ↵nulltoken2012-06-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | passed a NULL treebuilder
* | | | | | | tree: Proper path comparison logicVicent Marti2012-06-191-7/+12
| | | | | | |
* | | | | | | Fix compile errors when building on windowsTim Clem2012-06-152-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Errors were due to not including winsock2 early enough.
* | | | | | | Fix broken tests caused by no longer prettifying by defaultTim Clem2012-06-151-5/+2
| | | | | | |
* | | | | | | Kill message_prettify - we will export insteadTim Clem2012-06-151-4/+0
| | | | | | |
* | | | | | | Don't strip comments (#) from commit messages by defaultTim Clem2012-06-151-1/+1
| |_|_|_|_|/ |/| | | | |
* | | | | | Precompile headers for MSVC.Ben Straub2012-06-132-0/+20
| | | | | |
* | | | | | Fix issue #763Frederick Ros2012-06-131-3/+5
| |_|/ / / |/| | | |
* | | | | Merge pull request #760 from nulltoken/topic/logAllRefUpdatesRussell Belfer2012-06-121-0/+3
|\ \ \ \ \ | | | | | | | | | | | | make git_repository_init() value the core.logallrefupdates config entry
| * | | | | repository: make git_repository_init() value the core.logallrefupdates ↵nulltoken2012-06-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | config entry
* | | | | | revparse: remove unnecessary GIT_BEGIN_DECLMichael Schubert2012-06-121-5/+0
|/ / / / /
* | | | | Fix fragile commit parsing in revwalkRussell Belfer2012-06-111-15/+21
| | | | |
* | | | | Fix mingw32 (Travis) build.Ben Straub2012-06-111-0/+1
| | | | |
* | | | | Ignores allow unescapes internal whitespaceRussell Belfer2012-06-111-0/+2
| | | | |
* | | | | Better fix for isalpha in drive letter detectionRussell Belfer2012-06-081-4/+7
| | | | | | | | | | | | | | | | | | | | Missed a place that used this and missed git__isalpha
* | | | | isalpha is not great for UTF-8Russell Belfer2012-06-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking for a drive letter on windows, instead of using isalpha(), it is better to just check for a..z and A..Z, I think, particularly because the MS isalpha implementation appears to assert when given an 0xFF byte.
* | | | | Minor fixes, cleanups, and clarificationsRussell Belfer2012-06-082-27/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three actual changes in this commit: 1. When the trailing newline of a file is removed in a diff, the change will now be reported with `GIT_DIFF_LINE_DEL_EOFNL` passed to the callback. Previously, the `ADD_EOFNL` constant was given which was just an error in my understanding of when the various circumstances arose. `GIT_DIFF_LINE_ADD_EOFNL` is deprecated and should never be generated. A new newline is simply an `ADD`. 2. Rewrote the `diff_delta__merge_like_cgit` function that contains the core logic of the `git_diff_merge` implementation. The new version doesn't actually have significantly different behavior, but the logic should be much more obvious, I think. 3. Fixed a bug in `git_diff_merge` where it freed a string pool while some of the string data was still in use. This led to `git_diff_print_patch` accessing memory that had been freed. The rest of this commit contains improved documentation in `diff.h` to make the behavior and the equivalencies with core git clearer, and a bunch of new tests to cover the various cases, oh and a minor simplification of `examples/diff.c`.
* | | | | Fix filemode comparison in diffsRussell Belfer2012-06-083-19/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | File modes were both not being ignored properly on platforms where they should be ignored, nor be diffed consistently on platforms where they are supported. This change adds a number of diff and status filemode change tests. This also makes sure that filemode-only changes are included in the diff output when they occur and that filemode changes are ignored successfully when core.filemode is false. There is no code that automatically toggles core.filemode based on the capabilities of the current platform, so the user still needs to be careful in their .git/config file.
* | | | | misc: Fix warnings from PVS Studio trialVicent Martí2012-06-0712-14/+20
| | | | |
* | | | | Fixing rev-parse-induced Travis errors.Ben Straub2012-06-071-0/+5
|/ / / /
* | | | Merge pull request #669 from nulltoken/topic/resetVicent Martí2012-06-074-61/+164
|\ \ \ \ | | | | | | | | | | Add git_reset()
| * | | | Add git_reset()nulltoken2012-06-074-61/+164
| | | | | | | | | | | | | | | | | | | | Currently supports Soft and Mixed modes.
* | | | | Merge pull request #684 from benstraub/rev-parseVicent Martí2012-06-076-14/+1727
|\ \ \ \ \ | |_|_|_|/ |/| | | | Rev parse
| * | | | Prefer git__free (again).Ben Straub2012-06-071-1/+1
| | | | |
| * | | | Rename internal function.Ben Straub2012-06-071-2/+2
| | | | |
| * | | | Rename posix wrappers with 'p_' prefix.Ben Straub2012-06-065-15/+19
| | | | |
| * | | | Remove 'git__' prefix from a static function.Ben Straub2012-06-061-2/+2
| | | | |
| * | | | Rev-parse: stop referencing freed memory.Ben Straub2012-06-061-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converted an internal utility to return an oid, rather than a tree entry (whose lifetime is tied to the parent tree, which was freed before returning).
| * | | | Prefer git__free() to free().Ben Straub2012-06-061-1/+1
| | | | |
| * | | | Move git__date_parse declaration to util.h.Ben Straub2012-06-064-16/+11
| | | | |
| * | | | Fix signatures for tree calls.Ben Straub2012-06-061-4/+4
| | | | |
| * | | | Merge branch 'development' into rev-parseBen Straub2012-06-0560-989/+1322
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/util.h tests-clar/refs/branches/listall.c