src


Log

Author Commit Date CI Message
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.
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.
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.
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
Edward Thomson 395509ff 2013-02-27T14:47:39 don't dereference at the end of the workdir iterator
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>
Sascha Cunz 25e7c9b7 2013-02-26T18:21:03 Increment reference counter in git_repository_set_config This fixes #1365
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.
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
Vicent Martí 5eeb357d 2013-02-23T03:39:11 Merge pull request #1355 from phkelley/development Portability fixes for Solaris
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 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.
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
Philip Kelley 6c72035f 2013-02-22T12:23:14 Portability fixes for Solaris
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
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.
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 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.
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
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.
Russell Belfer 93ab370b 2013-02-20T10:50:01 Store treebuilder length separately from entries vec The treebuilder entries vector flags removed items which means we can't rely on the entries vector length to accurately get the number of entries. This adds an entrycount value and maintains it while updating the treebuilder entries.
Russell Belfer f7511c2c 2013-02-20T10:19:58 Merge pull request #1348 from libgit2/signatures-2 Simplify signature parsing
Vicent Marti cf80993a 2013-02-20T18:46:10 signature: Small cleanup
Vicent Marti 41051e3f 2013-02-20T17:09:51 signature: Shut up MSVC, you silly goose
Vicent Marti c51880ee 2013-02-20T17:03:18 Simplify signature parsing
Russell Belfer 56543a60 2013-02-15T16:02:45 Clear up warnings from cppcheck The cppcheck static analyzer generates warnings for a bunch of places in the libgit2 code base. All the ones fixed in this commit are actually false positives, but I've reorganized the code to hopefully make it easier for static analysis tools to correctly understand the structure. I wouldn't do this if I felt like it was making the code harder to read or worse for humans, but in this case, these fixes don't seem too bad and will hopefully make it easier for better analysis tools to get at any real issues.
Russell Belfer 71d62d39 2013-02-15T16:01:31 Fix memory leak in p_getaddrinfo on Amiga If gethostbyname() fails on platforms with NO_ADDRINFO, the code leaks the struct addrinfo that was allocated. This fixes that (and a number of code formatting issues in that area of code in src/posix.c).
Ben Straub a9e1339c 2013-02-14T08:12:05 Fix a leak when canceling a network operation
Philip Kelley 2fe67aeb 2013-02-14T08:46:58 Fix a git_filebuf leak (fixes Win32 clone::can_cancel)
Philip Kelley 5f633e91 2013-02-13T18:12:51 Change git2.rc to identify git.dll as VOS_NT_WINDOWS32
Ben Straub 6a0ffe84 2013-02-12T10:50:55 Merge pull request #1333 from phkelley/push_options Add git_push_options, to set packbuilder parallelism
Russell Belfer fbe67de9 2013-02-12T10:16:30 Merge pull request #1246 from arrbee/fix-force-text-for-diff-blobs Add FORCE_TEXT check into git_diff_blobs code path
Russell Belfer 9c258af0 2013-02-12T10:13:56 Merge pull request #1316 from ben/clone-cancel Allow network operations to cancel
Russell Belfer ed55fd8b 2013-02-11T13:29:07 Reorganize FORCE_TEXT diff flag checks
Russell Belfer c2907575 2013-01-15T09:24:17 Add FORCE_TEXT check into git_diff_blobs code path `git_diff_blobs` and `git_diff_blob_to_buffer` skip the step where we check file attributes because they don't have a filename associated with the data. Unfortunately, this meant they were also skipping the check for the GIT_DIFF_FORCE_TEXT option and so you could not force a diff of an apparent binary file. This adds the force text check into their code path.
nulltoken 2bca5b67 2013-02-07T23:44:18 remote: Introduce git_remote_is_valid_name() Fix libgit2/libgit2sharp#318
nulltoken 4d811c3b 2013-02-07T23:40:10 refs: No component of a refname can end with '.lock'
Russell Belfer 390a3c81 2013-02-11T11:44:00 Merge pull request #1190 from nulltoken/topic/reset-paths reset: Allow the selective reset of pathspecs
Philip Kelley e026cfee 2013-02-11T09:12:39 Merge pull request #1323 from jamill/resolve_remote Resolve a remote branch's remote
Jameson Miller db4bb415 2013-02-07T14:53:52 Teach refspec to transform destination reference to source reference
Jameson Miller 2e3e8c88 2013-02-08T11:05:47 Teach remote branch to return its remote
Philip Kelley b8b897bb 2013-02-11T08:28:53 Add git_push_options, to set packbuilder parallelism
Philip Kelley 8c29dca6 2013-02-11T09:25:57 Fix some incorrect MSVC #ifdef's. Fixes #1305
Philip Kelley a150cc87 2013-02-10T18:16:10 Fix a bug introduced in df93a681 'Merge the push...'
Michael Schubert a9d081e5 2013-02-10T19:36:39 Fix -Wmaybe-uninitialized warning
Philip Kelley df93a681 2013-02-08T15:00:08 Merge the push report into the refs to avoid a 3rd network call
Jameson Miller ff9df883 2013-02-08T14:27:21 Fix Windows symlinks
Russell Belfer f3e49210 2013-02-08T10:02:37 Merge pull request #1249 from yorah/topic/diff-notify-unmatched-pathspecs diff: Add a callback to notify of diffed files
Vicent Martí 5b62eb7d 2013-02-08T02:50:23 Merge pull request #1325 from SHyx0rmZ/fix-windows-symlinks Fix Windows symlinks
Patrick Pokatilo 7672c8c7 2013-02-08T11:29:23 Moved braces to conform to code style
Patrick Pokatilo 64012fdb 2013-02-08T03:24:45 Replace LoadLibrary with GetModuleHandle, since kernel32 is loaded by default As requested
Patrick Pokatilo a49e5bed 2013-02-08T01:26:04 Replace call to strnlen with call to strlen
Patrick Pokatilo f88885e3 2013-02-08T01:10:03 Include <string.h>
Patrick Pokatilo 3b5e44ae 2013-02-08T00:50:20 Fix call to readlink
yorah 0d64ba48 2013-01-25T17:35:46 diff: add a notify callback to `git_diff__from_iterators` The callback will be called for each file, just before the `git_delta_t` gets inserted into the diff list. When the callback: - returns < 0, the diff process will be aborted - returns > 0, the delta will not be inserted into the diff list, but the diff process continues - returns 0, the delta is inserted into the diff list, and the diff process continues
yorah 943700ec 2013-01-18T16:37:13 Return the matched pathspec pattern in `git_pathspec_match_path` Instead of returning directly the pattern as the return value, I used an out parameter, because the function also tests if the passed pathspecs vector is empty. If yes, it considers that the path "matches", but in that case there is no matched pattern per se.
Patrick Pokatilo 94ed23f8 2013-02-07T01:41:20 Call p_readlink to determine symlink size
Ben Straub f393d4e8 2013-02-06T13:07:56 Clone: fetch all tags
Ben Straub ea57f66b 2013-02-06T11:02:29 Expect standard error code from internal calls
Ben Straub def60ea4 2013-02-05T13:14:48 Allow all non-zero returns to cancel transfers
nulltoken 3ad05221 2013-02-05T16:52:56 Fix MSVC compilation warnings Fix #1308
nulltoken a0c34c94 2013-01-20T13:27:28 reset: Introduce git_reset_default()
Ben Straub fe95ac1b 2013-02-05T10:59:58 Allow progress callback to cancel fetch This works by having the indexer watch the return code of the callback, so will only take effect on object boundaries.
nulltoken 3cf58e66 2013-01-15T16:12:12 index: Fix indentations
Russell Belfer de81aee3 2013-02-04T14:49:28 Merge pull request #1298 from ben/user-at Handle "user@" prefix for credentials partially included in URLs
Ben Straub 630146bd 2013-02-04T13:52:18 Address feedback
nulltoken 0e8e5a61 2013-02-03T11:44:26 revparse: Lookup sha before branch
nulltoken 545b479a 2013-02-02T17:36:20 revparse: Lookup branch before described tag Fix #1306
Ben Straub 15760c59 2013-02-01T19:21:55 Use malloc rather than calloc
Vicent Martí e9631660 2013-02-01T15:57:31 Merge pull request #1303 from csware/win32_consistent_error_encoding Win32: Make sure error messages are consistently UTF-8 encoded
Sven Strickroth c70455c7 2013-02-01T22:53:51 Deduplicate FormatMessage UTF-16 to UTF-8 conversion code Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth bd25a302 2013-02-01T22:22:26 Improved error handling Signed-off-by: Sven Strickroth <email@cs-ware.de>
Vicent Martí db37d3de 2013-02-01T15:37:45 Merge pull request #1299 from csware/support_local_msysgit_install Support local msysgit installations
Sven Strickroth 89ad1c57 2013-02-01T22:14:52 Get utf8_size from WideCharToMultiByte instead of guessing it Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth b0dc81f0 2013-02-01T16:17:34 Win32: Make sure error messages are consistently UTF-8 encoded W/o this a libgit2 error message could have a mixed encoding: e.g. a filename in UTF-8 combined with a native Windows error message encoded with the local code page. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Jameson Miller 91f13a18 2013-02-01T14:23:26 Try harder to find global config file
Ben Straub c4beee76 2013-02-01T10:00:55 Introduce git__substrdup
Ben Straub 329eee33 2013-02-01T09:41:50 Merge pull request #1286 from lznuaa/master Fix clone fail if repo head detached
Sven Strickroth 45792c92 2013-02-01T10:32:05 Stick to coding style: Move up braces Signed-off-by: Sven Strickroth <email@cs-ware.de>
Ben Straub 8c36a3cd 2013-01-31T15:24:59 Remove double-free segfaults
Ben Straub 016179d6 2013-01-31T14:54:58 WinHttp: use cred in url if provided
Ben Straub 54ffc1f7 2013-01-31T14:41:01 HTTP: use creds in url if available
Ben Straub cf7038a6 2013-01-31T14:04:21 Enhance url parsing to include passwords
Carlos Martín Nieto e5ef0f18 2013-01-31T20:23:30 refs: handle ALLOW_ONELEVEL normalization with leading slash A leading slash confuses the name normalization code when the flags include ALLOW_ONELEVEL. Catch this case in particular to avoid triggering an assertion in the uppercase check which expects us not to pass it an empty string. The existing tests don't catch this as they simply use the NORMAL flag. This fixes #1300.