summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | index_read_index: invalidate new paths in tree cacheEdward Thomson2016-06-021-0/+6
| | | | | | | | | | | | | | | | | | When adding a new entry to an existing index via `git_index_read_index`, be sure to remove the tree cache entry for that new path. This will mark all parent trees as dirty.
| * | rebase: test rebasing a new commit with subfolderEdward Thomson2016-06-028-0/+83
| | | | | | | | | | | | | | | Test a rebase (both a merge rebase and an inmemory rebase) with a new commit that adds files underneath a new subfolder.
| * | test: ensure we can round-trip a written treeEdward Thomson2016-06-021-0/+23
| | | | | | | | | | | | | | | Read a tree into an index, write the index, then re-open the index and ensure that we are treesame to the original.
| * | index_read_index: set flags for path_len correctlyEdward Thomson2016-06-021-0/+3
| | | | | | | | | | | | Update the flags to reset the path_len (to emulate `index_insert`)
| * | index_read_index: differentiate on modeEdward Thomson2016-06-021-1/+2
| | | | | | | | | | | | | | | Treat index entries with different modes as different, which they are, at least for the purposes of up-to-date calculations.
| * | index_read_index: reset error correctlyEdward Thomson2016-06-021-0/+2
| | | | | | | | | | | | | | | | | | Clear any error state upon each iteration. If one of the iterations ends (with an error of `GIT_ITEROVER`) we need to reset that error to 0, lest we stop the whole process prematurely.
| * | round-trip trees through index_read_indexEdward Thomson2016-06-021-0/+32
|/ / | | | | | | | | | | | | Read a tree into an index using `git_index_read_index` (by reading a tree into a new index, then reading that index into the current index), then write the index back out, ensuring that our new index is treesame to the tree that we read.
* | Merge pull request #3796 from mmuman/haikuEdward Thomson2016-06-011-0/+4
|\ \ | | | | | | Preliminary Haiku port
| * | CMakeLists: Add libnetwork for HaikuFrançois Revol2016-05-221-0/+4
| | |
* | | Merge pull request #3801 from ethomson/warningEdward Thomson2016-06-015-9/+11
|\ \ \ | | | | | | | | cleanup: unused warning
| * | | win32: clean up unused warnings in DllMainEdward Thomson2016-06-011-0/+3
| | | |
| * | | rebase: change assertion to avoidEdward Thomson2016-06-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks like we're getting the operation and not doing anything with it, when in fact we are asserting that it's not null. Simply assert that we are within the operation boundary instead of using the `git_array_get` macro to do this for us.
| * | | filebuf: fix uninitialized warningEdward Thomson2016-06-011-1/+1
| | | |
| * | | checkout: drop unused repoEdward Thomson2016-06-011-4/+3
| | | |
| * | | cleanup: unused warningEdward Thomson2016-06-011-0/+3
|/ / /
* | | Merge pull request #3803 from glensc/patch-1Edward Thomson2016-05-271-1/+1
|\ \ \ | |_|/ |/| | Update CMakeLists.txt
| * | Update CMakeLists.txtElan Ruusamäe2016-05-271-1/+1
|/ / | | | | typo fix
* | Merge pull request #3799 from sschuberth/masterEdward Thomson2016-05-261-1/+1
|\ \ | | | | | | Use AppVeyor's Start-FileDownload cmdlet
| * | Use AppVeyor's Start-FileDownload cmdletSebastian Schuberth2016-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | Start-FileDownload maintains current directory context and allows specifying a request timeout, see [1]. [1] https://www.appveyor.com/docs/how-to/download-file#start-filedownload-cmdlet
* | | Merge pull request #3798 from mmuman/stat-test-fixEdward Thomson2016-05-261-2/+3
|\ \ \ | | | | | | | | test: Fix stat() test to mask out unwanted bits
| * | | test: Fix stat() test to mask out unwanted bitsFrançois Revol2016-05-241-2/+3
| |/ / | | | | | | | | | Haiku and Hurd both pass extra bits in struct stat::st_mode.
* | | Merge branch 'checkout_submodules'Edward Thomson2016-05-264-10/+105
|\ \ \
| * | | Ignore submodules when checking for merge conflicts in the workdir.Jason Haslam2016-05-261-0/+1
| | | |
| * | | checkout: handle dirty submodules correctlyJason Haslam2016-05-263-10/+104
|/ / / | | | | | | | | | | | | Don't generate conflicts when checking out a modified submodule and the submodule is dirty or modified in the workdir.
* | | Merge pull request #3792 from edquist/miscEdward Thomson2016-05-261-1/+1
|\ \ \ | |/ / |/| | Fix comment for GIT_FILEMODE_LINK
| * | Fix comment for GIT_FILEMODE_LINKCarl Edquist2016-05-181-1/+1
| |/ | | | | | | 0120000 is symbolic link, not commit
* | Merge pull request #3797 from libgit2/cmn/remove-single-entryCarlos Martín Nieto2016-05-242-0/+41
|\ \ | | | | | | tree: handle removal of all entries in the updater
| * | tree: handle removal of all entries in the updatercmn/remove-single-entryCarlos Martín Nieto2016-05-242-0/+41
|/ / | | | | | | | | When we remove all entries in a tree, we should remove that tree from its parent rather than include the empty tree.
* | Merge pull request #3794 from libgit2/cmn/tree-update-basenameCarlos Martín Nieto2016-05-232-13/+51
|\ \ | |/ |/| Tree updater fixups
| * tree: plug leaks in the tree updatercmn/tree-update-basenameCarlos Martín Nieto2016-05-192-4/+13
| |
| * tree: use the basename for the entry removalCarlos Martín Nieto2016-05-191-1/+1
| | | | | | | | | | | | When we want to remove the file, use the basename as the name of the entry to remove, instead of the full one, which includes the directories we've inserted into the stack.
| * tree: use testrepo2 for the tree updater testsCarlos Martín Nieto2016-05-191-9/+38
|/ | | | This gives us trees with subdirectories, which the new test needs.
* Merge pull request #3770 from libgit2/cmn/tree-updateEdward Thomson2016-05-183-0/+458
|\ | | | | Add a method specifically for modifying trees
| * Introduce a function to create a tree based on a different onecmn/tree-updateCarlos Martín Nieto2016-05-173-0/+458
|/ | | | | | | | | | | Instead of going through the usual steps of reading a tree recursively into an index, modifying it and writing it back out as a tree, introduce a function to perform simple updates more efficiently. `git_tree_create_updated` avoids reading trees which are not modified and supports upsert and delete operations. It is not as versatile as modifying the index, but it makes some common operations much more efficient.
* Merge pull request #3767 from pks-t/pks/misc-fixesEdward Thomson2016-05-096-23/+21
|\ | | | | Misc fixes
| * diff: simplify code for handling empty dirsPatrick Steinhardt2016-05-031-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When determining diffs between two iterators we may need to recurse into an unmatched directory for the "new" iterator when it is either a prefix to the current item of the "old" iterator or when untracked/ignored changes are requested by the user and the directory is untracked/ignored. When advancing into the directory and no files are found, we will get back `GIT_ENOTFOUND`. If so, we simply skip the directory, handling resulting unmatched old items in the next iteration. The other case of `iterator_advance_into` returning either `GIT_NOERROR` or any other error but `GIT_ENOTFOUND` will be handled by the caller, which will now either compare the first directory entry of the "new" iterator in case of `GIT_ENOERROR` or abort on other cases. Improve readability of the code to make the above logic more clear.
| * delta-apply: fix sign extensionPatrick Steinhardt2016-05-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We compute offsets by executing `off |= (*delta++ << 24)` for multiple constants, where `off` is of type `size_t` and `delta` is of type `unsigned char`. The usual arithmetic conversions (see ISO C89 §3.2.1.5 "Usual arithmetic conversions") kick in here, causing us to promote both operands to `int` and then extending the result to an `unsigned long` when OR'ing it with `off`. The integer promotion to `int` may result in wrong size calculations for big values. Fix the issue by making the constants `unsigned long`, causing both operands to be promoted to `unsigned long`.
| * odb_loose: fix undefined behavior when computing sizePatrick Steinhardt2016-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An object's size is computed by reading the object header's size field until the most significant bit is not set anymore. To get the total size, we increase the shift on each iteration and add the shifted value to the total size. We read the current value into a variable of type `unsigned char`, from which we then take all bits except the most significant bit and shift the result. We will end up with a maximum shift of 60, but this exceeds the width of the value's type, resulting in undefined behavior. Fix the issue by instead reading the values into a variable of type `unsigned long`, which matches the required width. This is equivalent to git.git, which uses an `unsigned long` as well.
| * checkout: set ignorecase=0 when config lookup failsPatrick Steinhardt2016-05-021-2/+4
| | | | | | | | | | | | | | | | | | | | When `git_repository__cvar` fails we may end up with a `ignorecase` value of `-1`. As we subsequently check if `ignorecase` is non-zero, we may end up reporting that data should be removed when in fact it should not. Err on the safer side and set `ignorecase = 0` when `git_repository__cvar` fails.
| * merge_file: do not unnecessarily check ours/theirs for NULLPatrick Steinhardt2016-05-021-4/+4
| | | | | | | | | | | | | | | | | | The `merge_file__xdiff` function checks if either `ours` or `theirs` is `NULL`. The function is to be called with existing files, though, and in fact already unconditionally dereferences both pointers. Remove the unnecessary check to silence warnings.
| * index: fix memory leak on error casePatrick Steinhardt2016-05-021-1/+1
| |
* | Merge pull request #3773 from lucasderraugh/patch-1Edward Thomson2016-05-081-0/+1
|\ \ | | | | | | Fix unused variable 'message' warning
| * | Fix unused variable 'message' warningLucas Derraugh2016-05-051-0/+1
| | |
* | | Merge pull request #3757 from johnhaley81/jh/fix-create-initial-commitCarlos Martín Nieto2016-05-062-1/+61
|\ \ \ | |/ / |/| | Fix `git_commit_create` for an initial commit
| * | Fix initial commit testJohn Haley2016-05-041-30/+5
| | | | | | | | | | | | | | | | | | `test_commit_commit__create_initial_commit_parent_not_current` was not correctly testing that `HEAD` was not changed. Now we grab the oid that it was pointing to before the call to `git_commit_create` and the oid that it's pointing to afterwards and compare those.
| * | Add tests for creating an initial commitJohn Haley2016-05-031-0/+85
| | |
| * | Fix `git_commit_create` for an initial commitJohn Haley2016-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | When calling `git_commit_create` with an empty array of `parents` and `parent_count == 0` the call will segfault at https://github.com/libgit2/libgit2/blob/master/src/commit.c#L107 when it's trying to compare `current_id` to a null parent oid. This just puts in a check to stop that segfault.
* | | Merge pull request #3769 from libgit2/ethomson/rebase_inmemory_no_baseCarlos Martín Nieto2016-05-043-9/+119
|\ \ \ | |/ / |/| | Rebase: rebase a branch with no merge base for in-memory
| * | rebase: handle no common ancestor for inmemoryethomson/rebase_inmemory_no_baseEdward Thomson2016-05-031-4/+15
| | |
| * | rebase: test rebase (merge) w/ no common ancestorEdward Thomson2016-05-032-5/+104
|/ /