summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Merge pull request #714 from schu/config-enotfoundVicent Martí2012-06-051-1/+0
|\ \ \ \ \ \ | |/ / / / / |/| | | | | config: do not set an error for GIT_ENOTFOUND
| * | | | | config: do not set an error for GIT_ENOTFOUNDMichael Schubert2012-05-191-1/+0
| |/ / / / | | | | | | | | | | | | | | | | | | | | An unset config variable isn't bad per se -- let the call site set an error in case GIT_ENOTFOUND isn't acceptable.
* | | | | Merge pull request #737 from nulltoken/topic/git_remote_add_refspecCarlos Martín Nieto2012-06-042-1/+12
|\ \ \ \ \ | | | | | | | | | | | | Remotes and refspecs
| * | | | | remote: Make git_remote_add() generate a default refspec with a force update ↵nulltoken2012-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | specifier
| * | | | | refspec: expose the force update specifier through git_refspec_force() accessornulltoken2012-05-302-0/+11
| | | | | |
* | | | | | Fix git_close/http_close/local_close to set the transport's connected ↵Arthur Schreiber2012-06-023-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | attribute to 0.
* | | | | | config: set an error message when asked to delete a non-existent keyCarlos Martín Nieto2012-06-011-1/+3
|/ / / / /
* | | | | Fix checking for the presence of a flagGarrett Regier2012-05-271-1/+1
| |/ / / |/| | |
* | | | Use lowercase names for Windows headersScott J. Goldman2012-05-261-2/+2
| | | | | | | | | | | | | | | | Otherwise we can't cross-compile on Linux.
* | | | Make errors for system and global files consistentRussell Belfer2012-05-251-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The error codes from failed lookups of system and global files on Windows were not consistent with the codes returned on other platforms. This makes the error detection patterns match and adds a unit test for the various errors.
* | | | Fix bugs for status with spaces and reloaded attrsRussell Belfer2012-05-244-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes two bugs: * Issue #728 where git_status_file was not working for files that contain spaces. This was caused by reusing the "fnmatch" parsing code from ignore and attribute files to interpret the "pathspec" that constrained the files to apply the status to. In that code, unescaped whitespace was considered terminal to the pattern, so a file with internal whitespace was excluded from the matched files. The fix was to add a mode to that code that allows spaces and tabs inside patterns. This mode only comes into play when parsing in-memory strings. * The other issue was undetected, but it was in the recently added code to reload gitattributes / gitignores when they were changed on disk. That code was not clearing out the old values from the cached file content before reparsing which meant that newly added patterns would be read in, but deleted patterns would not be removed. The fix was to clear the vector of patterns in a cached file before reparsing the file.
* | | | Clean up system file finding tests on Win32Russell Belfer2012-05-241-1/+1
| | | |
* | | | windows: Properly expand all environment variablesVicent Martí2012-05-241-103/+51
| | | |
* | | | Merge pull request #726 from arrbee/utf16-home-dirRussell Belfer2012-05-242-16/+52
|\ \ \ \ | | | | | | | | | | Get user's home dir in UTF-16 clean manner
| * | | | Fix bugs in UTF-8 <-> UTF-16 conversionRussell Belfer2012-05-241-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function to convert UTF-16 to UTF-8 was only allocating a buffer of wcslen(utf16str) bytes for the UTF-8 string, but that is not sufficient if you have multibyte characters, and so when those occured, the conversion was failing. This updates the conversion functions to use the Win APIs to calculate the correct buffer lengths. Also fixes a comparison in the unit tests that would fail if you did not have a particular environment variable set.
| * | | | Get user's home dir in UTF-16 clean mannerRussell Belfer2012-05-241-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, we are having problems with home directories that have non-ascii characters in them. This rewrites the relevant code to fetch environment variables as UTF-16 and then explicitly map then into UTF-8 for our internal usage.
* | | | | repository: default to core.bare = false if it's not setCarlos Martín Nieto2012-05-241-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to consider a missing core.bare option to mean that the repository was corrupt. This is too strict. Consider it a non-bare repository if it's not set.
* | | | | Merge pull request #720 from nulltoken/fix/libgit2sharp_issue_153Vicent Martí2012-05-232-7/+18
|\ \ \ \ \ | | | | | | | | | | | | Make git_futils_mkdir_r() able to cope with Windows network paths
| * | | | | fileops: Make git_futils_mkdir_r() able to cope with Windows network pathsnulltoken2012-05-232-7/+18
| |/ / / / | | | | | | | | | | | | | | | Partially fix libgit2/libgit2sharp#153
* | | | | Remove left-over debugging outputCarlos Martín Nieto2012-05-231-2/+0
|/ / / /
* | | | CleanupMichael Schubert2012-05-192-10/+0
|/ / / | | | | | | | | | | | | | | | | | | * indexer: remove leftover printf * commit: remove unused macros COMMIT_BASIC_PARSE, COMMIT_FULL_PARSE and COMMIT_PRINT
* | | Merge pull request #710 from libgit2/breaking-changesVicent Martí2012-05-1835-143/+164
|\ \ \ | | | | | | | | Break everything before the release
| * | | errors: Rename error codesVicent Martí2012-05-1837-121/+121
| | | |
| * | | errors: Rename the generic return codesVicent Martí2012-05-1844-166/+166
| | | |
| * | | Properly tag all `enums` with a `_t`Vicent Martí2012-05-182-4/+4
| | | |
| * | | refs: git_reference_listall -> git_reference_listVicent Martí2012-05-183-3/+3
| | | |
| * | | global: Change parameter ordering in APIVicent Martí2012-05-1812-69/+90
| | | | | | | | | | | | | | | | Consistency is good.
* | | | fetch: set dummy function for local fetchMichael Schubert2012-05-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Local fetch isn't implemented yet. Don't segfault on call, but set a dummy for negotiate_fetch and terminate gracefully. Reported-by: Brad Harder <bch@methodlogic.net>
* | | | Merge pull request #685 from nulltoken/fix/list-remote-branchesVicent Martí2012-05-171-1/+1
|\ \ \ \ | |/ / / |/| | | branch: retrieve symbolic references when listing the branches
| * | | branch: retrieve symbolic references when listing the branchesnulltoken2012-05-181-1/+1
| | | |
* | | | Merge pull request #709 from arrbee/profiling-with-scottgVicent Martí2012-05-173-23/+39
|\ \ \ \ | |/ / / |/| | | Profiling with scottg
| * | | No point in keeping commented out fnRussell Belfer2012-05-171-9/+0
| | | |
| * | | Other optimization and warning fixesRussell Belfer2012-05-172-14/+23
| | | | | | | | | | | | | | | | | | | | This fixes a warning left by the earlier optimization and addresses one of the other hotspots identified by GProf.
| * | | Optimize away git_text_gather_stats in diffRussell Belfer2012-05-173-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GProf shows `git_text_gather_stats` as the most expensive call in large diffs. The function calculates a lot of information that is not actually used and does not do so in a optimal order. This introduces a tuned `git_buf_is_binary` function that executes the same algorithm in a fraction of the time.
* | | | Fix workdir iterators on empty directoriesRussell Belfer2012-05-171-4/+12
|/ / / | | | | | | | | | | | | | | | | | | Creating a workdir iterator on a directory with absolutely no files was returning an error (GIT_ENOTFOUND) instead of an iterator for nothing. This fixes that and includes two new tests that cover that case.
* | | Fix status for files under ignored dirsRussell Belfer2012-05-161-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bug where tracked files inside directories that were inside ignored directories where not being found by status. To make that a little clearer, if you have a .gitignore with: ignore/ And then have the following files: ignore/dir/tracked <-- actually a tracked file ignore/dir/untracked <-- should be ignored Then we would show the tracked file as being removed (because when we got the to contained item "dir/" inside the ignored directory, we decided it was safe to skip -- bzzt, wrong!). This update is much more careful about checking that we are not skipping over any prefix of a tracked item, regardless of whether it is ignored or not. As documented in diff.c, this commit does create behavior that still differs from core git with regards to the handling of untracked files contained inside ignored directories. With libgit2, those files will just not show up in status or diff. With core git, those files don't show up in status or diff either *unless* they are explicitly ignored by a .gitignore pattern in which case they show up as ignored files. Needless to say, this is a local behavior difference only, so it should not be important and (to me) the libgit2 behavior seems more consistent.
* | | notes: make git_note_foreach() callback signature easier to cope with from a ↵nulltoken2012-05-161-7/+9
| | | | | | | | | | | | binding perspective
* | | tree: Naming conventionsVicent Martí2012-05-164-12/+15
| | |
* | | tree: Kill the `git_tree_diff` functionsVicent Martí2012-05-161-270/+0
| | | | | | | | | | | | These are deprecated and replaced with the diffing code in git2/diff.h
* | | Merge pull request #700 from cholin/revwalk_resetVicent Martí2012-05-161-0/+3
|\ \ \ | | | | | | | | really reset walker with git_revwalk_reset
| * | | really reset walker with git_revwalk_resetNico von Geyso2012-05-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the description of git_revwalk_reset in revwalk.h the function should clear all pushed and hidden commits, and leave the walker in a blank state (just like at creation). Apparently everything gets reseted appart of pushed commits (walk->one and walk->twos) This fix should reset the walker properly.
* | | | Merge pull request #702 from arrbee/fix-status-fileVicent Martí2012-05-1615-305/+481
|\ \ \ \ | | | | | | | | | | Update git_status_file and add ranged iterators
| * | | | Document git_buf_common_prefixRussell Belfer2012-05-152-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This function fills in a git_buf with the common prefix of an array of strings, but let's make that a little more clear.
| * | | | Fix notes to use new fixed iterator signatureRussell Belfer2012-05-151-1/+1
| | | | |
| * | | | Ranged iterators and rewritten git_status_fileRussell Belfer2012-05-1514-304/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this work is to rewrite git_status_file to use the same underlying code as git_status_foreach. This is done in 3 phases: 1. Extend iterators to allow ranged iteration with start and end prefixes for the range of file names to be covered. 2. Improve diff so that when there is a pathspec and there is a common non-wildcard prefix of the pathspec, it will use ranged iterators to minimize excess iteration. 3. Rewrite git_status_file to call git_status_foreach_ext with a pathspec that covers just the one file being checked. Since ranged iterators underlie the status & diff implementation, this is actually fairly efficient. The workdir iterator does end up loading the contents of all the directories down to the single file, which should ideally be avoided, but it is pretty good.
* | | | | indexer: add more consistency checksCarlos Martín Nieto2012-05-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Error out in finalize if there is junk after the packfile hash or we couldn't process all the objects.
* | | | | Introduce GITERR_INDEXERCarlos Martín Nieto2012-05-151-5/+5
|/ / / /
* | | | Fix compilation warningsnulltoken2012-05-141-4/+1
| | | |
* | | | notes: add git_notes_foreach()nulltoken2012-05-141-23/+135
| | | |
* | | | Merge pull request #692 from nulltoken/fix/delete-branch_ENOTFOUNDVicent Martí2012-05-141-1/+1
|\ \ \ \ | | | | | | | | | | branch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist