summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* annotated_commit: provide refs and descriptionethomson/annotated_commit_refsEdward Thomson2016-04-265-85/+108
| | | | | | | | | | | Differentiate between the ref_name used to create an annotated_commit (that can subsequently be used to look up the reference) and the description that we resolved this with (which _cannot_ be looked up). The description is used for things like reflogs (and may be a ref name, and ID something that we revparsed to get here), while the ref name must actually be a reference name, and is used for things like rebase to return to the initial branch.
* Merge pull request #3749 from arthurschreiber/arthur/add-git-reference-dupCarlos Martín Nieto2016-04-261-1/+13
|\ | | | | Allow creating copies of `git_reference` objects.
| * Allow creating copies of `git_reference` objects.Arthur Schreiber2016-04-221-1/+13
| |
* | Merge pull request #3748 from libgit2/ethomson/rebase_detachedCarlos Martín Nieto2016-04-261-27/+46
|\ \ | | | | | | Rebase improvements with IDs
| * | rebase: correctly finish rebasing detached headsethomson/rebase_detachedEdward Thomson2016-04-211-24/+35
| | | | | | | | | | | | | | | When rebasing with IDs, we do not return to the `branch`, we remain in a detached HEAD state.
| * | rebase: handle detached HEADs in `init`Edward Thomson2016-04-211-3/+11
| |/ | | | | | | | | | | When `init`ing a rebase from a detached HEAD, be sure to remember that we were in a detached HEAD state so that we can correctly `abort` the object that we just created.
* | tag: ignore extra header fieldscmn/silly-tagsCarlos Martín Nieto2016-04-251-2/+8
| | | | | | | | | | | | | | While no extra header fields are defined for tags, git accepts them by ignoring them and continuing the search for the message. There are a few tags like this in the wild which git parses just fine, so we should do the same.
* | transport: cast away constness for freeEdward Thomson2016-04-211-1/+1
| |
* | stransport: pass proxy opts instead of char*Edward Thomson2016-04-211-2/+4
| |
* | iterator: ignore submodule in has_endedEdward Thomson2016-04-211-4/+3
|/
* Merge pull request #3110 from libgit2/cmn/proxy-configEdward Thomson2016-04-1913-48/+345
|\ | | | | Proxy configuration
| * proxy: don't specify the protocol in the typeCarlos Martín Nieto2016-04-192-2/+2
| | | | | | | | | | | | We leave this up to the scheme in the url field. The type should only tell us about whether we want a proxy and whether we want to auto-detect it.
| * winhttp: correctly detect HTTPS usageCarlos Martín Nieto2016-04-191-2/+14
| |
| * curl: ask for proxy credentialsCarlos Martín Nieto2016-04-191-4/+81
| |
| * net: use proxy options struct in the stream configCarlos Martín Nieto2016-04-194-15/+44
| |
| * proxy: don't require the trailing slash on WinHTTPCarlos Martín Nieto2016-04-191-1/+2
| | | | | | | | | | The path is not something that you use for proxies, so make use of the new optionality of the path when extracting URL parts.
| * netops: make the path optional in URLsCarlos Martín Nieto2016-04-191-10/+12
| | | | | | | | | | | | When we're dealing with proxy addresses, we only want a hostname and port, and the user would not provide a path, so make it optional so we can use this same function to parse git as well as proxy URLs.
| * proxy: use poxy to test our Windows proxy supportCarlos Martín Nieto2016-04-191-0/+1
| |
| * proxy: ask the user for credentials if necessaryCarlos Martín Nieto2016-04-198-19/+178
| |
| * proxy: introduce a proxy options structCarlos Martín Nieto2016-04-191-0/+16
| | | | | | | | It is currently unused; it will go into the remote's options.
* | ignore: move star-star matching closer to it usecmn/ignore-starstarCarlos Martín Nieto2016-04-191-16/+11
| | | | | | | | | | Instead of threading the state down to the larger loop, let's have the loop where we detect the double star so each of them are easier to read.
* | ignore: fix directory limits when searching for star-starCarlos Martín Nieto2016-04-191-6/+24
|/ | | | | | | | | | | | In order to match the star-star, we disable the flag that's looking for a single path element, but that leads to searching for the pattern in the middle of elements in the input string. Mark when we're handing a star-star so we jump over the elements in our attempt to match the part of the pattern that comes after the star-star. While here, tighten up the check so we don't allow invalid rules through.
* refs: provide a more general error message for dwimcmn/dwim-general-messageCarlos Martín Nieto2016-04-111-0/+3
| | | | | | | If we cannot dwim the input, set the error message to be explicit about that. Otherwise we leave the error for the last failed lookup, which can be rather unexpected as it mentions a remote when the user thought they were trying to look up a branch.
* Merge pull request #3724 from ethomson/submodule_start_supports_silly_slashesCarlos Martín Nieto2016-04-021-10/+26
|\ | | | | iterator/diff: allow trailing `/` on start/end paths to match submodules
| * iterator: support trailing `/` in start for submodEdward Thomson2016-04-021-10/+26
| | | | | | | | | | | | Allow callers to specify a start path with a trailing slash to match a submodule, instead of just a directory. This is for some legacy behavior that's sort of dumb, but there it is.
* | ignore: don't use realpath to canonicalize pathcmn/ignore-symlinkCarlos Martín Nieto2016-04-021-3/+11
|/ | | | | | If we're looking for a symlink, realpath will give us the resolved path, which is not what we're after, but a canonicalized version of the path the user asked for.
* Merge pull request #3720 from pks-t/pks/merge-driver-memleaksCarlos Martín Nieto2016-04-011-0/+1
|\ | | | | merge_driver: fix missing `goto done;`
| * merge_driver: fix missing `goto done;`Patrick Steinhardt2016-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | The code initializing the merge driver registry accidentally forgot a `goto done` in case of an error. Because of this the next line, which registers the global shutdown callback for the merge drivers, is only called when an error occured. Fix this by adding the missing `goto done`. This fixes some memory leaks when the global state is shut down.
* | Merge pull request #3719 from libgit2/ethomson/submodule_statusCarlos Martín Nieto2016-04-011-1/+1
|\ \ | |/ |/| WD iterator: properly identify submodules
| * iterator: use correct search functionethomson/submodule_statusEdward Thomson2016-03-311-1/+1
| |
* | leaks: call `xdl_free_classifier`Edward Thomson2016-03-311-1/+1
| |
* | leaks: fix some iterator leaksEdward Thomson2016-03-311-6/+22
| |
* | Plug a few leaksCarlos Martín Nieto2016-03-312-0/+16
|/
* Merge pull request #3575 from pmq20/master-13jan16Carlos Martín Nieto2016-03-312-4/+0
|\ | | | | Remove duplicated calls to git_mwindow_close
| * Remove duplicated calls to git_mwindow_closeP.S.V.R2016-01-132-4/+0
| |
* | xdiff/xprepare: fix a memory leakPatrick Steinhardt2016-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The xdl_prepare_env() function may initialise an xdlclassifier_t data structure via xdl_init_classifier(), which allocates memory to several fields, for example 'rchash', 'rcrecs' and 'ncha'. If this function later exits due to the failure of xdl_optimize_ctxs(), then this xdlclassifier_t structure, and the memory allocated to it, is not cleaned up. In order to fix the memory leak, insert a call to xdl_free_classifier() before returning. This patch was originally written by Ramsay Jones (see commit 87f16258367a3b9a62663b11f898a4a6f3c19d31 in git.git).
* | xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bitsPatrick Steinhardt2016-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 307ab20b3 ("xdiff: PATIENCE/HISTOGRAM are not independent option bits", 19-02-2012) introduced the XDF_DIFF_ALG() macro to access the flag bits used to represent the diff algorithm requested. In addition, code which had used explicit manipulation of the flag bits was changed to use the macros. However, one example of direct manipulation remains. Update this code to use the XDF_DIFF_ALG() macro. This patch was originally written by Ramsay Jones (see commit 5cd6978a9cfef58de061a9525f3678ade479564d in git.git).
* | Merge pull request #3712 from ethomson/config_duplicate_sectionCarlos Martín Nieto2016-03-291-4/+9
|\ \ | | | | | | config: don't write duplicate section
| * | config: don't write section header if we're in itEdward Thomson2016-03-281-4/+9
| | | | | | | | | | | | | | | | | | If we hit the EOF while trying to write a new value, it may be that we're already in the section that we were looking for. If so, do not write a (duplicate) section header, just write the value.
* | | Merge pull request #3703 from libgit2/cmn/multivar-set-lockedEdward Thomson2016-03-281-17/+0
|\ \ \ | |/ / |/| | config: don't special-case multivars that don't exist yet
| * | config: don't special-case multivars that don't exist yetcmn/multivar-set-lockedCarlos Martín Nieto2016-03-211-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This special-casing ignores that we might have a locked file, so the hashtable does not represent the contents of the file we want to write. This causes multivar writes to overwrite entries instead of add to them when under lock. There is no need for this as the normal code-path will write to the file just fine, so simply get rid of it.
* | | Merge pull request #3691 from ethomson/iteratorsCarlos Martín Nieto2016-03-2610-1595/+1703
|\ \ \ | | | | | | | | Some FANTASTIC iterator refactoring
| * | | iterator: comment fixedMarc Strapetz2016-03-241-2/+2
| | | |
| * | | iterator: unused includes removedMarc Strapetz2016-03-241-4/+0
| | | |
| * | | iterator: cleanupsEdward Thomson2016-03-243-366/+54
| | | | | | | | | | | | | | | | Remove some unused functions, refactor some ugliness.
| * | | iterator: refactor empty iterator to new styleEdward Thomson2016-03-241-15/+36
| | | |
| * | | iterator: mandate `advance_over`Edward Thomson2016-03-242-6/+11
| | | | | | | | | | | | | | | | | | | | Since the three iterators implement `advance_over` differently, mandate it and implement each.
| * | | iterator: refactor index iteratorEdward Thomson2016-03-241-200/+194
| | | |
| * | | Introduce `git_path_common_dirlen`Edward Thomson2016-03-242-0/+26
| | | |
| * | | iterator: move the index into the iterator itselfEdward Thomson2016-03-242-36/+15
| | | |