summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'carlosmn/empty-name' into empty-nameempty-nameJustin Spahr-Summers2013-05-131-6/+0
|\
| * signature: we do want to accept empty names or emailsCarlos Martín Nieto2013-05-091-6/+0
| |
* | Fix refdb iteration early termination bugRussell Belfer2013-05-111-9/+12
| | | | | | | | | | | | | | There was a problem found in the Rugged test suite where the refdb_fs_backend__next function could exit too early in some very specific hashing patterns for packed refs. This ports the Rugged test to libgit2 and then fixes the bug.
* | Fix broken build when MSVC SDL checks is enabledLinquize2013-05-116-10/+10
| |
* | Merge pull request #1385 from carlosmn/refs-iterEdward Thomson2013-05-1112-176/+277
|\ \ | | | | | | Introduce a refs iterator
| * | Introduce a glob-filtering iteratorCarlos Martín Nieto2013-05-113-10/+48
| | | | | | | | | | | | | | | If the backend doesn't provide support for it, the matching is done in refdb on top of a normal iterator.
| * | Move a couple more functions to use iteratorsCarlos Martín Nieto2013-05-112-40/+49
| | |
| * | refs: remove the OID/SYMBOLIC filteringCarlos Martín Nieto2013-05-1112-179/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody should ever be using anything other than ALL at this level, so remove the option altogether. As part of this, git_reference_foreach_glob is now implemented in the frontend using an iterator. Backends will later regain the ability of doing the glob filtering in the backend.
| * | refs: implement _foreach with the iteratorCarlos Martín Nieto2013-05-111-3/+21
| | |
| * | Make sure the ref iterator works in an repo without physical presenceCarlos Martín Nieto2013-05-111-1/+5
| | |
| * | refdb_fs: don't crash when the repo doesn't have a pathCarlos Martín Nieto2013-05-111-0/+7
| | |
| * | refs: introduce an iteratorCarlos Martín Nieto2013-05-114-0/+174
| | | | | | | | | | | | This allows us to get a list of reference names in a loop instead of callbacks.
* | | Merge pull request #1571 from arrbee/what-if-ignorecase-liesVicent Martí2013-05-101-16/+4
|\ \ \ | | | | | | | | Improve ignore handling in git_status_file
| * | | Improve ignore handling in git_status_fileRussell Belfer2013-05-101-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The git_status_file API was doing a hack to deal with files that are inside ignored directories. The status scan was not reporting any file in this case, so git_status_file would attempt a final "stat()" call, and return IGNORED if the file actually existed. On case-insensitive filesystems where core.ignorecase is set incorrectly, this magic check can "succeed" and report a file as ignored when it should actually return ENOTFOUND. Now that we have the GIT_STATUS_OPT_RECURSE_IGNORED_DIRS, we can use that flag to make sure that git_status_file() will look into ignored directories and eliminate the hack completely, so we give the correct error.
* | | | Fix diff output for renames and copiesRussell Belfer2013-05-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you use rename detection, the renamed and copied files would not show any text diffs because the function that decides if data should be loaded didn't know which sides of the diff to load for those cases. This adds a test that looks at the patch generated for diff entries that are COPIED or RENAMED.
* | | | clone: fix -Wmaybe-uninitialized warningMichael Schubert2013-05-101-1/+1
| | | |
* | | | calloc refs instead of malloc'ing themEdward Thomson2013-05-091-2/+2
|/ / /
* | | Fix git_repository_message docsRussell Belfer2013-05-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This clarifies the docs for git_repository_message and also adds to the tests to explicitly check NUL termination of data when the output buffer is smaller than the message size. There is a minor behavior change so that a non-NULL output buffer will always be NUL terminated (at length zero) if an error occurs.
* | | Merge pull request #1560 from carlosmn/ref-dwimVicent Martí2013-05-092-65/+65
|\ \ \ | | | | | | | | Expose git_reference_dwim
| * | | Expose git_reference_dwimCarlos Martín Nieto2013-05-072-65/+65
| | | | | | | | | | | | | | | | | | | | Extract this function out of the rev-parse code to be able to DWIM a reference instead of its target.
* | | | Merge pull request #1561 from arrbee/fix-windows-diff-eofnlVicent Martí2013-05-092-2/+2
|\ \ \ \ | |_|_|/ |/| | | Fix windows diff eofnl error
| * | | Fix dumb type in time comparisonRussell Belfer2013-05-071-1/+1
| | | |
| * | | Fix win32 type warningsRussell Belfer2013-05-071-1/+1
| | | |
* | | | Merge pull request #1552 from carlosmn/config-helpersVicent Martí2013-05-073-5/+51
|\ \ \ \ | | | | | | | | | | Config helpers for global/xdg config files
| * | | | config: convenience function to open global/xdgCarlos Martín Nieto2013-05-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The rules for which one to open is a bit silly, so let's make it easier for our users.
| * | | | repo: unconditionally create a global config backendCarlos Martín Nieto2013-05-073-5/+43
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a repository is initialised, we need to probe to see if there is a global config to load. If this is not the case, the user isn't able to write to the global config without creating the backend and adding it themselves, which is inconvenient and overly complex. Unconditionally create and add a backend for the global config file regardless of whether it exists as a convenience for users. To enable this, we allow creating backends to files that do not exist yet, changing the semantics somewhat, and making some tests invalid.
* | | | remote: correctly interpret tagopt '--tags'Carlos Martín Nieto2013-05-072-13/+27
| |/ / |/| | | | | | | | | | | | | | | | | When tagopt is set to '--tags', we should only take the default tags refspec into account and ignore any configured ones. Bring the code into compliance.
* | | Merge pull request #1556 from arrbee/diff-patch-fixesVicent Martí2013-05-073-52/+82
|\ \ \ | | | | | | | | Diff patch bug fixes
| * | | Fix line numbering for patches with eofnlRussell Belfer2013-05-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a patch contained an eofnl change (i.e. the last line either gained or lost a newline), the oldno and newno line number values for the lines in the last hunk of the patch were not useful. This makes them behave in a more expected manner.
| * | | Add GIT_DIFF_LINE_CONTEXT_EOFNLRussell Belfer2013-05-073-52/+80
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new line origin constant for the special line that is used when both files end without a newline. In the course of writing the tests for this, I was having problems with modifying a file but not having diff notice because it was the same size and modified less than one second from the start of the test, so I decided to start working on nanosecond timestamp support. This commit doesn't contain the nanosecond support, but it contains the reorganization of maybe_modified and the hooks so that if the nanosecond data were being read by stat() (or rather being copied by git_index_entry__init_from_stat), then the nsec would be taken into account. This new stuff could probably use some more tests, although there is some amount of it here.
* | | Merge pull request #1551 from nvloff/set_upstream_local_branchCarlos Martín Nieto2013-05-071-1/+2
|\ \ \ | | | | | | | | fix git_branch_set_upstream for local branches
| * | | git_branch_set_upstream with local branchesNikolai Vladimirov2013-05-061-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently git_branch_set_upstream when passed a local branch creates invalid configuration, for ex. if we setup branch 'tracking_master' to track local 'master' libgit2 generates the following config ``` [branch "track_master"] remote = . merge = .refs/heads/track_master ``` The merge value is invalid and calling git_branch_upstream on 'tracking_master' results in invalid reference error. It should do: ``` [branch "track_master"] remote = . merge = refs/heads/master ```
* | | Fixed qsort_r() problem when targeting AmigaOS.Sebastian Bauer2013-05-071-1/+1
|/ / | | | | | | | | We fall back to the libgit2-provided insert sort as done for other platforms.
* | Merge pull request #1547 from ethomson/win32_statVicent Martí2013-05-061-1/+12
|\ \ | | | | | | p_stat() should follow symlinks on windows
| * | p_stat() should follow symlinks on windowsEdward Thomson2013-05-041-1/+12
| | |
* | | Merge pull request #1526 from arrbee/cleanup-error-return-without-msgVicent Martí2013-05-0620-138/+215
|\ \ \ | | | | | | | | Make sure error messages are set for most error returns
| * | | Use assert for peel target type checkRussell Belfer2013-05-021-10/+5
| | | |
| * | | clarify error propogationRussell Belfer2013-05-011-1/+1
| | | |
| * | | clarify where error message is setRussell Belfer2013-05-011-2/+2
| | | |
| * | | Clear error msg when we eat error silentlyRussell Belfer2013-05-011-2/+4
| | | |
| * | | Fix one error not reported in revparseRussell Belfer2013-05-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many paths through revparse that may return an error code without reporting an error, I believe. This fixes one of them. Because of the backtracking in revparse, it is pretty complicated to fix the others.
| * | | minor missing error messageRussell Belfer2013-05-011-0/+1
| | | |
| * | | Factor out some code that needed to clear errorsRussell Belfer2013-05-011-43/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of places were looking up option config values and then not clearing the error codes if the values were not found. This moves the repeated pattern into a shared routine and adds the extra call to giterr_clear() when needed.
| * | | Error messages for a couple other boundary conditionsRussell Belfer2013-05-012-2/+6
| | | |
| * | | Report some errors returnable by pushRussell Belfer2013-05-011-6/+8
| | | |
| * | | Catch some odd odb backend corner case errorsRussell Belfer2013-05-011-22/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some cases, particularly where no loaded ODB backends support a particular operation, where we would return an error code without having set an error. This catches those cases and reports that no ODB backends support the operation in question.
| * | | Report a couple object error conditionsRussell Belfer2013-05-011-8/+14
| | | |
| * | | Report errors finding notesRussell Belfer2013-05-011-19/+22
| | | |
| * | | Set error when no merge base is foundRussell Belfer2013-05-011-1/+2
| | | |
| * | | Report stat error when checking if file modifiedRussell Belfer2013-05-011-1/+3
| | | |