summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* submodule: correctly delimit the keys to use for lookupcmn/submodule-duplicateCarlos Martín Nieto2015-07-011-1/+1
| | | | | | | | | | The regex we use to look at the gitmodules file does not correctly delimit the name of submodule which we want to look up and puts '.*' straight after the name, maching on any submodule which has the seeked submodule as a prefix of its name. Add the missing '\.' in the regex so we want a full stop to exist both before and after the submodule name.
* Fix 8.3 filename tests failure when 8.3 is disabledLinquize2015-07-011-1/+4
|
* Fix #3093 - remove declaration of unused function git_fetch__download_packMatthew Plough2015-06-301-7/+0
| | | | | | Function was added in commit 2c982daa2eec64b80c7940bfe1142295bd72edd8 on October 5, 2011, and removed in commit 41fb1ca0ec51ad1d2a14b911aab3215e42965d1b on October 29, 2012. Given the length of time it's gone unused, it's safe to remove now.
* Merge pull request #3273 from ethomson/warnings3Carlos Martín Nieto2015-06-303-2/+2
|\ | | | | More warnings
| * winhttp: remove unused varEdward Thomson2015-06-301-1/+0
| |
| * posix compat: include sys/stat.h for mingwEdward Thomson2015-06-301-0/+1
| |
| * diff: use size_t formatEdward Thomson2015-06-301-1/+1
| |
* | http: fixed leak when asking for credentials againPierre-Olivier Latour2015-06-301-0/+4
|/ | | | | t->cred might have been allocated the previous time and needs to be freed before asking caller for credentials again.
* Merge pull request #3271 from jeffhostetler/more_leaksEdward Thomson2015-06-301-0/+3
|\ | | | | memory leak refspec.c
| * fix memory leak in refspec.c on errors.Jeff Hostetler2015-06-301-0/+3
| |
* | Merge pull request #3270 from ethomson/warnings2Carlos Martín Nieto2015-06-305-9/+4
|\ \ | |/ |/| Remove some warnings
| * odb: cast to long long for printfEdward Thomson2015-06-291-1/+1
| |
| * submodule: cast enum to int for compareEdward Thomson2015-06-291-1/+1
| |
| * openssl: free hostnameEdward Thomson2015-06-291-0/+1
| |
| * stash: drop unused variableEdward Thomson2015-06-291-2/+1
| |
| * iterator_walk: drop unused variableEdward Thomson2015-06-291-5/+0
| |
* | http: don't give up on auth on the first trycmn/release-fixupsCarlos Martín Nieto2015-06-291-2/+1
| | | | | | | | | | When the server rejects an authentication request, ask the caller for the credentials again, instead of giving up on the first try.
* | submodule: remove trailing slashes from submodule pathsCarlos Martín Nieto2015-06-291-4/+12
| | | | | | | | | | We allow looking up a submodule by path, but we lost the path normalisation during the recent changes. Bring it back.
* | submodule: remove some obsolete logicCarlos Martín Nieto2015-06-291-19/+0
|/ | | | | Remove some of the logic that was left-over from the time we had a cache of submodules, plugging a leak of the submodule object in certain cases.
* Merge pull request #3265 from libgit2/leaksCarlos Martín Nieto2015-06-273-1/+15
|\ | | | | Plug a bunch of leaks
| * index, iterator, fetchhead: plug leaksleaksCarlos Martín Nieto2015-06-261-0/+3
| |
| * diff: fix leaks in diff printingCarlos Martín Nieto2015-06-262-1/+12
| |
* | Merge pull request #3263 from git-up/fixesCarlos Martín Nieto2015-06-262-2/+2
|\ \ | |/ |/| Fixes
| * Fixed build failure if GIT_CURL is not definedPierre-Olivier Latour2015-06-262-2/+2
| |
* | Merge pull request #3259 from ethomson/stash_apply_arghCarlos Martín Nieto2015-06-264-86/+237
|\ \ | | | | | | Stash apply: stage new files even when not updating the index
| * | stash: stage new files when unstashing themEdward Thomson2015-06-251-0/+78
| | | | | | | | | | | | | | | Files that were new (staged additions) in the stash tree should be staged when unstashing, even when not applying the index.
| * | iterator: provide git_iterator_walkEdward Thomson2015-06-253-86/+133
| | | | | | | | | | | | | | | Provide `git_iterator_walk` to walk each iterator in lockstep, returning each iterator's idea of the contents of the next path.
| * | stash: don't allow apply with staged changesEdward Thomson2015-06-251-0/+26
| | |
* | | Revert "object: correct the expected ID size in prefix lookup"Vicent Marti2015-06-261-5/+5
| |/ |/| | | | | | | | | | | | | | | | | | | | | This reverts commit 969d4b703c910a8fd045baafbcd243b4c9825316. This was a fluke from Coverity. The length to all the APIs in the library is supposed to be passed in as nibbles, not bytes. Passing it as bytes would prevent us from parsing uneven-sized SHA1 strings. Also, the rest of the library was still using nibbles (including revparse and the odb_prefix APIs), so this change was seriously breaking things in unexpected ways. ^^
* | Only write index if updated when passing GIT_DIFF_UPDATE_INDEXPierre-Olivier Latour2015-06-262-2/+5
| | | | | | | | | | | | When diffing the index with the workdir and GIT_DIFF_UPDATE_INDEX has been passed, the previous implementation was always writing the index to disk even if it wasn't modified.
* | Merge pull request #3255 from libgit2/cmn/rename-unspecifiedEdward Thomson2015-06-255-7/+7
|\ \ | |/ |/| Rename FALLBACK to UNSPECIFIED
| * Rename FALLBACK to UNSPECIFIEDcmn/rename-unspecifiedCarlos Martín Nieto2015-06-255-7/+7
| | | | | | | | | | Fallback describes the mechanism, while unspecified explains what the user is thinking.
* | Merge pull request #3256 from libgit2/cmn/fetch-spec-fetchheadEdward Thomson2015-06-251-3/+14
|\ \ | | | | | | remote: insert refspecs with no rhs in FETCH_HEAD
| * | remote: insert refspecs with no rhs in FETCH_HEADcmn/fetch-spec-fetchheadCarlos Martín Nieto2015-06-251-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a refspec contains no rhs and thus won't cause an explicit update, we skip all the logic, but that means that we don't update FETCH_HEAD with it, which is what the implicit rhs is. Add another bit of logic which puts those remote heads in the list of updates so we put them into FETCH_HEAD.
* | | Merge pull request #3246 from libgit2/cmn/dont-grow-borrowedEdward Thomson2015-06-253-9/+11
|\ \ \ | |_|/ |/| | Don't allow growing borrowed buffers
| * | buffer: make use of EINVALID for growing a borrowed bufferCarlos Martín Nieto2015-06-241-2/+4
| | | | | | | | | | | | | | | This explains more closely what happens. While here, set an error message.
| * | buffer: don't allow growing borrowed buffersCarlos Martín Nieto2015-06-243-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we don't own a buffer (asize=0) we currently allow the usage of grow to copy the memory into a buffer we do own. This muddles the meaning of grow, and lets us be a bit cavalier with ownership semantics. Don't allow this any more. Usage of grow should be restricted to buffers which we know own their own memory. If unsure, we must not attempt to modify it.
* | | Merge pull request #3097 from libgit2/cmn/submodule-config-stateCarlos Martín Nieto2015-06-248-680/+421
|\ \ \ | | | | | | | | Remove run-time configuration settings from submodules
| * | | submodule: handle writing out all enum values for settingsCarlos Martín Nieto2015-06-222-65/+21
| | | | | | | | | | | | | | | | | | | | | | | | We currently do not handle those enum values which require us to set "true" or unset variables in all cases. Use a common function which does understand this by looking at our mapping directly.
| * | | config: provide a function to reverse-lookup mapped cvarsCarlos Martín Nieto2015-06-222-0/+26
| | | |
| * | | submodule: get rid of `_save()`Carlos Martín Nieto2015-06-221-38/+0
| | | | | | | | | | | | | | | | | | | | We no longer have any setters which affect an instance, so `git_submodule_save()` is no longer relevant.
| * | | submodule: make `_set_url()` affect the configurationCarlos Martín Nieto2015-06-221-12/+3
| | | | | | | | | | | | | | | | With this one, we can get rid of the edit_and_save test.
| * | | submodule: make `_set_branch()` affect the configurationCarlos Martín Nieto2015-06-221-48/+28
| | | |
| * | | submodule: make `_set_update_fetch_recurse_submodules()` affect the configCarlos Martín Nieto2015-06-221-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | Similarly to the other ones. In this test we copy over testing `RECURSE_YES` which shows an error in our handling of the `YES` variant which we may have to port to the rest.
| * | | submodule: make `_set_update()` affect the configurationCarlos Martín Nieto2015-06-221-24/+28
| | | | | | | | | | | | | | | | | | | | Moving on with the removal of runtime-changing variables, the update setting for a remote is whatever it was when it was looked up.
| * | | submodule: correct detection of existing submodulesCarlos Martín Nieto2015-06-221-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the cache deletion, the check for whether we consider a submodule to exist got changed regarding submodules which are in the worktree but not configured. Instead of checking for the url field to be populated, check the location where we've found it.
| * | | submodule: bring back finding by pathCarlos Martín Nieto2015-06-221-0/+42
| | | | | | | | | | | | | | | | | | | | During the removal of the cache, we also removed the ability to use `_lookup()` to search by path rather than name. Bring this logic back.
| * | | submodule: add an ignore option to statusCarlos Martín Nieto2015-06-223-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us specify in the status call which ignore rules we want to use (optionally falling back to whatever the submodule has in its configuration). This removes one of the reasons for having `_set_ignore()` set the value in-memory. We re-use the `IGNORE_RESET` value for this as it is no longer relevant but has a similar purpose to `IGNORE_FALLBACK`. Similarly, we remove `IGNORE_DEFAULT` which does not have use outside of initializers and move that to fall back to the configuration as well.
| * | | submodule: don't let status change an existing instanceCarlos Martín Nieto2015-06-223-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | As submodules are becomes more like values, we should not let a status check to update its properties. Instead of taking a submodule, have status take a repo and submodule name.
| * | | submodule: make set_ignore() affect the configurationCarlos Martín Nieto2015-06-221-15/+22
| | | | | | | | | | | | | | | | | | | | Instead of affecting a particular instance, make it change the configuration.