summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* refs: explicitly catch leading slashesCarlos Martín Nieto2013-03-072-0/+9
| | | | | | | | | | 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().
* No longer need clar_main.cRussell Belfer2013-03-061-3453/+0
|
* Merge pull request #1396 from cholin/features/note-iteratorRussell Belfer2013-03-065-27/+3644
|\ | | | | [RFC] basic note iterator implementation
| * added missing free for git_note in clar testsNico von Geyso2013-03-062-1/+3
| |
| * fixed minor issues with new note iteratorNico von Geyso2013-03-064-62/+49
| | | | | | | | | | * fixed style issues * use new iterator functions for git_note_foreach()
| * use git_note_iterator type instead of non-public git_iterator oneNico von Geyso2013-03-064-10/+3481
| |
| * basic note iterator implementationNico von Geyso2013-03-064-10/+167
| | | | | | | | | | * git_note_iterator_new() - create a new note iterator * git_note_next() - retrieves the next item of the iterator
* | MSVC: Define NDEBUG to disable asserts in release buildsPhilip Kelley2013-03-061-3/+4
|/
* Merge pull request #1392 from ethomson/push_test_fixVicent Martí2013-03-061-1/+2
|\ | | | | remote push test fix
| * remote push test fixEdward Thomson2013-03-051-1/+2
|/
* Merge pull request #1369 from arrbee/repo-init-template-hooksVicent Martí2013-03-059-97/+332
|\ | | | | More tests (and fixes) for initializing repo from template
| * Make mode handling during init more like gitRussell Belfer2013-02-275-60/+70
| | | | | | | | | | | | | | | | | | | | | | 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.)
| * Fix portability issues on WindowsRussell Belfer2013-02-264-14/+43
| | | | | | | | | | | | 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.
| * Fix initialization of repo directoriesRussell Belfer2013-02-266-82/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Make sure docurium can see git_packbuilder_foreachCarlos Martín Nieto2013-03-051-1/+1
| |
* | Merge pull request #1380 from phkelley/index_icaseVicent Martí2013-03-043-3/+21
|\ \ | | | | | | Disable ignore_case when writing the index to a tree
| * | Rename function to __ prefixPhilip Kelley2013-03-013-6/+6
| | |
| * | Disable ignore_case when writing the index to a treePhilip Kelley2013-03-013-3/+21
| | |
* | | Merge pull request #1390 from ethomson/reuc_clearVicent Martí2013-03-044-19/+114
|\ \ \ | | | | | | | | clear REUC on checkout
| * | | clear REUC on checkoutEdward Thomson2013-03-044-19/+114
|/ / /
* | | Fix a few leaksCarlos Martín Nieto2013-03-044-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | `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.
* | | Merge pull request #1388 from carlosmn/hash-ref-deltaVicent Martí2013-03-034-26/+34
|\ \ \ | | | | | | | | indexer: use a hashtable for keeping track of offsets
| * | | indexer: use a hashtable for keeping track of offsetsCarlos Martín Nieto2013-03-034-26/+34
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #1387 from carlosmn/kill-indexerVicent Martí2013-03-033-383/+19
|\ \ \ | | | | | | | | indexer: kill git_indexer
| * | | indexer: kill git_indexerCarlos Martín Nieto2013-03-033-383/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #1386 from arrbee/update-docsVicent Martí2013-03-023-86/+177
|\ \ \ \ | |/ / / |/| | | Update contributing and conventions
| * | | Fixed a couple typosRussell Belfer2013-03-022-2/+1
| | | |
| * | | Simplify diff example using revparseRussell Belfer2013-03-021-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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!
| * | | Updates to CONTRIBUTING and CONVENTIONSRussell Belfer2013-03-022-66/+177
|/ / / | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #1382 from arrbee/fix-diff-patch-a-different-wayVicent Martí2013-03-012-12/+4
|\ \ \ | | | | | | | | Allow empty config object and use it for tests
| * | | Allow empty config object and use itRussell Belfer2013-03-012-12/+4
|/ / / | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #1379 from arrbee/fix-tests-with-autocrlf-input-on-windowsPhilip Kelley2013-03-011-2/+13
|\ \ \ | |/ / |/| | Control for core.autocrlf during testing
| * | Control for core.autocrlf during testingRussell Belfer2013-03-011-2/+13
| | |
* | | Merge pull request #1378 from jamill/clone_no_deleteVicent Martí2013-03-014-2/+91
|\ \ \ | |/ / |/| | Clone should not clean up directories it did not create
| * | Clone should not delete directories it did not createJameson Miller2013-03-014-2/+91
|/ /
* | Merge pull request #1373 from arrbee/why-cdecl-whyVicent Martí2013-02-284-12/+22
|\ \ | | | | | | Why cdecl why?
| * | Fix some deprecation warnings on WindowsRussell Belfer2013-02-283-4/+10
| | | | | | | | | | | | | | | This fixes some snprintf and vsnprintf related deprecation warnings we've been having on Windows with recent compilers.
| * | Add GIT_STDLIB_CALLRussell Belfer2013-02-283-10/+7
| | | | | | | | | | | | | | | | | | 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.
| * | fixing some warnings on WindowsRussell Belfer2013-02-271-5/+5
| | |
| * | use cdecl for hashsig sorting functions on WindowsRussell Belfer2013-02-271-3/+10
| | |
* | | w32-posix: Wrap the `timezone` declaration with a clauseVicent Marti2013-02-281-0/+3
|/ / | | | | | | Allows compilation in newer versions of MinGW that already defined it.
* | Merge pull request #1233 from arrbee/file-similarity-metricVicent Martí2013-02-2734-297/+1409
|\ \ | | | | | | Add file similarity scoring to diff rename/copy detection
| * | More rename detection testsRussell Belfer2013-02-221-15/+99
| | | | | | | | | | | | | | | | | | 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.
| * | Minor improvements to find_similar codeRussell Belfer2013-02-221-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Replace static data with configured metricRussell Belfer2013-02-221-42/+29
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Fix tests for find_similar and relatedRussell Belfer2013-02-222-14/+41
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Add diff rename tests with partial similarityRussell Belfer2013-02-2123-84/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| * | Initial integration of similarity metric to diffRussell Belfer2013-02-214-76/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Replace diff delta binary with flagsRussell Belfer2013-02-208-122/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Refine pluggable similarity APIRussell Belfer2013-02-205-17/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.