Log

Author Commit Date CI Message
Russell Belfer 360f42f4 2013-06-12T14:18:09 Fix diff header naming issues This makes the git_diff_patch definition private to diff_patch.c and fixes a number of other header file naming inconsistencies to use `git_` prefixes on functions and structures that are shared between files.
Russell Belfer ef3374a8 2013-06-12T13:46:44 Improvements to git_array This changes the size data to uint32_t, fixes the array growth logic to use a simple 1.5x multiplier, and uses a generic inline function for growing the array to make the git_array_alloc API feel more natural (i.e. it returns a pointer to the new item).
Russell Belfer f9c824c5 2013-06-12T11:55:27 Add patch from blobs API This adds two new public APIs: git_diff_patch_from_blobs and git_diff_patch_from_blob_and_buffer, plus it refactors the code for git_diff_blobs and git_diff_blob_to_buffer so that they code is almost entirely shared between these APIs, and adds tests for the new APIs.
Russell Belfer 54faddd2 2013-06-12T11:54:11 Fix some diff driver memory leaks
Russell Belfer 42e6cf78 2013-06-11T17:45:14 Add diff drivers tests (and fix bugs) This adds real tests for user-configured diff drivers and in the process found a bunch of bugs.
Russell Belfer 5dc98298 2013-06-11T11:22:22 Implement regex pattern diff driver This implements the loading of regular expression pattern lists for diff drivers that search for function context in that way. This also changes the way that diff drivers update options and interface with xdiff APIs to make them a little more flexible.
Russell Belfer 3eadfecd 2013-06-10T15:24:20 start implementing diff driver registry
Russell Belfer 2f77d8f1 2013-06-10T14:16:56 Fix some memory leaks
Russell Belfer 596b121a 2013-06-10T14:16:49 fix missing file and bad prototype
Russell Belfer 114f5a6c 2013-06-10T10:10:39 Reorganize diff and add basic diff driver 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.
Russell Belfer 7000f3fa 2013-06-04T10:32:59 Move some diff helpers into separate file
Russell Belfer aad6967b 2013-05-29T21:52:21 Basic function context header This implements a basic callback to extract function context for a diff. It always uses the same search heuristic right now with no regular expressions or language-specific variants. Those will come next, I think.
Vicent Marti 2e1fa15f 2013-06-05T19:00:16 I'm a dick
Vicent Martí 987ab765 2013-06-05T09:57:59 Merge pull request #1634 from arrbee/alternative-mkdir-fix Ensure git_futils_mkdir won't mkdir root
Russell Belfer b832ecf7 2013-06-05T09:46:51 Ensure git_futils_mkdir won't mkdir root This makes sure that git_futils_mkdir always skips over the root directory at a minimum, even on platforms where the root is not simply '/'. Also, this removes the GIT_WIN32 ifdef in favor of making EACCES as a potentially recoverable error on all platforms.
Vicent Martí e236b37f 2013-06-05T09:16:19 Merge pull request #1633 from jamill/directory_create_fix Allow creation of directories under the volume root in Win32
Jameson Miller daf98cb2 2013-06-04T14:49:39 Allow creation of directories under the volume root in Win32 We ran into an issue where cloning a repository to a folder directly underneath the root of a volume (e.g. 'd:\libgit2') would fail with an access denied error. This was traced down to a call to make a directory that is the root (e.g. 'd:') could return an error indicated access denied instead of an error indicating the path already exists. This change now handles the access denied error on Win32 and checks for the existence of the folder.
Vicent Martí 947fad4f 2013-06-03T09:28:58 Merge pull request #1624 from libgit2/vmg/full-ref-iterator Breaking RefDB changes
Scott J. Goldman 9d9fff3c 2013-06-02T02:16:05 Merge pull request #1631 from scottjg/fix-timezone-parsing Don't bail on parsing commits with an invalid timezone
Scott J. Goldman dc33b3d7 2013-06-02T02:13:45 Don't bail on parsing commits with an invalid timezone 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.
Vicent Martí cfbd08a5 2013-06-01T04:28:24 Merge pull request #1630 from arrbee/index-read-tree-preserve-stat-cache Make git_index_read_tree preserve stat cache where possible
Russell Belfer 03a89070 2013-05-31T21:49:40 Make git_index_read_tree preserve stat cache Instead of just blowing away the stat cache data when loading a new tree into the index, this checks if each loaded item has a corresponding existing item with the same OID and if so, copies the stat data from the old item to the new one so it will not be blown away.
Vicent Martí efd5a4e1 2013-05-31T14:36:08 Merge pull request #1627 from arrbee/iterator-api-improvements Make iterators use GIT_ITEROVER & smart advance
Russell Belfer cee695ae 2013-05-31T12:18:43 Make iterators use GIT_ITEROVER & smart advance 1. internal iterators now return GIT_ITEROVER when you go past the last item in the iteration. 2. git_iterator_advance will "advance" to the first item in the iteration if it is called immediately after creating the iterator, which allows a simpler idiom for basic iteration. 3. if git_iterator_advance encounters an error reading data (e.g. a missing tree or an unreadable file), it returns the error but also attempts to advance past the invalid data to prevent an infinite loop. Updated all tests and internal usage of iterators to account for these new behaviors.
Vicent Martí 17ef7dbc 2013-05-31T09:51:53 Merge pull request #1626 from ethomson/index_ext_truncation improve test for index extension truncation
Edward Thomson 8c2458be 2013-05-31T11:41:33 improve test for index extension truncation
Vicent Martí 8d863aa2 2013-05-31T06:01:59 Merge pull request #1621 from NHDaly/clone_transport_flags Added support for setting transport flags (No check SSL cert) to git_clo...
Nathan Daly 88392914 2013-05-30T01:12:27 Added support for setting transport flags (No check SSL cert) to git_clone call.
Vicent Martí 9afc5971 2013-05-31T03:09:38 Merge pull request #1559 from carlosmn/ref-shorthand Introduce git_reference_shorthand
Vicent Martí af2c72d2 2013-05-31T03:08:48 Merge pull request #1623 from yorah/fix/tag_auto remote: make default tag retrieving behaviour consistent
Vicent Martí 9d6d809b 2013-05-31T03:06:07 Merge pull request #1530 from veeti/http-parser Build with the system's http-parser installation if available
Vicent Marti 1ed356dc 2013-05-30T21:04:28 Frees
Veeti Paananen 7a6e0281 2013-05-02T14:07:22 Build with the system's http-parser installation if available
yorah df50512a 2013-05-30T18:06:54 Proposal to handle default value (auto = 0)
yorah 215af2cc 2013-05-30T17:40:56 remote: make default tag retrieving behaviour consistent Default for newly created remotes will be auto. Default when loading existing remotes with no tag retrieving behaviour set, was already auto.
Ben Straub b2984e8a 2013-05-30T08:43:14 Merge pull request #1622 from yorah/fix/thread-segfault thread: fix segfault on Windows 64 bits
Vicent Marti 979f75d8 2013-05-30T17:19:43 Refcounting
yorah d17db2fd 2013-05-30T11:30:34 thread: fix segfault on Windows 64 bits `lpExitCode` is a pointer to a long. A long is 32 bits wide on Windows. It means that on Windows 64bits, `GetExitCodeThread()` doesn't set/clear the high-order bytes of the 64 bits memory space pointed at by `value_ptr`.
Vicent Marti 4e6e2ff2 2013-05-30T03:47:10 ...Aaaand this works
Russell Belfer 0c01f93e 2013-05-29T14:50:24 Merge pull request #1619 from ethomson/gitignore_slash allow (ignore) bare slash in gitignore
Edward Thomson 2d160ef7 2013-05-29T16:03:30 allow (ignore) bare slash in gitignore
Vicent Marti ec24e542 2013-05-29T22:47:37 What are the chances, really
Vicent Martí 17776314 2013-05-29T09:55:51 Merge pull request #1617 from arrbee/fix-oid-memory-leak Fix memory leak in oid shortener tests
Russell Belfer ca9b1702 2013-05-29T09:18:21 Fix memory leak in oid shortener tests
Edward Thomson 504a4fd1 2013-05-28T14:12:55 Merge pull request #1615 from arthurschreiber/patch-1 Fix two typos in the merge docs.
Arthur Schreiber 31a61181 2013-05-29T00:02:26 Fix two typos in the merge docs.
Vicent Marti 56960b83 2013-05-28T20:47:55 Liike this
Vicent Marti 2638a03a 2013-05-28T17:50:47 This refs iterator pleases the gods.
Russell Belfer 9007c53f 2013-05-27T16:45:22 Fixing unwrapped calloc
Vicent Martí 8baca134 2013-05-27T06:15:28 Merge pull request #1614 from schu/packbuilder-write packbuilder: also write index in git_packbuilder_write
Michael Schubert 563c19a9 2013-05-11T11:36:29 packbuilder: also write index in git_packbuilder_write git_packbuilder_write() used to write a packfile to the passed file path. Instead, ask for a destination directory and create both the packfile and an index, as most users probably do expect.
Vicent Martí 63908cee 2013-05-27T03:24:52 Merge pull request #1613 from schu/transport-ssh tests: don't verify SSH unsupported with GIT_SSH
Michael Schubert 0582ae6f 2013-05-21T13:56:40 tests: don't verify SSH unsupported with GIT_SSH
Russell Belfer 5aee9632 2013-05-26T08:45:30 Merge pull request #1612 from drodriguez/fix-branch-delete-docs Fix documentation of git_branch_delete.
Daniel Rodríguez Troitiño f8bd730c 2013-05-26T17:29:00 Fix documentation of git_branch_delete. The reference should be freed by the user, not the library.
Vicent Martí 0d77647a 2013-05-25T09:45:02 Merge pull request #1609 from ethomson/qsort_r_glibc qsort_r appeared in glibc 2.8
Edward Thomson c37fb41a 2013-05-25T12:35:55 qsort_r appeared in glibc 2.8
Vicent Martí 85281328 2013-05-24T11:39:56 Merge pull request #1608 from arrbee/various-cleanups-and-tweaks Various cleanups and tweaks
Russell Belfer 7a5ee3dc 2013-05-24T11:09:04 Add ~ expansion to global attributes and excludes This adds ~/ prefix expansion for the value of core.attributesfile and core.excludesfile, plus it fixes the fact that the attributes cache was holding on to the string data from the config for a long time (instead of making its own strdup) which could have caused a problem if the config was refreshed. Adds a test for the new expansion capability.
Russell Belfer d20b0449 2013-05-24T10:37:40 Clarify GIT_DIFF_INCLUDE_UNTRACKED_CONTENT option This improves the docs for GIT_DIFF_INCLUDE_UNTRACKED_CONTENT as well as the other flags related to UNTRACKED items in diff, plus it makes that flag now automatically turn on GIT_DIFF_INCLUDE_UNTRACKED which seems like a reasonable dwim type of change.
Russell Belfer 16adc9fa 2013-05-24T10:35:58 Typedef git_config_level_t and use it everywhere The GIT_CONFIG_LEVEL constants actually work well as an enum because they are mutually exclusive, so this adds a typedef to the enum and uses that everywhere that one of these constants are expected, instead of the old code that typically used an unsigned int.
Russell Belfer 2e62e7c2 2013-05-24T10:33:41 Docs for git_libgit2_opts and cache disable tweak This adds docs for the cache control options to git_libgit2_opts and also tweaks the cache code so that if the cache is disabled, then the next time we attempt to insert something into the cache in question, we will actually clear any old cached objects.
Russell Belfer 0f1f9833 2013-05-24T10:32:07 Add typedefs on some public enums Apparently this makes things easier to bind in some languages.
Russell Belfer 5e57cfa1 2013-05-24T09:12:17 Merge pull request #1607 from ethomson/hurd qsort_r is broken on HURD, avoid
Vicent Martí 4bc67efd 2013-05-24T05:36:23 Merge pull request #1605 from ethomson/replace_reuc_fix Cherry picking REUC fixes
Russell Belfer 43efc449 2013-05-16T11:03:55 Ensure reuc vector is always valid In theory, if there was a problem reading the REUC data, the read_reuc() routine could have left uninitialized and invalid data in the git_index vector. This moves the line that inserts a new entry into the vector down to the bottom of the routine so we know all the content is already valid. Also, per @linquize, this uses calloc to ensure no uninitialized data.
Edward Thomson 25a899ec 2013-05-24T10:30:32 qsort_r is broken on HURD, avoid
Vicent Martí 26ab6284 2013-05-24T03:30:35 Merge pull request #1593 from ethomson/conflict_iterator introduce git_conflict_iterator
Vicent Martí f7ceef06 2013-05-24T03:24:27 Merge pull request #1592 from ethomson/merge_setup merge setup
Vicent Martí 4811c150 2013-05-24T01:14:52 Merge pull request #1603 from ben/shallow Shallow-clone detection
Vicent Martí 30caf0cf 2013-05-24T01:13:48 Merge pull request #1595 from arrbee/even-more-rename-fixes Even more rename detection fixes
Vicent Martí 87a56fe0 2013-05-24T00:44:50 Merge pull request #1604 from arrbee/config-file-checks Extend checking for config with no files
Ben Straub 6f0b8142 2013-05-23T17:28:52 Stop leaking memory
Russell Belfer 0700ca1a 2013-05-23T16:11:53 More config code checks and cleanups
Russell Belfer 3b32b6d3 2013-05-23T09:19:42 More tests of config with various absent files Plus a bit of extra paranoia to ensure config object has valid contents.
Russell Belfer 49f70f2c 2013-05-23T15:48:06 Fill out diff rename test coverage This extends the rename tests to make sure that every rename scenario in the inner loop of git_diff_find_similar is actually exercised. Also, fixes an incorrect assert that was in one of the clauses that was not previously being exercised.
Ben Straub 93d8f77f 2013-05-23T15:11:53 Improve test failure output
Russell Belfer f38cea97 2013-05-23T15:21:43 Move core.abbrev lookup out of diff print loop This moves the GIT_CVAR_ABBREV lookup out of the loop. Also, this fixes git_diff_print_raw to actually use that constant instead of hardcoding 7 characters.
Russell Belfer 67db583d 2013-05-23T15:06:07 More diff rename tests; better split swap handling This adds a couple more tests of different rename scenarios. Also, this fixes a problem with the case where you have two "split" deltas and the left half of one matches the right half of the other. That case was already being handled, but in the wrong order in a way that could result in bad output. Also, if the swap also happened to put the other two halves into the correct place (i.e. two files exchanged places with each other), then the second delta was left with the SPLIT flag set when it really should be cleared.
Russell Belfer c68b09dc 2013-05-23T11:52:34 Fix dereference of freed delta I was accidentally using a value that I had just freed. This moves the clearing of the delta internal flags into a better place.
Ben Straub 9c941ccf 2013-05-23T08:52:24 Merge pull request #1599 from nulltoken/topic/windows_resources Update windows resources to match the dll name
Ben Straub c4085fbf 2013-05-23T07:31:05 Merge pull request #1601 from Merovius/bugfix_shorten Bugfix: Return NULL in push_leaf, when trie is full
Axel Wagner 06c070b5 2013-05-23T09:43:56 Add testcase for #1600
Russell Belfer a21cbb12 2013-05-22T10:37:12 Significant rename detection rewrite This flips rename detection around so instead of creating a forward mapping from deltas to possible rename targets, instead it creates a reverse mapping, looking at possible targets and trying to find a source that they could have been renamed or copied from. This is important because each output can only have a single source, but a given source could map to multiple outputs (in the form of COPIED records). Additionally, this makes a couple of tweaks to the public rename detection APIs, mostly renaming a couple of options that control the behavior to make more sense and to be more like core Git. I walked through the tests looking at the exact results and updated the expectations based on what I saw. The new code is different from the old because it cannot give some nonsense results (like A was renamed to both B and C) which were part of the outputs previously.
Axel Wagner 52f537e9 2013-05-22T02:04:12 Bugfix: Return NULL in push_leaf, when trie is full os->full was set 1, but the overflowed idx_leaf was still used to index into os->nodes a little later. Returning NULL fixes that.
nulltoken 095bfd74 2013-05-21T11:38:24 cmake: Update Windows resources to reflect the optional vendor string Make InternalName and OriginalFilename resources reflect the name of the compiled binary.
nulltoken ccf1a2ba 2013-05-21T11:37:13 cmake: Fix indentation
Ben Straub 6828bf26 2013-05-21T10:49:36 Merge pull request #1594 from nulltoken/topic/tag_annotation tag: Introduce git_tag_annotation_create()
nulltoken b81cc1d6 2013-05-18T16:52:16 tag: Introduce git_tag_annotation_create()
Ben Straub e167ec18 2013-05-21T08:09:17 Merge pull request #1597 from zodiac/patch-1 define "long name" in git_reference_name_to_id
Carlos Martín Nieto fc74343f 2013-05-21T16:51:50 refs: export the glob iterator
Li Xuanji e069478e 2013-05-21T21:35:58 define "long name" in git_reference_name_to_id
Edward Thomson 60750fc4 2013-05-20T13:53:00 Merge pull request #1596 from grimreaper/development Initialize loose_deleted before it is used for a check later on.
Russell Belfer 4742148d 2013-05-20T13:41:39 Add more diff rename detection tests This adds a bunch more rename detection tests including checks vs the working directory, the new exact match options, some more whitespace variants, etc. This also adds a git_futils_writebuffer helper function and uses it in checkout. This is mainly added because I wanted an easy way to write out a git_buf to disk inside my test code.
Russell Belfer 9be5be47 2013-05-20T13:37:21 More git_diff_find_similar improvements - Add new GIT_DIFF_FIND_EXACT_MATCH_ONLY flag to do similarity matching without using the similarity metric (i.e. only compare the SHA). - Clean up the similarity measurement code to more rigorously distinguish between files that are not similar and files that are not comparable (previously, a 0 could either mean that the files could not be compared or that they were totally different) - When splitting a MODIFIED file into a DELETE/ADD pair, actually make a DELETED/UNTRACKED pair if the right side of the diff is from the working directory. This prevents an odd mix of ADDED and UNTRACKED files on workdir diffs.
Eitan Adler 038c1654 2013-05-19T01:41:00 Initialize loose_deleted before it is used for a check later on.
Russell Belfer 5c8f37a3 2013-05-17T17:33:03 Extend diff example Add --raw output format and (some) options to invoke rename/copy detection on the diff.
Russell Belfer d958e37a 2013-05-17T17:21:45 Fix issues with git_diff_find_similar There are a number of bugs in the rename code that only were obvious when I started testing it against large old repos with more complex patterns. (The code to do that testing is not ready to merge with libgit2, but I do plan to add more thorough tests.) This contains a significant number of changes and also tweaks the public API slightly to make emulating core git easier. Most notably, this separates the GIT_DIFF_FIND_AND_BREAK_REWRITES flag into FIND_REWRITES (which adds a self-similarity score to every modified file) and BREAK_REWRITES (which splits the modified deltas into add/remove pairs in the diff list). When you do a raw output of core git, rewrites show up as M090 or such, not at A and D output, so I wanted to be able to emulate that. Publicly, this also changes the flags to be uint16_t since we don't need values out of that range. Internally, this contains significant changes from a number of small bug fixes (like using the wrong side of the diff to decide if the object could be found in the ODB vs the workdir) to larger issues about which files can and should be compared and how the various edge cases of similarity scores should be treated. Honestly, I don't think this is the last update that will have to be made to this code, but I think this moves us closer to correct behavior and I tried to document the code so it would be easier to follow..
Russell Belfer 0293450e 2013-05-17T16:57:49 Fix delta compare to use correct pathname The delta cmp function needs to choose the correct path for ordering when a delta is ADDED, RENAMED, or COPIED.
Russell Belfer aadfa85b 2013-05-17T16:41:15 Add git_diff_print_raw printing helper Makes it easier to emulate the --raw option