summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | reflog: handle the birth of a branchCarlos Martín Nieto2014-03-191-18/+24
| | | | | | | | | | | | The reflog append function was overzealous in its checking. When passed an old and new ids, it should not do any checking, but just serialize the data to a reflog entry.
* | reflog: simplify the append logicCarlos Martín Nieto2014-03-191-22/+7
| | | | | | | | Remove some duplicated logic.
* | refdb: don't update when there's no needCarlos Martín Nieto2014-03-191-0/+17
| | | | | | | | | | If the caller wants to update a ref to point to the same target as it currently has, we should return early and avoid writing to the reflog.
* | reflog: more comprehensive HEAD testsCarlos Martín Nieto2014-03-181-4/+4
| | | | | | | | | | | | | | | | | | The existing ones lack checking zeroed ids when switching back from an unborn branch as well as what happens when detaching. The reflog appending function mistakenly wrote zeros when dealing with a detached HEAD. This explicitly checks for those situations and fixes them.
* | Merge pull request #2189 from Aimeast/octopusVicent Marti2014-03-181-0/+25
|\ \ | | | | | | Implement git_merge_base_octopus
| * | Implement git_merge_base_octopusAimeast2014-03-181-0/+25
| | |
* | | Merge pull request #2192 from phkelley/developmentVicent Marti2014-03-181-19/+102
|\ \ \ | |/ / |/| | Seamless support for NTLM/Kerberos auth on Windows
| * | Seamless support for NTLM/Kerberos auth on WindowsPhilip Kelley2014-03-181-19/+102
| | |
* | | refs: append to the HEAD reflog when updating the current branchCarlos Martín Nieto2014-03-171-21/+84
| | | | | | | | | | | | | | | | | | | | | | | | When we update the current branch, we must also append to HEAD's reflog to keep them in sync. This is a bit of a hack, but as git.git says, it covers 100% of default cases.
* | | branch: constness fixesCarlos Martín Nieto2014-03-172-2/+2
|/ /
* | Fix pqueue sort boundary condition bugRussell Belfer2014-03-121-1/+1
|/ | | | | | If the pqueue comparison fn returned just 0 or 1 (think "a<b") then the sort order of returned items could be wrong because there was a "< 0" that really needed to be "<= 0". Yikes!!!
* MSVC is sillyCarlos Martín Nieto2014-03-101-2/+2
|
* Merge pull request #2175 from Yogu/submodule-resolve-urlVicent Marti2014-03-101-10/+20
|\ | | | | Add git_submodule_resolve_url()
| * Add git_submodule_resolve_url()Jan Melcher2014-03-101-10/+20
| |
* | corrected typo in error messageBrendan Forster2014-03-101-1/+1
|/
* Merge pull request #2028 from libgit2/options-namesVicent Marti2014-03-076-31/+31
|\ | | | | Rename options structures
| * git_revert_opts -> git_revert_optionsoptions-namesBen Straub2014-03-061-12/+12
| |
| * git_checkout_opts -> git_checkout_optionsBen Straub2014-03-065-19/+19
| |
* | Merge pull request #2167 from mekishizufu/memory_access_fixesVicent Marti2014-03-072-21/+18
|\ \ | | | | | | Fun with memory access
| * | blame: Fix compare function's data typesJiri Pospisil2014-03-071-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the hunk_byfinalline_search_cmp function was called with different data types (size_t and uint32_t) for the key argument but expected only the former resulting in an invalid memory access when passed the latter on a 64 bit machine. The following patch makes sure that the function is called and works with the same type (size_t).
| * | git_oid_fromstrn: Simplify the implementation and fix memory access issuesJiri Pospisil2014-03-071-15/+9
| |/
* | Plug a few leaks in the testsCarlos Martín Nieto2014-03-072-1/+5
| |
* | branch: fix leak when checking against HEADCarlos Martín Nieto2014-03-071-5/+11
| | | | | | | | | | | | | | | | We look up a reference in order to figure out if it's the current branch, which we need to free once we're done with the check. As a bonus, only perform the check when we're passed the force flag, as it's a useless check otherwise.
* | commit: simplify and correct refcounting in nth_gen_ancestorCarlos Martín Nieto2014-03-071-9/+8
| | | | | | | | | | | | | | | | We can make use of git_object_dup to use refcounting instead of pointer comparison to make sure we don't free the caller's object. This also lets us simplify the case for '~0' which is now just an assignment instead of looking up the object we have at hand.
* | local transport: catch double-opensCarlos Martín Nieto2014-03-071-0/+3
|/ | | | | Combinations of connect + fetch can call local_open multiple times. Detect this and skip the initialization stage.
* Added function-based initializers for every options struct.Matthew Bowen2014-03-0514-0/+190
| | | | The basic structure of each function is courtesy of arrbee.
* Merge pull request #2159 from libgit2/rb/odb-exists-prefixVicent Marti2014-03-064-10/+140
|\ | | | | Add ODB API to check for existence by prefix and object id shortener
| * Check short OID len in odb, not in backendsRussell Belfer2014-03-052-10/+3
| |
| * Add git_object_short_id API to get short id stringRussell Belfer2014-03-041-0/+43
| | | | | | | | | | | | This finds a short id string that will unambiguously select the given object, starting with the core.abbrev length (usually 7) and growing until it is no longer ambiguous.
| * Add exists_prefix to ODB backend and ODB APIRussell Belfer2014-03-043-4/+98
| |
* | Merge pull request #2164 from libgit2/cmn/refs-delete-iterationVicent Marti2014-03-052-2/+13
|\ \ | | | | | | refdb: catch a directory disappearing
| * | refdb: catch a directory disappearingCarlos Martín Nieto2014-03-052-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | If a directory disappears between the time we look up the entries of its parent and the time when we go to look at it, we should ignore the error and move forward. This fixes #2046.
* | | Merge pull request #2163 from ethomson/nobackend_odb_writeVicent Marti2014-03-051-6/+12
|\ \ \ | |/ / |/| | ODB writing fails gracefully when unsupported
| * | ODB writing fails gracefully when unsupportedEdward Thomson2014-03-051-6/+12
| | | | | | | | | | | | If no ODB backends support writing, we should fail gracefully.
* | | Fixed missing error check on call to git_remote_download in ↵Brian Lambert2014-03-051-2/+5
| | | | | | | | | | | | git_remote_fetch. Moved error check to statement following git_remote_disconnect so that the disconnect happens regardless of the result of the download call.
* | | Merge pull request #2157 from libgit2/cmn/write-object-memVicent Marti2014-03-041-10/+17
|\ \ \ | |_|/ |/| | pack-objects: free memory safely
| * | pack-objects: free memory safelyCarlos Martín Nieto2014-03-041-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | A few fixes have accumulated in this area which have made the freeing of data a bit muddy. Make sure to free the data only when needed and once. When we are going to write a delta to the packfile, we need to free the data, otherwise leave it. The current version of the code mixes up the checks for po->data and po->delta_data.
* | | Remove ignored files from the working directory if they were stashedJacques Germishuys2014-03-041-2/+7
| | |
* | | Merge pull request #2141 from ravselj/developmentVicent Marti2014-03-033-2/+9
|\ \ \ | |/ / |/| | BUGFIX - Fetching twice from the same remote causes a segfault
| * | Merge remote-tracking branch 'remotes/upstream/development' into developmentMiha2014-03-035-163/+155
| |\ \
| * | | - need_pack was not set to 0 when local fetch was already present causing ↵Miha2014-02-251-1/+3
| | | | | | | | | | | | | | | | negotiate_fetch access violation
| * | | - BUGFIX #2133 (@fourplusone) in smart_protocol.cMiha2014-02-252-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | | features: Rename `_HAS_` to `_FEATURE_`vmg/featuresVicent Marti2014-03-031-3/+3
| | | |
* | | | caps: Rename to features to avoid confusionVicent Marti2014-03-031-4/+4
| |/ / |/| |
* | | Merge pull request #2144 from linquize/branch-f-currentBen Straub2014-03-021-0/+13
|\ \ \ | | | | | | | | Do not allow git_branch_create() to force update branch
| * | | Do not allow git_branch_create() to force update branchLinquize2014-02-271-0/+13
| | | |
* | | | Add buffer to buffer diff and patch APIsRussell Belfer2014-02-273-161/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds `git_diff_buffers` and `git_patch_from_buffers`. This also includes a bunch of internal refactoring to increase the shared code between these functions and the blob-to-blob and blob-to-buffer APIs, as well as some higher level assert helpers in the tests to also remove redundancy.
* | | | Merge pull request #2137 from jru/blame-first-parentBen Straub2014-02-261-2/+4
|\ \ \ \ | |_|/ / |/| | | Blame first-parent history
| * | | Reset num_parents to 1 only for merge commitsJuan Rubén2014-02-261-1/+1
| | | | | | | | | | | | | | | | Also, correct test case to account for the boundary flag
| * | | Add option to limit blame to first parentJuan Rubén2014-02-231-2/+4
| | | |