Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use git_diff_get_stats in example/diff + refactor | Russell Belfer | 2014-04-22 | 1 | -66/+37 |
| | | | | | | | | | | | | | | | | | | | | | 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 changes | Russell Belfer | 2014-04-22 | 1 | -65/+86 |
| | | | | | | | | | | | | | | 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. | ||||
* | Add some funny options for debugging status | Russell Belfer | 2014-04-01 | 1 | -9/+50 |
| | | | | | | | | This allows you to use a --repeat option to run status over and over and see how the output changes as you make local directory changes without reopening the git_repository object each time. Also, adds a flag to explicitly list the submodules before status. | ||||
* | Merge pull request #2228 from mekishizufu/example_short_id | Vicent Marti | 2014-04-01 | 1 | -4/+6 |
|\ | | | | | Use git_object_short_id in examples | ||||
| * | examples: Use git_object_short_id | Jiri Pospisil | 2014-04-01 | 1 | -4/+6 |
| | | |||||
* | | Merge pull request #2206 from libgit2/cmn/inmemory-swap-order | Vicent Marti | 2014-04-01 | 2 | -2/+2 |
|\ \ | |/ |/| | Rename in-memory remote to anonymous and swap url and fetch order | ||||
| * | remote: rename inmemory to anonymous and swap url and fetch order | Carlos Martín Nieto | 2014-04-01 | 2 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | | Make submodules externally refcounted | Russell Belfer | 2014-03-25 | 1 | -11/+14 |
|/ | | | | | | | | `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 #2028 from libgit2/options-names | Vicent Marti | 2014-03-07 | 1 | -1/+1 |
|\ | | | | | Rename options structures | ||||
| * | git_checkout_opts -> git_checkout_options | Ben Straub | 2014-03-06 | 1 | -1/+1 |
| | | |||||
* | | Merge pull request #2153 from mekishizufu/tag_example | Russell Belfer | 2014-03-07 | 3 | -1/+319 |
|\ \ | |/ |/| | Add a tag example | ||||
| * | Move all variable declarations to the top of the block | Jiri Pospisil | 2014-03-05 | 1 | -4/+7 |
| | | |||||
| * | Add tag example | Jiri Pospisil | 2014-03-05 | 3 | -1/+316 |
| | | |||||
* | | Merge completed: resolve the conflict with the upstream | Sun He | 2014-03-06 | 1 | -0/+4 |
|\ \ | |/ | |||||
| * | examples/diff: Add minimal, patience diff options. | Brian Gesiak | 2014-03-05 | 1 | -0/+4 |
| | | | | | | | | | | | | | | - Add minimal, patience diff options to diff example. libgit2 `diff_xdiff.git_xdiff_init` already supports these flags, so no additional change is necessary. - Remove minimal and patience flag addition from project list. | ||||
* | | fix the output format of diff | Sun He | 2014-03-05 | 1 | -2/+2 |
| | | |||||
* | | Add the --shortstat flag to examples/diff.c | Sun He | 2014-03-05 | 1 | -1/+51 |
|/ | |||||
* | - examples CMakeLists.txt reverted to previous state | Miha Ravšelj | 2014-03-03 | 1 | -5/+1 |
| | |||||
* | cmake examples change so that general.c is off by default | Miha | 2014-03-03 | 1 | -1/+5 |
| | |||||
* | - general.c reverted to original( before pr state ) | Miha | 2014-03-03 | 1 | -39/+43 |
| | |||||
* | Merge remote-tracking branch 'remotes/upstream/development' into development | Miha | 2014-03-03 | 2 | -7/+16 |
|\ | |||||
| * | Fix warnings and code style issues | Russell Belfer | 2014-02-27 | 1 | -7/+11 |
| | | |||||
| * | Document enumerator and rewording | Juan Rubén | 2014-02-24 | 1 | -1/+1 |
| | | |||||
| * | Add option to limit blame to first parent | Juan Rubén | 2014-02-23 | 1 | -0/+5 |
| | | |||||
* | | - BUGFIX #2133 (@fourplusone) in smart_protocol.c | Miha | 2014-02-25 | 6 | -48/+45 |
|/ | | | | | | - added MSVC cmake definitions to disable warnings - general.c is rewritten so it is ansi-c compatible and compiles ok on microsoft windows - some MSVC reported warning fixes | ||||
* | replace 'out' with 'patch',replace the literal tabs with '\t'. | rocky-luo | 2014-02-09 | 1 | -6/+6 |
| | |||||
* | add example for diff with --numstat | rocky-luo | 2014-02-08 | 1 | -8/+38 |
| | |||||
* | Fix a few references to changed function signatures | Ben Straub | 2014-02-05 | 1 | -1/+1 |
| | |||||
* | Merge pull request #2075 from libgit2/cmn/leftover-oid | Vicent Marti | 2014-01-27 | 1 | -1/+1 |
|\ | | | | | Leftover OID -> ID changes | ||||
| * | index: rename an entry's id to 'id' | Carlos Martín Nieto | 2014-01-25 | 1 | -1/+1 |
| | | | | | | | | This was not converted when we converted the rest, so do it now. | ||||
* | | Merge pull request #2078 from linquize/msvc | Vicent Marti | 2014-01-27 | 1 | -2/+1 |
|\ \ | | | | | | | MSVC doesn't like modern code neither | ||||
| * | | MSVC doesn't like modern code neither | Linquize | 2014-01-27 | 1 | -2/+1 |
| |/ | |||||
* | | Make blame example compile on MSVC | Linquize | 2014-01-27 | 1 | -0/+5 |
|/ | |||||
* | Update files that reference tests-clar | Ben Straub | 2013-11-14 | 2 | -2/+2 |
| | |||||
* | Fix warnings | Linquize | 2013-11-12 | 1 | -1/+1 |
| | |||||
* | Merge pull request #1956 from libgit2/cmn/fetch-default-head | Vicent Martí | 2013-11-11 | 1 | -12/+14 |
|\ | | | | | Remote revamp (director's cut) | ||||
| * | remote: make _ls return the list directly | Carlos Martín Nieto | 2013-11-11 | 1 | -12/+14 |
| | | | | | | | | | | | | | | | | | | | | | | The callback-based method of listing remote references dates back to the beginning of the network code's lifetime, when we didn't know any better. We need to keep the list around for update_tips() after disconnect() so let's make use of this to simply give the user a pointer to the array so they can write straightforward code instead of having to go through a callback. | ||||
* | | update example to new packfile creation signature | Edward Thomson | 2013-11-07 | 1 | -1/+1 |
| | | |||||
* | | blame sample: usage comment | Ben Straub | 2013-11-04 | 1 | -0/+1 |
| | | |||||
* | | Fix warnings | Ben Straub | 2013-11-04 | 1 | -2/+2 |
| | | |||||
* | | Reorganize and doc-commentify blame sample. | Ben Straub | 2013-11-04 | 1 | -69/+96 |
| | | |||||
* | | Standardize layout of blame sample | Ben Straub | 2013-11-04 | 1 | -36/+47 |
| | | |||||
* | | Merge pull request #1317 from libgit2/blame | Russell Belfer | 2013-11-04 | 3 | -1/+167 |
|\ \ | | | | | | | Blame Canada | ||||
| * \ | Merge remote-tracking branch 'libgit2/development' into blame | Ben Straub | 2013-10-28 | 5 | -52/+63 |
| |\ \ | |||||
| * | | | Fix post-line-range iteration | Ben Straub | 2013-10-10 | 1 | -1/+5 |
| | | | | |||||
| * | | | Include signatures in blame hunks | Ben Straub | 2013-10-10 | 1 | -6/+4 |
| | | | | |||||
| * | | | Only show lines that had blame run on them | Ben Straub | 2013-10-10 | 1 | -12/+14 |
| | | | | |||||
| * | | | Be more flexible with argument order and format | Ben Straub | 2013-10-10 | 1 | -8/+31 |
| | | | | |||||
| * | | | Ignore more built examples | Ben Straub | 2013-10-09 | 1 | -0/+5 |
| | | | | |||||
| * | | | Simplify loading blob | Ben Straub | 2013-10-09 | 1 | -13/+11 |
| | | | |