summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* clone: handle overly restrictive refspecscmn/remote-default-restrictCarlos Martín Nieto2014-09-022-35/+23
| | | | | | | | | | | When the fetch refspec does not include the remote's default branch, it indicates an error in user expectations or programmer error. Error out in that case. This lets us get rid of the dummy refspec which can never work as its zeroed out. In the cases where we did not find a default branch, we set HEAD detached immediately, which lets us refactor the "normal" path, removing `found_branch`.
* clone: correct handling of an unborn HEADCarlos Martín Nieto2014-09-022-19/+17
| | | | | If the remote does not advertise HEAD, then it is unborn and we cannot checkout that branch. Handle it the same way as an empty repo.
* remote: add test for single-branch cloneCarlos Martín Nieto2014-09-021-0/+61
| | | | | When cloning, we may be asking for a particular branch or subset of branches. Make sure we test for that.
* remote: add tests for remote-branch edge casesCarlos Martín Nieto2014-09-021-0/+29
| | | | | | Add tests for the case when there are no branches on the remote and when HEAD is detached but has the id of a non-branch. In both of these cases, we should return ENOTFOUND.
* clone: support remotes with references but no branchesCarlos Martín Nieto2014-08-291-2/+19
| | | | | | | A repository can have any number of references which we're not interested in such as notes or tags. For the default branch calculation we only care about branches. Make the decision about the number of branches rather than the number of refs in general.
* remote: short-circuit the default branch check if there is noneCarlos Martín Nieto2014-08-291-0/+3
| | | | | If we do not have a HEAD ref in the heads, we already know there is no default branch. Return immedately.
* remote: assert what we want to happen when ther is no default branchCarlos Martín Nieto2014-08-291-0/+14
| | | | Assert what we already do, so as to notice changes.
* travis: no need to clean out the test repositoryCarlos Martín Nieto2014-08-291-2/+0
| | | | | This was added to avoid the remote's default branch to be considered to the be notes one which the first network test leaves behind.
* remote: restrict default branch to branches namespaceCarlos Martín Nieto2014-08-291-0/+3
|
* Merge pull request #2539 from libgit2/cmn/ahead-behind-orderVicent Marti2014-08-282-20/+20
|\ | | | | Fix ahead-behind results
| * graph: fix ahead-behind logiccmn/ahead-behind-orderCarlos Martín Nieto2014-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | When we see PARENT1, it means there is a local commit and thus we are ahead. Likewise, seeing PARENT2 means that the upstream branch has a commit and we are one more behind. The logic is currently reversed. Correct it. This fixes #2501.
| * Fix ahead-behind testsCarlos Martín Nieto2014-08-281-18/+18
| | | | | | | | | | The logic was reversed. I have checked manually each pair with git and adjusted the expectation to what git status prints.
* | Merge pull request #2538 from libgit2/ntk/propagate_url_parsing_errorVicent Marti2014-08-272-3/+9
|\ \ | | | | | | winhttp: Prevent swallowing of url parsing error
| * | winhttp: Prevent swallowing of url parsing errornulltoken2014-08-272-3/+9
| | |
* | | Merge pull request #2502 from rnowosielski/remote_set_timeoutVicent Marti2014-08-271-1/+17
|\ \ \ | | | | | | | | Set timeout on remote (Add timeout for WinHttpReceiveResponse #2147)
| * | | Set timeout on remote (WinHTTP) should return error in case of failure. ↵Rafal Nowosielski2014-08-271-7/+15
| | | | | | | | | | | | | | | | Connection timeout set to 1 minute. Read/Write timeout remains set to infinite #2147
| * | | Set timeout on remote (WinHTTP) to infinite #2147Rafal Nowosielski2014-08-231-0/+8
| | | |
* | | | Merge pull request #2490 from csware/ssh-wintunnelVicent Marti2014-08-272-20/+92
|\ \ \ \ | |_|/ / |/| | | Allow to override default ssh transport_cb - in order to allow third party ssh transports
| * | | Added some testsSven Strickroth2014-08-271-0/+66
| | | | | | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
| * | | Allow to override default ssh transport_cbSven Strickroth2014-08-261-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | W/o this patch it is not possible to have a third party ssh transport_cb if GIT_SSH is disabled or a third party transport_cb which has a higher priority than the default one. Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | Adjust clone tests to USERNAME cred typeCarlos Martín Nieto2014-08-271-0/+3
| | | |
* | | | Merge branch 'cmn/ssh-retry'Carlos Martín Nieto2014-08-2710-39/+343
|\ \ \ \
| * | | | Add ssh retry changes to CHANGELOGCarlos Martín Nieto2014-08-271-0/+6
| | | | |
| * | | | Merge remote-tracking branch 'upstream/master' into cmn/ssh-retryCarlos Martín Nieto2014-08-27184-2119/+5260
| |\ \ \ \ | |/ / / / |/| | | |
* | | | | Merge pull request #2537 from libgit2/reduce-cache-contentionVicent Marti2014-08-272-10/+10
|\ \ \ \ \ | | | | | | | | | | | | Refactor git_cache to use an rwlock
| * | | | | Refactor git_cache to use an rwlockJustin Spahr-Summers2014-08-262-10/+10
|/ / / / / | | | | | | | | | | | | | | | | | | | | This significantly reduces contention when many threads are trying to read from the cache simultaneously.
* | | | | Merge pull request #2508 from libgit2/rb/fix-ignore-slash-starVicent Marti2014-08-263-1/+117
|\ \ \ \ \ | | | | | | | | | | | | Fix bugs with negative ignores inside an ignored parent directory
| * | | | | Demonstrate a trailing slash failure.rb/fix-ignore-slash-starRob Rix2014-08-081-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `git help ignore` has this to say about trailing slashes: > If the pattern ends with a slash, it is removed for the purpose of > the following description, but it would only find a match with a > directory. In other words, foo/ will match a directory foo and > paths underneath it, but will not match a regular file or a > symbolic link foo (this is consistent with the way how pathspec > works in general in Git). Sure enough, having manually performed the same steps as this test, `git status` tells us the following: # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: force.txt # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # ../.gitignore # child1/ # child2/ i.e. neither child1 nor child2 is ignored.
| * | | | | For negative matches, always use leading dir matchRussell Belfer2014-08-081-1/+2
| | | | | |
| * | | | | status: failing test with slash-starCarlos Martín Nieto2014-08-081-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When writing 'bin/*' in the rules, this means we ignore very file inside bin/ individually, but do not ignore the directory itself. Thus the status listing should list both files under bin/, one untracked and one ignored.
| * | | | | Fix rejection of parent dir of negated ignoresRussell Belfer2014-08-082-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While scanning through a directory hierarchy, this prevents a positive ignore match on a parent directory from blocking the scan of a directory when a negative match rule exists for files inside the directory.
* | | | | | Merge pull request #2533 from jakebolewski/jcb/addjuliaVicent Marti2014-08-261-0/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | add Julia to the language bindings list
| * | | | | | add Julia to the language bindings listjake bolewski2014-08-251-0/+2
| | |_|_|_|/ | |/| | | |
* | | | | | Merge pull request #2535 from libgit2/cmn/unpack-offsetVicent Marti2014-08-261-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | pack: return the correct final offset
| * | | | | pack: return the correct final offsetcmn/unpack-offsetCarlos Martín Nieto2014-08-261-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The callers of git_packfile_unpack() expect the obj_offset argument to be set to the beginning of the next object. We were mistakenly returning the the offset of the object's data, which causes the CRC function to try to use the wrong offset. Set obj_offset to curpos instead of elem->offset to point to the next element and bring back expected behaviour.
* | | | | Merge pull request #2532 from arthurschreiber/arthur/fix-merge-base-commit-checkVicent Marti2014-08-251-1/+4
|\ \ \ \ \ | | | | | | | | | | | | merge base: Correctly raise an error if a non-commit object is passed.
| * | | | | merge base: Correctly raise an error if a non-commit object is passed.Arthur Schreiber2014-08-251-1/+4
| | |_|_|/ | |/| | |
* | | | | Merge pull request #2531 from libgit2/rb/mkdir-allow-parent-failuresVicent Marti2014-08-252-3/+36
|\ \ \ \ \ | | | | | | | | | | | | Allow mkdir helper to skip parent errors
| * | | | | Allow mkdir helper to skip parent errorsrb/mkdir-allow-parent-failuresRussell Belfer2014-08-222-3/+36
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our mkdir helper was failing is a parent directory was not accessible even if the child directory could be created. This changes the helper to keep trying child directories even when the parent is unwritable.
* | | | | Merge pull request #2527 from jacquesg/refspec-crashVicent Marti2014-08-252-7/+57
|\ \ \ \ \ | |/ / / / |/| | | | Check if the refspec matches before transforming
| * | | | Check that the refspec matches before modifying the out bufferJacques Germishuys2014-08-211-6/+6
| | | | |
| * | | | Check if the refspec matches before transformingJacques Germishuys2014-08-172-7/+57
| | |_|/ | |/| |
* | | | Merge pull request #2528 from libgit2/vmg/tostr_sVicent Marti2014-08-187-18/+33
|\ \ \ \ | | | | | | | | | | Export `git_oid_tostr_s` instead of `_allocfmt`
| * | | | oid: Export `git_oid_tostr_s` instead of `_allocfmt`vmg/tostr_sVicent Marti2014-08-187-18/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old `allocfmt` is of no use to callers, as they are not able to free the returned buffer. Export a new API that returns a static string that doesn't need to be freed.
* | | | | Revert "test: Remove symlinks from the source tree"Vicent Marti2014-08-181-0/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 0dc54e149498bbd5de5e5ecc6006f9f5afb6588c.
* | | | | test: Remove symlinks from the source treeVicent Marti2014-08-181-1/+0
| | | | | | | | | | | | | | | | | | | | We don't really use this at all, and it breaks packaging in Windows.
* | | | | Merge pull request #2525 from libgit2/cmn/http-recv-bufferVicent Marti2014-08-181-4/+20
|\ \ \ \ \ | | | | | | | | | | | | http: make sure we can consume the data we request
| * | | | | http: make sure we can consume the data we requestcmn/http-recv-bufferCarlos Martín Nieto2014-08-161-4/+20
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recv buffer (parse_buffer) and the buffer have independent sizes and offsets. We try to fill in parse_buffer as much as possible before passing it to the http parser. This is fine most of the time, but fails us when the buffer is almost full. In those situations, parse_buffer can have more data than we would be able to put into the buffer (which may be getting full if we're towards the end of a data sideband packet). To work around this, we check if the space we have left on our buffer is smaller than what could come from the network. If this happens, we make parse_buffer think that it has as much space left as our buffer, so it won't try to retrieve more data than we can deal with. As the start of the data may no longer be at the start of the buffer, we need to keep track of where it really starts (data_offset) and use that in our calculations for the real size of the data we received from the network. This fixes #2518.
* | | | | Merge pull request #2523 from leighlondon/remove-completed-projectVicent Marti2014-08-181-3/+0
|\ \ \ \ \ | |/ / / / |/| | | | Removing a completed starter project.
| * | | | Removing a completed starter project.Leigh London2014-08-161-3/+0
|/ / / / | | | | | | | | | | | | | | | | | | | | Removing the starter project for adding support for the symref extension (#2006) from PROJECTS.md, as this seems to have been completed with the merge of #2376.