Log

Author Commit Date CI Message
Carlos Martín Nieto 0887b580 2013-03-08T15:13:25 Use C99 stdio in mingw-w64 MinGW >= 3.14 does this automatically, but mingw-64 wants us to define it.
Vicent Martí 92ebbe99 2013-03-07T12:06:18 Merge pull request #1399 from nathan-osman/development Add SONAME build option to facilitate building for Android.
Vicent Martí 6f83a781 2013-03-07T11:14:03 Merge pull request #1403 from ethomson/tracing Optional tracing back to consumers
Edward Thomson b5ec5430 2013-03-04T23:52:30 optional tracing
Vicent Marti 33abaad8 2013-03-07T18:58:34 refs: Dude, you're OUT.
Vicent Marti cdaef180 2013-03-07T18:44:10 Merge remote-tracking branch 'ethomson/immutable_refs' into development
Edward Thomson d00d5464 2013-03-01T15:37:33 immutable references and a pluggable ref database
Vicent Martí 6a9ef012 2013-03-07T07:47:20 Merge pull request #1401 from carlosmn/leading-slash refs: explicitly catch leading slashes
Carlos Martín Nieto bb45c57f 2013-03-07T16:38:44 refs: explicitly catch leading slashes It's somewhat common to try to write "/refs/tags/something". There is no easy way to catch it during the main body of the function, as there is no way to distinguish whether it's a leading slash or a double slash somewhere in the middle. Catch this at the beginning so we don't trigger the assert in is_all_caps_and_underscore().
Nathan Osman e7da9acd 2013-03-06T17:51:38 Added build option SONAME to control whether VERSION and SOVERSION were set for the git2 target, as some platforms require that this NOT be set.
Russell Belfer 9952f24e 2013-03-06T16:02:26 No longer need clar_main.c
Russell Belfer 1b405a23 2013-03-06T13:58:21 Merge pull request #1396 from cholin/features/note-iterator [RFC] basic note iterator implementation
Nico von Geyso aa518c70 2013-03-06T22:51:20 added missing free for git_note in clar tests
Nico von Geyso f7b18502 2013-03-06T22:25:01 fixed minor issues with new note iterator * fixed style issues * use new iterator functions for git_note_foreach()
Philip Kelley 69c28b75 2013-03-06T13:22:50 MSVC: Define NDEBUG to disable asserts in release builds
Nico von Geyso 1a90dcf6 2013-03-06T19:07:56 use git_note_iterator type instead of non-public git_iterator one
Nico von Geyso 6edb427b 2013-03-06T16:43:21 basic note iterator implementation * git_note_iterator_new() - create a new note iterator * git_note_next() - retrieves the next item of the iterator
Vicent Martí d1bcc1a8 2013-03-06T03:05:10 Merge pull request #1392 from ethomson/push_test_fix remote push test fix
Edward Thomson 4cc326e9 2013-03-05T22:45:26 remote push test fix
Vicent Martí b72f5d40 2013-03-05T15:35:28 Merge pull request #1369 from arrbee/repo-init-template-hooks More tests (and fixes) for initializing repo from template
Carlos Martín Nieto 3d74702e 2013-03-05T23:50:43 Make sure docurium can see git_packbuilder_foreach
Vicent Martí b8daa9e0 2013-03-04T16:19:38 Merge pull request #1380 from phkelley/index_icase Disable ignore_case when writing the index to a tree
Vicent Martí f6d96409 2013-03-04T16:13:31 Merge pull request #1390 from ethomson/reuc_clear clear REUC on checkout
Edward Thomson 5bddabcc 2013-03-04T17:40:48 clear REUC on checkout
Carlos Martín Nieto 323bb885 2013-03-04T00:21:56 Fix a few leaks `git_diff_get_patch()` would unconditionally load the patch object and then simply leak it if the user hadn't requested it. Short-circuit loading the object if the user doesn't want it. The rest of the plugs are simply calling the free functions of objects allocated during the tests.
Vicent Martí dce5f26f 2013-03-03T14:46:01 Merge pull request #1388 from carlosmn/hash-ref-delta indexer: use a hashtable for keeping track of offsets
Carlos Martín Nieto 0e040c03 2013-03-03T14:50:47 indexer: use a hashtable for keeping track of offsets These offsets are needed for REF_DELTA objects, which encode which object they use as a base, but not where it lies in the packfile, so we need a list. These objects are mostly from older packfiles, before OFS_DELTA was widely spread. The time spent in indexing these packfiles is greatly reduced, though remains above what git is able to do.
Vicent Martí 29ab8774 2013-03-03T06:38:33 Merge pull request #1387 from carlosmn/kill-indexer indexer: kill git_indexer
Carlos Martín Nieto 447ae791 2013-03-03T15:19:21 indexer: kill git_indexer This was the first implementation and its goal was simply to have something that worked. It is slow and now it's just taking up space. Remove it and switch the one known usage to use the streaming indexer.
Vicent Martí bb19532c 2013-03-02T14:29:39 Merge pull request #1386 from arrbee/update-docs Update contributing and conventions
Russell Belfer a313de0d 2013-03-02T13:58:05 Fixed a couple typos
Russell Belfer 7bd53bf3 2013-03-02T13:52:38 Simplify diff example using revparse When the examples/diff.c was written, there was not yet a revparse API. Now we can use it to make command line parsing way better with less code. Yay!
Russell Belfer 1631147c 2013-03-02T13:51:31 Updates to CONTRIBUTING and CONVENTIONS The discussion about converting some of our foreach-style APIs to use iterator objects got me wanting to make a list of good starter projects. I put it in CONTRIBUTING.md and then went crazy with updates to that file and to CONVENTIONS.md.
Vicent Martí 01be7863 2013-03-01T14:28:47 Merge pull request #1382 from arrbee/fix-diff-patch-a-different-way Allow empty config object and use it for tests
Russell Belfer 487fc724 2013-03-01T13:41:53 Allow empty config object and use it This removes assertions that prevent us from having an empty git_config object and then updates some tests that were dependent on global config state to use an empty config before running anything.
Philip Kelley cb53669e 2013-03-01T16:38:13 Rename function to __ prefix
Philip Kelley 47f70846 2013-03-01T13:27:46 Merge pull request #1379 from arrbee/fix-tests-with-autocrlf-input-on-windows Control for core.autocrlf during testing
Philip Kelley 3f0d0c85 2013-03-01T15:44:18 Disable ignore_case when writing the index to a tree
Russell Belfer 7d46b34b 2013-03-01T12:26:05 Control for core.autocrlf during testing
Vicent Martí 426b2e2f 2013-03-01T12:10:06 Merge pull request #1378 from jamill/clone_no_delete Clone should not clean up directories it did not create
Jameson Miller 926acbcf 2013-03-01T11:07:53 Clone should not delete directories it did not create
Vicent Martí cc427158 2013-02-28T15:09:32 Merge pull request #1373 from arrbee/why-cdecl-why Why cdecl why?
Russell Belfer f443a72d 2013-02-28T14:41:26 Fix some deprecation warnings on Windows This fixes some snprintf and vsnprintf related deprecation warnings we've been having on Windows with recent compilers.
Russell Belfer 97b71374 2013-02-28T14:14:45 Add GIT_STDLIB_CALL This removes the one-off GIT_CDECL and adds a new standard way of doing this named GIT_STDLIB_CALL with a src/win32 specific def when on the Windows platform.
Vicent Marti 5fa8abb8 2013-02-28T17:36:20 w32-posix: Wrap the `timezone` declaration with a clause Allows compilation in newer versions of MinGW that already defined it.
Russell Belfer f708c89f 2013-02-27T15:15:39 fixing some warnings on Windows
Russell Belfer 11b5beb7 2013-02-27T15:07:28 use cdecl for hashsig sorting functions on Windows
Vicent Martí e68e33f3 2013-02-27T14:50:32 Merge pull request #1233 from arrbee/file-similarity-metric Add file similarity scoring to diff rename/copy detection
Russell Belfer 9f9477d6 2013-02-27T14:21:41 Merge pull request #1372 from ethomson/checkout_workdir_end don't dereference at the end of the workdir iterator
Russell Belfer 18f08264 2013-02-27T13:44:15 Make mode handling during init more like git When creating files, instead of actually using GIT_FILEMODE_BLOB and the other various constants that happen to correspond to mode values, apparently I should be just using 0666 and 0777, and relying on the umask to clear bits and make the value sane. This fixes the rules for copying a template directory and fixes the checks to match that new behavior. (Further changes to the checkout logic to follow separately.)
Edward Thomson 395509ff 2013-02-27T14:47:39 don't dereference at the end of the workdir iterator
Vicent Martí c493f821 2013-02-27T11:01:16 Merge pull request #1371 from csware/version-constants Win32: Use constants in version resource definitions where possible
Sven Strickroth 82ac1f76 2013-02-27T19:48:02 Win32: Use constants in version resource definitions where possible Signed-off-by: Sven Strickroth <email@cs-ware.de>
Russell Belfer 0d1b094b 2013-02-26T13:15:06 Fix portability issues on Windows The new tests were not taking core.filemode into account when testing file modes after repo initialization. Fixed that and some other Windows warnings that have crept in.
Russell Belfer 3c42e4ef 2013-02-26T11:43:14 Fix initialization of repo directories When PR #1359 removed the hooks from the test resources/template directory, it made me realize that the tests for git_repository_init_ext using templates must be pretty shabby because we could not have been testing if the hooks were getting created correctly. So, this started with me recreating a couple of hooks, including a sample and symlink, and adding tests that they got created correctly in the various circumstances, including with the SHARED modes, etc. Unfortunately this uncovered some issues with how directories and symlinks were copied and chmod'ed. Also, there was a FIXME in the code related to the chmod behavior as well. Going back over the directory creation logic for setting up a repository, I found it was a little difficult to read and could result in creating and/or chmod'ing directories that the user almost certainly didn't intend. So that let to this work which makes repo initialization much more careful (and hopefully easier to follow). It required a couple of extensions / changes to core fileops utilities, but I also think those are for the better, at least for git_futils_cp_r in terms of being careful about what actions it takes.
Vicent Martí 69903777 2013-02-26T09:29:27 Merge pull request #1368 from scunz/inc_ref Increment reference counter in git_repository_set_config
Sascha Cunz 25e7c9b7 2013-02-26T18:21:03 Increment reference counter in git_repository_set_config This fixes #1365
Edward Thomson 3e212548 2013-02-26T07:06:42 Merge pull request #1364 from martinwoodward/thank-martin Give props to Martin Pool
Martin Woodward 5c46937b 2013-02-26T09:00:37 Give props to Martin Pool Martin Pool was the original author of the code referenced in the clone example. Make note that he's given his permission and also give him the proper credit.
Michael Schubert 8005c6d4 2013-02-26T01:03:56 Revert "hash: remove git_hash_init from internal api" This reverts commit efe7fad6c96a3d6197a218aeaa561ec676794499, except for the indentation fixes.
Vicent Martí f657688b 2013-02-25T15:41:56 Merge pull request #1363 from schu/hash-initialization hash: remove git_hash_init from internal api
Michael Schubert efe7fad6 2013-02-26T00:05:28 hash: remove git_hash_init from internal api Along with that, fix indentation in tests-clar/object/raw/hash.c
Michael Schubert be225be7 2013-02-25T23:36:25 tests/pack: fixup 6774b10 Initialize the hash ctx with git_hash_ctx_init, not git_hash_init.
Vicent Martí 989abe9b 2013-02-25T14:03:42 Merge pull request #1362 from schu/packbuilder-nits packbuilder: minor improvements
Michael Schubert 6774b107 2013-02-17T17:52:16 tests/pack: do strict check of testpack's SHA1 hash
Michael Schubert fcc265fe 2013-02-17T16:52:26 pack.h: improve docs on how to create a packfile
Vicent Martí 25a0831f 2013-02-25T09:07:45 Merge pull request #1359 from martinwoodward/remove-sample-hooks Remove sample hook files
Martin Woodward fc6c5b50 2013-02-25T17:03:05 Remove sample hook files Getting rid of sample hook files from test repos as they just take up space with no value.
Vicent Martí 5eeb357d 2013-02-23T03:39:11 Merge pull request #1355 from phkelley/development Portability fixes for Solaris
Vicent Martí 68fec637 2013-02-22T12:26:01 Merge pull request #1356 from arrbee/fix-directory-as-ignore-file Do not fail if .gitignore is directory
Russell Belfer 37d91686 2013-02-22T12:21:54 Do not fail if .gitignore is directory This is designed to fix libgit2sharp #350 where if .gitignore is a directory we abort all operations that process ignores instead of just skipping it as core git does. Also added test that fails without this change and passes with it.
Russell Belfer 1be4ba98 2013-02-22T11:13:01 More rename detection tests This includes tests for crlf changes, whitespace changes with the default comparison and with the ignore whitespace comparison, and more sensitivity checking for the comparison code.
Philip Kelley 7beeb3f4 2013-02-22T14:03:44 Rename 'exp' so it doesn't conflict with exp()
Russell Belfer 0a008913 2013-02-22T10:21:02 Minor improvements to find_similar code This moves a couple of checks outside of the inner loop of the find_similar rename/copy detection phase that are only dependent on the "from" side of a detection. Also, this replaces the inefficient initialization of the options structure when a value is not provided explicitly by the user.
Russell Belfer f8275890 2013-02-22T10:19:50 Replace static data with configured metric Instead of creating three git_diff_similarity_metric statically for the various config options, just create the metric structure on demand and populate it, using the payload to specific the extra flags that should be passed to the hashsig. This removes a level of obfuscation from the code, I think.
Russell Belfer 6f9d5ce8 2013-02-22T10:17:08 Fix tests for find_similar and related This fixes both a test that I broke in diff::patch where I was relying on the current state of the working directory for the renames test data and fixes an unstable test in diff::rename where the environment setting for the "diff.renames" config was being allowed to influence the test results.
Vicent Martí 06eaa06f 2013-02-22T09:48:47 Merge pull request #1343 from nulltoken/topic/remote_orphaned_branch Teach git_branch_remote_name() to work with orphaned heads
Vicent Martí 698bf1da 2013-02-22T09:48:34 Merge pull request #1354 from nulltoken/fix/stash-drop Fix git_stash_drop()
Philip Kelley 6c72035f 2013-02-22T12:23:14 Portability fixes for Solaris
nulltoken bbc53e4f 2013-02-15T12:43:03 branch: refactor git_branch_remote_name() tests
nulltoken c1b5e8c4 2013-02-15T11:35:33 branch: Make git_branch_remote_name() cope with orphaned heads
nulltoken 9ccab8df 2013-02-22T15:25:06 stash: Update the reference when dropping the topmost stash
nulltoken 39bcb4de 2013-02-22T14:44:57 stash: Refactor stash::drop tests
nulltoken d788499a 2013-02-22T15:02:37 ignore: enhance git_ignore_path_is_ignored() test coverage
Russell Belfer d4b747c1 2013-02-21T16:44:44 Add diff rename tests with partial similarity This adds some new tests that actually exercise the similarity metric between files to detect renames, copies, and split modified files that are too heavily modified. There is still more testing to do - these tests are just partially covering the cases. There is also one bug fix in this where a change set with only MODIFY being broken into ADD/DELETE (due to low self-similarity) without any additional RENAMED entries would end up not processing the split requests (because the num_rewrites counter got reset).
Russell Belfer 960a04dd 2013-02-21T12:40:33 Initial integration of similarity metric to diff This is the initial integration of the similarity metric into the `git_diff_find_similar()` code path. The existing tests all pass, but the new functionality isn't currently well tested. The integration does go through the pluggable metric interface, so it should be possible to drop in an alternative to the internal metric that libgit2 implements. This comes along with a behavior change for an existing interface; namely, passing two NULLs to git_diff_blobs (or passing NULLs to git_diff_blob_to_buffer) will now call the file_cb parameter zero times instead of one time. I know it's strange that that change is paired with this other change, but it emerged from some initialization changes that I ended up making.
Vicent Martí 0309e850 2013-02-21T09:05:48 Merge pull request #1352 from ethomson/reuc_sort add a sorter to the reuc on index creation
Edward Thomson eb5ffd19 2013-02-21T11:00:29 add a sorter to the reuc on index creation
Russell Belfer 71a3d27e 2013-02-08T10:06:47 Replace diff delta binary with flags Previously the git_diff_delta recorded if the delta was binary. This replaces that (with no net change in structure size) with a full set of flags. The flag values that were already in use for individual git_diff_file objects are reused for the delta flags, too (along with renaming those flags to make it clear that they are used more generally). This (a) makes things somewhat more consistent (because I was using a -1 value in the "boolean" binary field to indicate unset, whereas now I can just use the flags that are easier to understand), and (b) will make it easier for me to add some additional flags to the delta object in the future, such as marking the results of a copy/rename detection or other deltas that might want a special indicator. While making this change, I officially moved some of the flags that were internal only into the private diff header. This also allowed me to remove a gross hack in rename/copy detect code where I was overwriting the status field with an internal value.
Russell Belfer 9bc8be3d 2013-02-19T10:25:41 Refine pluggable similarity API This plugs in the three basic similarity strategies for handling whitespace via internal use of the pluggable API. In so doing, I realized that the use of git_buf in the hashsig API was not needed and actually just made it harder to use, so I tweaked that API as well. Note that the similarity metric is still not hooked up in the find_similarity code - this is just setting out the function that will be used.
Russell Belfer a235e9d3 2013-02-15T14:12:43 Pluggable similarity metric API
Russell Belfer aa643260 2013-02-15T11:08:02 More tests of file signatures with whitespace opts Seems to be working pretty well...
Russell Belfer 5e5848eb 2013-02-14T17:25:10 Change similarity metric to sampled hashes This moves the similarity metric code out of buf_text and into a new file. Also, this implements a different approach to similarity measurement based on a Rabin-Karp rolling hash where we only keep the top 100 and bottom 100 hashes. In theory, that should be sufficient samples to given a fairly accurate measurement while limiting the amount of data we keep for file signatures no matter how large the file is.
Russell Belfer 99ba8f23 2013-01-22T15:27:08 wip: adding metric to diff
Russell Belfer f3327cac 2013-01-13T10:06:09 Some similarity metric adjustments This makes the text similarity metric treat \r as equivalent to \n and makes it skip whitespace immediately following a line terminator, so line indentation will have less effect on the difference measurement (and so \r\n will be treated as just a single line terminator). This also separates the text and binary hash calculators into two separate functions instead of have more if statements inside the loop. This should make it easier to have more differentiated heuristics in the future if we so wish.
Russell Belfer 9c454b00 2013-01-11T22:13:02 Initial implementation of similarity scoring algo This adds a new `git_buf_text_hashsig` type and functions to generate these hash signatures and compare them to give a similarity score. This can be plugged into diff similarity scoring.
Vicent Martí f2e1d060 2013-02-20T12:00:51 Merge pull request #1351 from arrbee/moar-treebuilder-tests Add more treebuilder tests
Russell Belfer 0cfce06d 2013-02-20T11:58:21 Add more treebuilder tests The recent changes with git_treebuilder_entrycount point out that the test coverage for git_treebuilder_remove and git_treebuilder_entrycount is completely absent. This adds tests.
Vicent Martí 6ec37f72 2013-02-20T11:42:15 Merge pull request #1350 from arrbee/fix-1292 Add explicit entrycount to tree builder
Russell Belfer e2237179 2013-02-20T10:58:56 Some code cleanups in tree.c This replaces most of the explicit vector iteration with calls to git_vector_foreach, adds in some git__free and giterr_clear calls to clean up during some error paths, and a couple of other code simplifications.