summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* More external API cleanupmore-api-tweaksVicent Marti2012-11-1732-251/+240
|
* Fix a couple of warningsMichael Schubert2012-11-183-4/+3
|
* Merge pull request #1077 from nulltoken/fix/apinulltoken2012-11-1724-119/+260
|\ | | | | Itsy bitsy tiny winy minor api related fixes
| * reflog: make entry_byindex() and drop() git compliantnulltoken2012-11-177-39/+51
| | | | | | | | | | Passing 0 as the index now retrieves the most recent entry instead of the oldest one.
| * reflog: Fix documentationnulltoken2012-11-171-1/+2
| |
| * config: Opening a nonexistent file returns ENOTFOUNDnulltoken2012-11-175-12/+69
| |
| * config: Make git_config_file__ondisk() internalnulltoken2012-11-172-13/+13
| |
| * repo: ensure is_empty() checks there are no refsnulltoken2012-11-173-29/+50
| |
| * tests: introduce cl_git_remove_placeholders()nulltoken2012-11-172-0/+52
| |
| * repo: readonly tests don't need a sandboxed reponulltoken2012-11-171-11/+1
| |
| * env: ensure git_futils_find_xxx() returns ENOTFOUNDnulltoken2012-11-171-8/+16
| |
| * tag: rename git_tag_type to git_tag_target_typenulltoken2012-11-174-4/+4
| |
| * Fix MSVC compilation warningsnulltoken2012-11-172-6/+6
|/
* Merge pull request #1075 from carlosmn/alternates-recurseVicent Martí2012-11-162-8/+95
|\ | | | | odb: recursively load alternates
| * odb: recursively load alternatesCarlos Martín Nieto2012-11-162-8/+95
| | | | | | | | The maximum depth is 5, like in git
* | Merge pull request #1071 from arrbee/alternate-fix-strcmpScott J. Goldman2012-11-1513-69/+272
|\ \ | | | | | | Win32 fixes for diff/checkout/reset
| * | Fix reset hard tests on platforms with CRLFRussell Belfer2012-11-141-1/+16
| | | | | | | | | | | | | | | | | | The reset hard tests had hardcoded expected file content and was not correctly compensating for CRLF filtering when a file needed to be reverted by the reset hard. This fixes that.
| * | Add POSIX compat lstat() variant for win32Russell Belfer2012-11-148-60/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing p_lstat implementation on win32 is not quite POSIX compliant when setting errno to ENOTDIR. This adds an option to make is be compliant so that code (such as checkout) that cares to have separate behavior for ENOTDIR can use it portably. This also contains a couple of other minor cleanups in the posix_w32.c implementations to avoid unnecessary work.
| * | Create internal strcmp variants for function ptrsRussell Belfer2012-11-144-8/+43
| | | | | | | | | | | | | | | | | | Using the builtin strcmp and strcasecmp as function pointers is problematic on win32. This adds internal implementations and divorces us from the platform linkage.
* | | AUTHORS: cleanupMichael Schubert2012-11-161-4/+5
| | |
* | | Fix -Wmaybe-uninitialized warningMichael Schubert2012-11-161-1/+1
| | |
* | | Include Microsoft in AUTHORSBen Straub2012-11-151-0/+1
| | |
* | | Merge pull request #1074 from edubart/ignore_diff_filemodeVicent Martí2012-11-152-0/+5
|\ \ \ | | | | | | | | Add option to ignore file mode in diffs
| * | | Add option to ignore file mode in diffsEduardo Bart2012-11-152-0/+5
| | |/ | |/|
* | | Merge pull request #1072 from arrbee/diff-api-signaturesVicent Martí2012-11-1521-189/+224
|\ \ \ | |/ / |/| | Diff API signatures
| * | Add explicit git_index ptr to diff and checkoutRussell Belfer2012-11-1414-97/+112
| | | | | | | | | | | | | | | | | | | | | | | | A number of diff APIs and the `git_checkout_index` API take a `git_repository` object an operate on the index. This updates them to take a `git_index` pointer explicitly and only fall back on the `git_repository` index if the index input is NULL. This makes it easier to operate on a temporary index.
| * | Add iterator for git_index objectRussell Belfer2012-11-148-25/+78
| | | | | | | | | | | | | | | | | | The index iterator could previously only be created from a repo object, but this allows creating an iterator from a `git_index` object instead (while keeping, though renaming, the old function).
| * | Fix diff API to better parameter orderRussell Belfer2012-11-1412-152/+119
|/ / | | | | | | | | The diff API is not in the parameter order one would expect from other libgit2 APIs. This fixes that.
* | Merge pull request #1069 from carlosmn/readmeVicent Martí2012-11-131-4/+31
|\ \ | | | | | | Explain a few CMake options in the README
| * | Explain a few CMake options in the READMECarlos Martín Nieto2012-11-131-4/+31
|/ / | | | | | | | | Expose STDCALL and explain a few useful CMake options, as well as explain the quirks building on Windows.
* | Slightly different valgrind fixCarlos Martín Nieto2012-11-131-3/+1
| | | | | | | | | | Allocate with calloc rather than conditionally memsetting a specific part of the struct later on.
* | Fix a few valgrind errorsCarlos Martín Nieto2012-11-133-2/+5
|/
* Merge pull request #1068 from carlosmn/config-empty-valueVicent Martí2012-11-136-25/+46
|\ | | | | Deal with empty and nonexsitent values in config
| * config: return an emtpy string when there is no valueCarlos Martín Nieto2012-11-133-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Returning NULL for the string when we haven't signaled an error condition is counter-intuitive and causes unnecessary edge cases. Return an empty string when asking for a string value for a configuration variable such as '[section] var' to avoid these edge cases. If the distinction between no value and an empty value is needed, this can be retrieved from the entry directly. As a side-effect, this change stops the int parsing functions from segfaulting on such a variable.
| * config: distinguish between a lone variable name and one without rhsCarlos Martín Nieto2012-11-135-9/+16
| | | | | | | | | | | | '[section] variable' and '[section] variable =' behave differently when parsed as booleans, so we need to store that distinction internally.
* | http: UnrustleVicent Marti2012-11-131-4/+1
| |
* | Merge pull request #1016 from arrbee/fix-checkout-dir-removalVicent Martí2012-11-1347-653/+1526
|\ \ | | | | | | Update checkout with new strategies & behavior
| * | Fix warnings and valgrind issuesRussell Belfer2012-11-097-11/+17
| | | | | | | | | | | | | | | This fixes some various warnings that showed up in Travis and a couple uses of uninitialized memory and one memory leak.
| * | Fix various cross-platform build issuesRussell Belfer2012-11-099-42/+62
| | | | | | | | | | | | | | | | | | This fixes a number of warnings and problems with cross-platform builds. Among other things, it's not safe to name a member of a structure "strcmp" because that may be #defined.
| * | Update reset hard testRussell Belfer2012-11-091-20/+46
| | | | | | | | | | | | | | | | | | The `git_reset` API with the HARD option is still slightly broken, but this test now does exercise the ability of the command to revert modified files.
| * | fix regression in diff with submodule oidRussell Belfer2012-11-091-9/+8
| | |
| * | Rework checkout with new strategy optionsRussell Belfer2012-11-0914-226/+610
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a major reworking of checkout strategy options. The checkout code is now sensitive to the contents of the HEAD tree and the new options allow you to update the working tree so that it will match the index content only when it previously matched the contents of the HEAD. This allows you to, for example, to distinguish between removing files that are in the HEAD but not in the index, vs just removing all untracked files. Because of various corner cases that arise, etc., this required some additional capabilities in rmdir and other utility functions. This includes the beginnings of an implementation of code to read a partial tree into the index based on a pathspec, but that is not enabled because of the possibility of creating conflicting index entries.
| * | Some diff refactorings to help code reuseRussell Belfer2012-11-0911-127/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some diff functions that are useful in a rewritten checkout and this lays some groundwork for that. This contains three main things: 1. Share the function diff uses to calculate the OID for a file in the working directory (now named `git_diff__oid_for_file` 2. Add a `git_diff__paired_foreach` function to iterator over two diff lists concurrently. Convert status to use it. 3. Move all the string/prefix/index entry comparisons into function pointers inside the `git_diff_list` object so they can be switched between case sensitive and insensitive versions. This makes them easier to reuse in various functions without replicating logic. As part of this, move a couple of index functions out of diff.c and into index.c.
| * | Move pathspec code in separate filesRussell Belfer2012-11-093-135/+220
| | | | | | | | | | | | | | | | | | | | | Diff uses a `git_strarray` of path specs to represent a subset of all files to be processed. It is useful to be able to reuse this filtering in other places outside diff, so I've moved it into a standalone set of utilities.
| * | Make iterator ignore eval lazyRussell Belfer2012-11-091-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | This makes it so that the check if a file is ignored will be deferred until requested on the workdir iterator, instead of aggressively evaluating the ignore rules for each entry. This should improve performance because there will be no need to check ignore rules for files that are already in the index.
| * | Clean up a couple things missed in rebaseRussell Belfer2012-11-093-4/+4
| | |
| * | Fix checkout behavior when its hands are tiedRussell Belfer2012-11-092-120/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So, @nulltoken created a failing test case for checkout that proved to be particularly daunting. If checkout is given only a very limited strategy mask (e.g. just GIT_CHECKOUT_CREATE_MISSING) then it is possible for typechange/rename modifications to leave it unable to complete the request. That's okay, but the existing code did not have enough information not to generate an error (at least for tree/blob conflicts). This led me to a significant reorganization of the code to handle the failing case, but it has three benefits: 1. The test case is handled correctly (I think) 2. The new code should actually be much faster than the old code since I decided to make checkout aware of diff list internals. 3. The progress value accuracy is hugely increased since I added a fourth pass which calculates exactly what work needs to be done before doing anything.
| * | Extensions to rmdir and mkdir utilitiesRussell Belfer2012-11-0914-90/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing combinations of flags * Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that are left empty after removal * Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file, not a dir (previously an EEXISTS error was ignored, even for files) and enable this flag for git_futils_mkpath2file call * Improve accuracy of error messages from git_futils_mkdir
* | | makefile: Fix the builtin MakefileVicent Marti2012-11-131-1/+1
| |/ |/|
* | config: rename get_config_entry -> config_entryCarlos Martín Nieto2012-11-133-3/+3
| | | | | | | | | | We're already in the git_config namespace, there is no need to repeat it.