summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Remove trace / add git_diff_perfdata struct + apiRussell Belfer2014-05-024-51/+59
| | | |
| * | | Get rid of redundant git_diff_options_init fnRussell Belfer2014-05-021-17/+0
| | | | | | | | | | | | | | | | Since git_diff_init_options was introduced, remove this old fn.
| * | | Add payloads, bitmaps to trace APIRussell Belfer2014-05-021-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Add GIT_STATUS_OPT_UPDATE_INDEX and use trace APIRussell Belfer2014-05-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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-05-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #2310 from libgit2/cmn/commit-create-safeRussell Belfer2014-05-021-2/+3
|\ \ \ \ | |/ / / |/| | | commit: safer commit creation with reference update
| * | | commit: safer commit creation with reference updatecmn/commit-create-safeCarlos Martín Nieto2014-04-301-2/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current version of the commit creation and amend function are unsafe to use when passing the update_ref parameter, as they do not check that the reference at the moment of update points to what the user expects. Make sure that we're moving history forward when we ask the library to update the reference for us by checking that the first parent of the new commit is the current value of the reference. We also make sure that the ref we're updating hasn't moved between the read and the write. Similarly, when amending a commit, make sure that the current tip of the branch is the commit we're amending.
* | | refs: document _next_name()Carlos Martín Nieto2014-04-301-0/+11
|/ / | | | | | | | | If it's not documented, it doesn't show up in the docs (and we really should document, anyway).
* | Merge pull request #2284 from jacquesg/push-progress-callbackVicent Marti2014-04-257-9/+9
|\ \ | | | | | | Fire progress and update tips callbacks also for pushes.
| * | Don't redefine the same callback types, their signatures may changeJacques Germishuys2014-04-217-9/+9
| | |
| * | Rename progress callback to sideband_progressJacques Germishuys2014-04-211-1/+1
| | |
| * | Check the return codes of remote callbacks.Jacques Germishuys2014-04-211-2/+1
| | | | | | | | | | | | The user may have requested that the operation be cancelled.
| * | Fire progress callbacks also for pushes.Jacques Germishuys2014-04-201-1/+2
| | | | | | | | | | | | | | | It's not very useful to only know that a pre-receive hook has declined a push, you probably want to know why.
* | | Improve docs for status rename detection limitsrb/status-with-precomposed-changesRussell Belfer2014-04-241-2/+27
| | | | | | | | | | | | and make tests empty on platforms without iconv support.
* | | Merge pull request #2291 from ethomson/patch_binaryVicent Marti2014-04-231-0/+4
|\ \ \ | | | | | | | | patch: emit deflated binary patches (optionally)
| * | | patch: emit binary patches (optionally)Edward Thomson2014-04-221-0/+4
| |/ /
* | | Use git_diff_get_stats in example/diff + refactorRussell Belfer2014-04-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This takes the `--stat` and related example options in the example diff.c program and converts them to use the `git_diff_get_stats` API which nicely formats stats for you. I went to add bar-graph scaling to the stats formatter and noticed that the `git_diff_stats` structure was holding on to all of the `git_patch` objects. Unfortunately, each of these objects keeps the full text of the diff in memory, so this is very expensive. I ended up modifying `git_diff_stats` to keep just the data that it needs to keep and allowed it to release the patches. Then, I added width scaling to the output on top of that. In making the diff example program match 'git diff' output, I ended up removing an newline from the sumamry output which I then had to compensate for in the email formatting to match the expectations. Lastly, I went through and refactored the tests to use a couple of helper functions and reduce the overall amount of code there.
* | | Some doc and examples/diff.c changesRussell Belfer2014-04-221-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was playing with "git diff-index" and wanted to be able to emulate that behavior a little more closely with the diff example. Also, I wanted to play with running `git_diff_tree_to_workdir` directly even though core Git doesn't exactly have the equivalent, so I added a command line option for that and tweaked some other things in the example code. This changes a minor output thing in that the "raw" print helper function will no longer add ellipses (...) if the OID is not actually abbreviated.
* | | transports: allow the creds callback to say it doesn't existCarlos Martín Nieto2014-04-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Allow the credentials callback to return GIT_PASSTHROUGH to make the transports code behave as though none was set. This should make it easier for bindings to behave closer to the C code when there is no credentials callback set at their level.
* | | remote: provide read access to the callback structureCarlos Martín Nieto2014-04-221-0/+11
|/ / | | | | | | | | This should make it easier for bindings to dynamically override their own callbacks.
* | Replace void * with proper callback typesJacques Germishuys2014-04-181-2/+2
| |
* | Make git_cred_ssh_custom_new() naming more consistentJacques Germishuys2014-04-181-5/+5
| |
* | Introduce git_cred_ssh_interactive_new()Jacques Germishuys2014-04-181-0/+30
|/ | | | This allows for keyboard-interactive based SSH authentication
* Fix leak in git_index_conflict_cleanupRussell Belfer2014-04-171-7/+12
| | | | | | | | | | | | | I introduced a leak into conflict cleanup by removing items from inside the git_vector_remove_matching call. This simplifies the code to just use one common way for the two conflict cleanup APIs. When an index has an active snapshot, removing an item can cause an error (inserting into the deferred deletion vector), so I made the git_index_conflict_cleanup API return an error code. I felt like this wasn't so bad since it is just like the other APIs. I fixed up a couple of comments while I was changing the header.
* Add public diff print helpersRussell Belfer2014-04-171-0/+63
| | | | | | | The usefulness of these helpers came up for me while debugging some of the iterator changes that I was making, so since they have also been requested (albeit indirectly) I thought I'd include them.
* Some index internals refactoringRussell Belfer2014-04-171-4/+11
| | | | | | | | Again, laying groundwork for some index iterator changes, this contains a bunch of code refactorings for index internals that should make it easier down the line to add locking around index modifications. Also this removes the redundant prefix_position function and fixes some potential memory leaks.
* Merge pull request #2261 from jacquesg/format-patchVicent Marti2014-04-162-3/+176
|\ | | | | Support for format-patch
| * Introduce git_diff_format_email and git_diff_commit_as_emailJacques Germishuys2014-04-151-0/+88
| |
| * Introduce git_diff_get_stats, git_diff_stats_files_changed, ↵Jacques Germishuys2014-04-151-0/+85
| | | | | | | | git_diff_stats_insertions, git_diff_stats_deletions and git_diff_stats_to_buf
| * Fix const-correctness of git_patch_get_delta, git_patch_num_hunks, ↵Jacques Germishuys2014-04-111-3/+3
| | | | | | | | git_patch_num_lines_in_hunk
* | Add GIT_BRANCH_ALL to git_branch_t enumSven Strickroth2014-04-162-1/+2
| | | | | | | | | | | | | | | | git_branch_t is an enum so requesting GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE is not possible as it is not a member of the enum (at least VS2013 C++ complains about it). This fixes a regression introduced in commit a667ca8298193b3103c1dbdcb1f6c527e6e99eb2 (PR #1946). Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | Added cherry-pick supportJacques Germishuys2014-04-142-0/+89
|/
* Const correctness!Jacques Germishuys2014-04-036-12/+15
|
* Give the correct name for the function in the doc.fix-memory-index-doc-commentRob Rix2014-04-021-2/+2
| | | Per @carlosmn, git_index_add is now named git_index_add_bypath.
* Correct a stale reference to GIT_EBAREINDEXRob Rix2014-04-011-1/+1
|
* Merge pull request #2208 from libgit2/vmg/mempackRussell Belfer2014-04-012-0/+96
|\ | | | | In-memory packing backend
| * In-memory packing backendvmg/mempackVicent Marti2014-03-262-0/+96
| |
* | Merge pull request #2206 from libgit2/cmn/inmemory-swap-orderVicent Marti2014-04-011-7/+7
|\ \ | | | | | | Rename in-memory remote to anonymous and swap url and fetch order
| * | remote: rename inmemory to anonymous and swap url and fetch orderCarlos Martín Nieto2014-04-011-7/+7
| |/ | | | | | | | | | | | | | | | | | | The order in this function is the opposite to what create_with_fetchspec() has, so change this one, as url-then-refspec is what git does. As we need to break compilation and the swap doesn't do that, let's take this opportunity to rename in-memory remotes to anonymous as that's really what sets them apart.
* | Const up members of git_merge_file_resultEdward Thomson2014-03-311-2/+2
| |
* | Introduce git_merge_head_idEdward Thomson2014-03-311-0/+9
| |
* | Fix segfault if gitmodules is invalidRussell Belfer2014-03-261-3/+3
| | | | | | | | | | | | The reload_all call could end up dereferencing a NULL pointer if there was an error while attempting to load the submodules config data (i.e. invalid content in the gitmodules file). This fixes it.
* | Merge pull request #2204 from libgit2/rb/submodule-reference-countingVicent Marti2014-03-261-14/+30
|\ \ | |/ |/| Make submodules externally refcounted
| * Make submodules externally refcountedRussell Belfer2014-03-251-14/+30
| | | | | | | | | | | | | | | | `git_submodule` objects were already refcounted internally in case the submodule name was different from the path at which it was stored. This makes that refcounting externally used as well, so `git_submodule_lookup` and `git_submodule_add_setup` return an object that requires a `git_submodule_free` when done.
* | Merge pull request #2181 from anuraggup/hide_cbEdward Thomson2014-03-251-0/+24
|\ \ | |/ |/| Callback function to hide commit and its parents in revision walker
| * Correcting format of comments in header fileAnurag Gupta2014-03-241-13/+13
| |
| * Unit Tests for hide_cb in revwalkAnurag Gupta2014-03-241-2/+2
| |
| * Callback to hide commits in revision walker.Anurag Gupta2014-03-241-0/+24
| |
* | Merge pull request #2183 from ethomson/merge_refactorVicent Marti2014-03-242-111/+224
|\ \ | |/ |/| Refactor the `git_merge` API