summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* commit: add a function to create a commit on top of a refcmn/safe-commitCarlos Martín Nieto2014-02-103-9/+109
| | | | | Add a way to safely create a commit which builds on top of the current commit in a given reference.
* Merge pull request #2111 from libgit2/cmn/cond-fixupsRussell Belfer2014-02-104-23/+25
|\ | | | | Conditional ref update fixups
| * refs: move current_id before the reflog parametersCarlos Martín Nieto2014-02-103-16/+16
| | | | | | | | | | Keep the reflog parameters as the last two, as they're the optional parameters.
| * refs: conditional wording fixupsCarlos Martín Nieto2014-02-102-11/+13
|/ | | | | This addresses arrbee's concerns about wording in the conditional reference udpate functions.
* Merge pull request #2107 from rocky-luo/examples-diff-numstatBen Straub2014-02-091-8/+38
|\ | | | | add example for diff with --numstat
| * replace 'out' with 'patch',replace the literal tabs with '\t'.rocky-luo2014-02-091-6/+6
| |
| * add example for diff with --numstatrocky-luo2014-02-081-8/+38
|/
* Merge pull request #2056 from libgit2/rb/commit-amendBen Straub2014-02-075-76/+314
|\ | | | | Add git_commit_amend API
| * Add git_commit_amend APIRussell Belfer2014-02-075-76/+314
|/ | | | | | | | | This adds an API to amend an existing commit, basically a shorthand for creating a new commit filling in missing parameters from the values of an existing commit. As part of this, I also added a new "sys" API to create a commit using a callback to get the parents. This allowed me to rewrite all the other commit creation APIs so that temporary allocations are no longer needed.
* Merge pull request #2099 from libgit2/bs/more-reflog-stuffRussell Belfer2014-02-0740-130/+472
|\ | | | | More reflogness
| * Correct default reflog message for git_remote_fetchBen Straub2014-02-063-2/+42
| |
| * Fix terrible indentationBen Straub2014-02-062-2/+2
| |
| * Only run clone-failure test on private repoBen Straub2014-02-052-2/+8
| |
| * More merge.conflictstyle fixesBen Straub2014-02-051-0/+7
| |
| * Avoid crash when skipping remote testBen Straub2014-02-051-2/+4
| |
| * Fix broken clone testBen Straub2014-02-051-12/+4
| |
| * Prevent user's merge.conflictstyle from breaking testsBen Straub2014-02-053-0/+21
| |
| * Fix a few references to changed function signaturesBen Straub2014-02-052-4/+4
| |
| * Merge remote-tracking branch 'libgit2/development' into bs/more-reflog-stuffBen Straub2014-02-0511-96/+548
| |\
| * | Add reflog params to git_repository_detach_headBen Straub2014-02-048-16/+44
| | |
| * | Add reflog parameters to remote apisBen Straub2014-02-048-22/+101
| | | | | | | | | Also added a test for git_remote_fetch.
| * | Add reflog parameters to git_push_update_tipsBen Straub2014-02-043-4/+29
| | |
| * | Fix reflog message when creating commitsBen Straub2014-02-042-3/+35
| | |
| * | Add reset tests for reflogBen Straub2014-02-036-1/+101
| | |
| * | Fix warningBen Straub2014-02-031-1/+1
| | |
| * | Add reflog parameters to git_resetBen Straub2014-02-0311-42/+61
| | |
| * | Reset helpers: use revparse insteadBen Straub2014-02-038-32/+23
| | |
* | | Merge pull request #2042 from libgit2/cmn/conditional-refRussell Belfer2014-02-079-55/+444
|\ \ \ | | | | | | | | refs: conditional ref updates
| * | | refs: add an unconditional deleteCarlos Martín Nieto2014-02-053-0/+36
| | | | | | | | | | | | | | | | | | | | Add it under the git_reference_remove() name, letting the user pass the repo and name, analogous to unconditional setting/creation.
| * | | refs: catch cases where the ref type has changedCarlos Martín Nieto2014-02-052-3/+73
| | | | | | | | | | | | | | | | | | | | If the type of the on-disk reference has changed, the old value comparison should fail.
| * | | refs: check the ref's old value when deletingCarlos Martín Nieto2014-02-053-2/+46
| | | | | | | | | | | | | | | | Recognize when the reference has changed since we loaded it.
| * | | refs: placeholder conditional deleteCarlos Martín Nieto2014-02-055-27/+49
| | | | | | | | | | | | | | | | We don't actually pass the old value yet.
| * | | refs: factor out old value comparisonCarlos Martín Nieto2014-02-051-14/+26
| | | | | | | | | | | | | | | | We will reuse this later for deletion.
| * | | refs: bring conditional symbolic updates to the frontendCarlos Martín Nieto2014-02-053-6/+78
| | | | | | | | | | | | | | | | Bring the race detection goodness to symbolic references as well.
| * | | refdb: add conditional symbolic updatesCarlos Martín Nieto2014-02-055-25/+27
| | | | | | | | | | | | | | | | | | | | Add a parameter to the backend to allow checking for the old symbolic target.
| * | | refs: add tests for conditional updatesCarlos Martín Nieto2014-02-051-0/+42
| | | |
| * | | refs: fix leak on successful updateCarlos Martín Nieto2014-02-051-7/+7
| | | | | | | | | | | | | | | | Free the old ref even on success.
| * | | refs: return GIT_EMODIFIED if the ref target movedCarlos Martín Nieto2014-02-053-4/+9
| | | | | | | | | | | | | | | | | | | | In case we loose the race to update the reference, return GIT_EMODIFIED to let the user distinguish it from other types of errors.
| * | | refs: changes from feedbackCarlos Martín Nieto2014-02-052-28/+18
| | | | | | | | | | | | | | | | | | | | | | | | Change the name to _matching() intead of _if(), and force _set_target() to be a conditional update. If the user doesn't care about the old value, they should use git_reference_create().
| * | | refs: conditional ref updatesCarlos Martín Nieto2014-02-056-26/+120
| | | | | | | | | | | | | | | | Allow updating references if the old value matches the given one.
* | | | Fix some Windows warningsRussell Belfer2014-02-076-36/+33
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a number of warnings with the Windows 64-bit build including a test failure in test_repo_message__message where an invalid pointer to a git_buf was being used.
* | | | Merge pull request #2100 from libgit2/rb/update-pqueueVicent Marti2014-02-0715-325/+309
|\ \ \ \ | | | | | | | | | | Replace priority queue code with implementation from hashsig
| * | | | Avoid extra copying in pqueue operationsRussell Belfer2014-02-042-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tweaks the pqueue_up and pqueue_down routines so that they will not do full element swaps but instead carry over the state of the previous loop iteration and only assign elements for which we know the final position. This will avoid a little bit of data assignment which should improve performance in theory. Also got rid of some vector helpers that I'm no longer using.
| * | | | Fix typo setting sorted flag when reloading indexRussell Belfer2014-02-042-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a typo I made for setting the sorted flag on the index after a reload. That typo didn't actually cause any test failures so I'm also adding a test that explicitly checks that the index is correctly sorted after a reload when ignoring case and when not.
| * | | | Convert pqueue to just be a git_vectorRussell Belfer2014-02-049-75/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the git_pqueue to simply be a set of specialized init/insert/pop functions on a git_vector. To preserve the pqueue feature of having a fixed size heap, I converted the "sorted" field in git_vectors to a more general "flags" field so that pqueue could mix in it's own flag. This had a bunch of ramifications because a number of places were directly looking at the vector "sorted" field - I added a couple new git_vector helpers (is_sorted, set_sorted) so the specific representation of this information could be abstracted.
| * | | | Add some priority queue testsRussell Belfer2014-02-031-0/+97
| | | | | | | | | | | | | | | | | | | | I forgot that I wrote some tests for the new priority queue code.
| * | | | Replace pqueue with code from hashsig heapRussell Belfer2014-02-039-300/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I accidentally wrote a separate priority queue implementation when I was working on file rename detection as part of the file hash signature calculation code. To simplify licensing terms, I just adapted that to a general purpose priority queue and replace the old priority queue implementation that was borrowed from elsewhere. This also removes parts of the COPYING document that no longer apply to libgit2.
* | | | | Merge pull request #2104 from ethomson/utf8_cleanupRussell Belfer2014-02-061-62/+0
|\ \ \ \ \ | |_|_|_|/ |/| | | | Remove unused utf8 -> utf16 conversion code
| * | | | Remove unused utf8 -> utf16 conversion codeEdward Thomson2014-02-051-62/+0
|/ / / /
* | | | Merge pull request #2027 from libgit2/rb/only-windows-is-windowsBen Straub2014-02-051-9/+91
|\ \ \ \ | | | | | | | | | | Some tests of paths that can't actually be written to disk