summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix remaining init_options inconsistenciesrb/diff-update-index-stat-cacheRussell Belfer2014-04-3019-131/+74
| | | | | There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed.
* Make init_options fns use unsigned ints and macroRussell Belfer2014-04-3014-137/+100
| | | | | Use an unsigned int for the version and add a helper macro so the code is simplified (and so the error message is a common string).
* Remove trace / add git_diff_perfdata struct + apiRussell Belfer2014-04-2916-251/+220
|
* Get rid of redundant git_diff_options_init fnRussell Belfer2014-04-294-33/+2
| | | | Since git_diff_init_options was introduced, remove this old fn.
* Add payloads, bitmaps to trace APIRussell Belfer2014-04-2910-104/+122
| | | | | | | | | This is a proposed adjustment to the trace APIs. This makes the trace levels into a bitmask so that they can be selectively enabled and adds a callback-level payload, plus a message-level payload. This makes it easier for me to a GIT_TRACE_PERF callbacks that are simply bypassed if the PERF level is not set.
* Don't use trace if GIT_TRACE not definedRussell Belfer2014-04-282-0/+14
|
* Add GIT_STATUS_OPT_UPDATE_INDEX and use trace APIRussell Belfer2014-04-2810-68/+171
| | | | | | This adds an option to refresh the stat cache while generating status. It also rips out the GIT_PERF stuff I had an makes use of the trace API to keep statistics about what happens during diff.
* Add diff option to update index stat cacheRussell Belfer2014-04-285-6/+128
| | | | | | | | | | When diff is scanning the working directory, if it finds a file where it is not sure if the index entry matches the working dir, it will recalculate the OID (which is pretty expensive). This adds a new flag to diff so that if the OID calculation finds that the file actually has not changed (i.e. just the modified time was altered or such), then it will refresh the stat cache in the index so that future calls to diff will not have to check the oid again.
* Lay groundwork for updating stat cache in diffRussell Belfer2014-04-285-22/+37
| | | | | | | | | | | This reorganized the diff OID calculation to make it easier to correctly update the stat cache during a diff once the flags to do so are enabled. This includes marking the path of a git_index_entry as const so we can make a "fake" git_index_entry with a "const char *" path and not get warnings. I was a little surprised at how unobtrusive this change was, but I think it's probably a good thing.
* Skip diff oid calc when size definitely changedRussell Belfer2014-04-284-8/+19
| | | | | | | | | | | | | When we think the stat cache in the index seems valid and the size or mode of a file has definitely changed, then don't bother trying to recalculate the OID of the workdir bits to confirm that it is modified - just accept that it is modified. This can result in files that show as modified with no actual diff, but the behavior actually appears to match Git on the command line. This also includes a minor optimization to not perform a submodule lookup on the ".git" directory itself.
* Add build option for diff internal statisticsRussell Belfer2014-04-2810-48/+96
|
* Merge pull request #2306 from odcinek/development_cmakeVicent Marti2014-04-281-1/+1
|\ | | | | Make the build CMake 2.6 compatible
| * Make the build CMake 2.6 compatibleMarcin Sawicki2014-04-281-1/+1
|/
* Merge pull request #2301 from libgit2/cmn/pack-objects-memoryVicent Marti2014-04-272-1/+2
|\ | | | | Keep the deflate buffer from ballooning up
| * pack-objects: always write out the status in write_one()cmn/pack-objects-memoryCarlos Martín Nieto2014-04-261-0/+1
| | | | | | | | Make sure we set the output parameter to a value.
| * zstream: grow based on used memory rather than allocatedCarlos Martín Nieto2014-04-261-1/+1
|/ | | | | | | | | | | | | | | When deflating data, we might need to grow the buffer. Currently we add a guess on top of the currently-allocated buffer size. When we re-use the buffer, it already has some memory allocated; adding to that means that we always grow the buffer regardless of how much we need to use. Instead, increase on top of the currently-used size. This still leaves us with the allocated size of the largest object we compress, but it's a minor pain compared to unbounded growth. This fixes #2285.
* refdb: fix typo and wordingCarlos Martín Nieto2014-04-261-1/+1
|
* Merge pull request #2299 from mekishizufu/fix_leaksVicent Marti2014-04-252-8/+6
|\ | | | | Plug some leaks
| * Reset tests: Use sandboxed indexJiri Pospisil2014-04-251-6/+3
| |
| * Filter: Make sure to release local on errorJiri Pospisil2014-04-251-2/+3
|/
* Merge pull request #2284 from jacquesg/push-progress-callbackVicent Marti2014-04-2520-121/+182
|\ | | | | Fire progress and update tips callbacks also for pushes.
| * Verify update_tips callbacks in push test casesJacques Germishuys2014-04-211-35/+83
| |
| * Fire update_tips callback also for pushes.Jacques Germishuys2014-04-211-17/+29
| |
| * Correct argument order of git__calloc()Jacques Germishuys2014-04-211-1/+1
| |
| * It is safe to free() a NULL pointerJacques Germishuys2014-04-211-3/+1
| |
| * Don't redefine the same callback types, their signatures may changeJacques Germishuys2014-04-2116-21/+21
| |
| * Rename progress callback to sideband_progressJacques Germishuys2014-04-213-5/+5
| |
| * Check the return codes of remote callbacks.Jacques Germishuys2014-04-212-7/+10
| | | | | | | | The user may have requested that the operation be cancelled.
| * Fire progress callbacks also for pushes.Jacques Germishuys2014-04-202-37/+37
| | | | | | | | | | It's not very useful to only know that a pre-receive hook has declined a push, you probably want to know why.
* | Merge pull request #2297 from libgit2/rb/status-with-precomposed-changesVicent Marti2014-04-252-39/+191
|\ \ | | | | | | Improve test coverage of status with different core.precomposeunicode settings
| * | Improve docs for status rename detection limitsrb/status-with-precomposed-changesRussell Belfer2014-04-242-4/+32
| | | | | | | | | | | | and make tests empty on platforms without iconv support.
| * | Test toggling core.precomposeunicode yields renameRussell Belfer2014-04-241-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is an interesting difference with core Git here, though. Because libgit2 will do rename detection with the working directory, in the last case where the HEAD and the working directory both have the decomposed data and the index has the composed data, we generate a single status record with two renames whereas Git will generate one rename (head to index) and one untracked file.
| * | Test decomposed unicode renames work as expectedRussell Belfer2014-04-241-37/+92
| | |
* | | Merge pull request #2241 from libgit2/rb/stash-skip-submodulesVicent Marti2014-04-257-107/+211
|\ \ \ | | | | | | | | Improve stash and checkout for ignored + untracked items
| * | | Handle explicitly ignored dir slightly differentlyrb/stash-skip-submodulesRussell Belfer2014-04-241-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When considering status of untracked directories, if we find an explicitly ignored item, even if it is a directory, treat the parent as an IGNORED item. It was accidentally being treated as an EMPTY item because we were not looking into the ignored subdir.
| * | | Treat ignored, empty, and untracked dirs differentRussell Belfer2014-04-234-22/+39
| | | | | | | | | | | | | | | | | | | | | | | | In the iterator, distinguish between ignores and empty directories so that diff and status can ignore empty directories, but checkout and stash can treat them as untracked items.
| * | | Make checkout match diff for untracked/ignored dirRussell Belfer2014-04-226-99/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When diff finds an untracked directory, it emulates Git behavior by looking inside the directory to see if there are any untracked items inside it. If there are only ignored items inside the dir, then diff considers it ignored, even if there is no direct ignore rule for it. Checkout was not copying this behavior - when it found an untracked directory, it just treated it as untracked. Unfortunately, when combined with GIT_CHECKOUT_REMOVE_UNTRACKED, this made is seem that checkout (and stash, which uses checkout) was removing ignored items when you had only asked it to remove untracked ones. This commit moves the logic for advancing past an untracked dir while scanning for non-ignored items into an iterator helper fn, and uses that for both diff and checkout.
| * | | Failing test for stashing a buried ignored fileRussell Belfer2014-04-221-0/+13
| | | |
| * | | Make stash and checkout ignore contained reposRussell Belfer2014-04-224-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To emulate git, stash should not remove untracked git repositories inside the parent repo, and checkout's REMOVE_UNTRACKED should also skip over these items. `git stash` actually prints a warning message for these items. That should be possible with a checkout notify callback if you wanted to, although it would require a bit of extra logic as things are at the moment.
* | | | Merge pull request #2294 from ethomson/merge_checkout_strategyRussell Belfer2014-04-243-14/+30
|\ \ \ \ | |_|/ / |/| | | Merge checkout strategy
| * | | merge: checkout default shouldn't clobber givenEdward Thomson2014-04-233-15/+14
| | | |
| * | | merge: default checkout strategy for should be SAFEEdward Thomson2014-04-232-1/+18
| | | |
* | | | Merge pull request #2295 from libgit2/cmn/fetchhead-quoteVicent Marti2014-04-243-1/+13
|\ \ \ \ | |/ / / |/| | | fetchhead: deal with quotes in branch names
| * | | fetchhead: deal with quotes in branch namesCarlos Martín Nieto2014-04-243-1/+13
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | The current FETCH_HEAD parsing code assumes that a quote must end the branch name. Git however allows for quotes as part of a branch name, which causes us to consider the FETCH_HEAD file as invalid. Instead of searching for a single quote char, search for a quote char followed by SP, which is not a valid part of a ref name.
* | | Merge pull request #2291 from ethomson/patch_binaryVicent Marti2014-04-237-6/+452
|\ \ \ | | | | | | | | patch: emit deflated binary patches (optionally)
| * | | patch: emit binary patches (optionally)Edward Thomson2014-04-227-6/+452
| | | |
* | | | Merge pull request #2283 from phkelley/win32_fsVicent Marti2014-04-2322-491/+1549
|\ \ \ \ | | | | | | | | | | Win32: UTF-8 <-> WCHAR conversion overhaul
| * | | | React to feedback for UTF-8 <-> WCHAR and reparse workPhilip Kelley2014-04-239-39/+35
| | | | |
| * | | | Handle win32 reparse points properlyEdward Thomson2014-04-227-132/+966
| | | | |
| * | | | Win32: UTF-8 <-> WCHAR conversion overhaulPhilip Kelley2014-04-1918-431/+659
| | |_|/ | |/| |