summaryrefslogtreecommitdiff
path: root/tests-clar/submodule
Commit message (Collapse)AuthorAgeFilesLines
* Rename tests-clar to testsBen Straub2013-11-145-982/+0
|
* Rename new fn to git_repository_reinit_filesystemRussell Belfer2013-10-081-2/+3
|
* Case sensitivity issues on LinuxRussell Belfer2013-10-081-1/+2
| | | | | | | | A couple of tests were actually dealing incorrectly with case sensitivity issues on Linux because they were relying on having core.ignorecase set to true. Now that the fixture initialization sets the case sensitivity to be accurate for the platform, it exposed bugs in these tests.
* More filemode cleanups for FAT on MacOSRussell Belfer2013-10-083-28/+6
| | | | | | | | | | | | | | | | | | | | | | This cleans up some additional issues. The main change is that on a filesystem that doesn't support mode bits, libgit2 will now create new blobs with GIT_FILEMODE_BLOB always instead of being at the mercy to the filesystem driver to report executable or not. This means that if "core.filemode" lies and claims that filemode is not supported, then we will ignore the executable bit from the filesystem. Previously we would have allowed it. This adds an option to the new git_repository_reset_filesystem to recurse through submodules if desired. There may be other types of APIs that would like a "recurse submodules" option, but this one is particularly useful. This also has a number of cleanups, etc., for related things including trying to give better error messages when problems come up from the filesystem. For example, the FAT filesystem driver on MacOS appears to return errno EINVAL if you attempt to write a filename with invalid UTF-8 in it. We try to capture that with a better error message now.
* Rearrange clar submodule cleanup codeRussell Belfer2013-09-173-11/+13
|
* No such thing as an orphan branchCarlos Martín Nieto2013-09-171-5/+5
| | | | | | | | | | | Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
* Untracked directories with .git should be ignoredRussell Belfer2013-07-103-12/+61
| | | | | | | | | | | | | | | | | This restores a behavior that was accidentally lost during some diff refactoring where an untracked directory that contains a .git item should be treated as IGNORED, not as UNTRACKED. The submodule code already detects this, but the diff code was not handling the scenario right. This also updates a number of existing tests that were actually exercising the behavior but did not have the right expectations in place. It actually makes the new `test_diff_submodules__diff_ignore_options` test feel much better because the "not-a-submodule" entries are now ignored instead of showing up as untracked items. Fixes #1697
* Add ignore_submodules to diff optionsRussell Belfer2013-07-101-5/+5
| | | | | | | | | | | | | | | | | | | | This adds correct support for an equivalent to --ignore-submodules in diff, where an actual ignore value can be passed to diff to override the per submodule settings in the configuration. This required tweaking the constants for ignore values so that zero would not be used and could represent an unset option to the diff. This was an opportunity to move the submodule values into include/git2/types.h and to rename the poorly named DEFAULT values for ignore and update constants to RESET instead. Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL (which is actually a minor change from the old behavior in that submodules will now be treated as UNMODIFIED deltas instead of being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED). This includes tests for the various new settings.
* Test submodules with empty index or orphaned headRussell Belfer2013-06-271-0/+71
| | | | | | | | In both of these cases, the submodule data should still be loaded just (obviously) without the data that comes from either the index or the HEAD. This fixes a bug in the orphaned head case.
* Improve case handling in git_diff__paired_foreachRussell Belfer2013-06-171-2/+5
| | | | | | | | This commit reinstates some changes to git_diff__paired_foreach that were discarded during the rebase (because the diff_output.c file had gone away), and also adjusts the case insensitively logic slightly to hopefully deal with either mismatched icase diffs and other case insensitivity scenarios.
* Make iterators use GIT_ITEROVER & smart advanceRussell Belfer2013-05-311-4/+1
| | | | | | | | | | | | | | | 1. internal iterators now return GIT_ITEROVER when you go past the last item in the iteration. 2. git_iterator_advance will "advance" to the first item in the iteration if it is called immediately after creating the iterator, which allows a simpler idiom for basic iteration. 3. if git_iterator_advance encounters an error reading data (e.g. a missing tree or an unreadable file), it returns the error but also attempts to advance past the invalid data to prevent an infinite loop. Updated all tests and internal usage of iterators to account for these new behaviors.
* fix some leaksEdward Thomson2013-05-021-0/+2
|
* Update diff handling of untracked directoriesRussell Belfer2013-04-301-0/+27
| | | | | | | | | | When diff encounters an untracked directory, there was a shortcut that it took which is not compatible with core git. This makes the default behavior no longer take that shortcut and instead look inside the untracked directory to see if there are any untracked files within it. If there are not, then the directory is treated as an ignore directory instead of an untracked directory. This has implications for the git_status APIs.
* Three submodule status bug fixesRussell Belfer2013-03-183-8/+86
| | | | | | | | | | | | | | | | 1. Fix sort order problem with submodules where "mod" was sorting after "mod-plus" because they were being sorted as "mod/" and "mod-plus/". This involved pushing the "contains a .git entry" test significantly lower in the stack. 2. Reinstate behavior that a directory which contains a .git entry will be treated as a submodule during iteration even if it is not yet added to the .gitmodules. 3. Now that any directory containing .git is reported as submodule, we have to be more careful checking for GIT_EEXISTS when we do a submodule lookup, because that is the error code that is returned by git_submodule_lookup when you try to look up a directory containing .git that has no record in gitmodules or the index.
* Vector improvements and their falloutPhilip Kelley2013-01-271-3/+2
|
* API updates for submodule.hRussell Belfer2012-11-271-12/+12
|
* Clean up config.hBen Straub2012-11-271-1/+1
|
* Extensions to rmdir and mkdir utilitiesRussell Belfer2012-11-091-4/+4
| | | | | | | | | | | * 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
* index refactoringEdward Thomson2012-10-291-1/+1
|
* Add config level support in the config APIyorah2012-10-231-4/+2
| | | | | | | Added `struct git_config_entry`: a git_config_entry contains the key, the value, and the config file level from which a config element was found. Added `git_config_open_level`: build a single-level focused config object from a multi-level one. We are now storing `git_config_entry`s in the khash of the config_file
* Add complex checkout test and then fix checkoutRussell Belfer2012-10-091-4/+4
| | | | | | | | | | | | | | | | This started as a complex new test for checkout going through the "typechanges" test repository, but that revealed numerous issues with checkout, including: * complete failure with submodules * failure to create blobs with exec bits * problems when replacing a tree with a blob because the tree "example/" sorts after the blob "example" so the delete was being processed after the single file blob was created This fixes most of those problems and includes a number of other minor changes that made it easier to do that, including improving the TYPECHANGE support in diff/status, etc.
* Add missing accessor for fetchRecurseSubmodulesRussell Belfer2012-09-071-0/+11
| | | | | | When `git_submodule` became an opaque structure, I forgot to add accessor functions for the fetchRecurseSubmodules config setting. This fixes that.
* Test for gitmodules only submodule defRussell Belfer2012-09-051-1/+5
| | | | | | This should confirm that issue #835 is fixed where a submodule that is only declared in the .gitmodules file was not accessible via the submodule APIs.
* Working implementation of git_submodule_statusRussell Belfer2012-08-241-11/+275
| | | | | | | | | | | | | This is a big redesign of the git_submodule_status API and the implementation of the redesigned API. It also fixes a number of bugs that I found in other parts of the submodule API while writing the tests for the status part. This also fixes a couple of bugs in the iterators that had not been noticed before - one with iterating when there is a gitlink (i.e. separate-work-dir) and one where I was treating anything even vaguely submodule-like as a submodule, more aggressively than core git does.
* Fix valgrind issues and leaksRussell Belfer2012-08-241-0/+1
| | | | | | This fixes up a number of problems flagged by valgrind and also cleans up the internal `git_submodule` allocation handling overall with a simpler model.
* Major submodule rewriteRussell Belfer2012-08-245-0/+496
This replaces the old submodule API with a new extended API that supports most of the things that can be done with `git submodule`.