summaryrefslogtreecommitdiff
path: root/tests/index/bypath.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: use legitimate object idsEdward Thomson2016-02-281-0/+3
| | | | | Use legitimate (existing) object IDs in tests so that we have the ability to turn on strict object validation when running tests.
* index: test that add_bypath preserves symlinksEdward Thomson2015-11-031-0/+29
| | | | | | Test that on platforms without `core.symlinks`, we preserve symlinks in `git_index_add_bypath`. (Users should correct the actual index entry's mode to change a link to a regular file.)
* index: also try conflict mode when insertingEdward Thomson2015-09-301-1/+66
| | | | | | | | | | When we do not trust the on-disk mode, we use the mode of an existing index entry. This allows us to preserve executable bits on platforms that do not honor them on the filesystem. If there is no stage 0 index entry, also look at conflicts to attempt to answer this question: prefer the data from the 'ours' side, then the 'theirs' side before falling back to the common ancestor.
* index: test that add_bypath preserves modeEdward Thomson2015-09-291-0/+23
|
* git_index_add: allow case changing renamesEdward Thomson2015-09-081-0/+20
| | | | | | | | | | | On case insensitive platforms, allow `git_index_add` to provide a new path for an existing index entry. Previously, we would maintain the case in an index entry without the ability to change it (except by removing an entry and re-adding it.) Higher-level functions (like `git_index_add_bypath` and `git_index_add_frombuffers`) continue to keep the old path for easier usage.
* index: canonicalize directory case when addingEdward Thomson2015-09-081-0/+148
| | | | | | | | | | | | | | | | On case insensitive systems, when given a user-provided path in the higher-level index addition functions (eg `git_index_add_bypath` / `git_index_add_frombuffer`), examine the index to try to match the given path to an existing directory. Various mechanisms can cause the on-disk representation of a folder to not match the representation in HEAD or the index - for example, a case changing rename of some file `a/file.txt` to `A/file.txt` will update the paths in the index, but not rename the folder on disk. If a user subsequently adds `a/other.txt`, then this should be stored in the index as `A/other.txt`.
* win32: ensure hidden files can be stagedEdward Thomson2015-08-031-0/+26
|
* index: test that an unregistered submodule gets stagedCarlos Martín Nieto2015-08-011-1/+7
| | | | | | When we pass the path of a repository to `_bypath()`, we should behave like git and stage it as a `_COMMIT` regardless of whether it is registered a a submodule.
* index: add test for adding an old-style submodule to indexLinquize2015-08-011-0/+7
|
* index: allow add_bypath to update submodulescmn/index-add-submoduleCarlos Martín Nieto2015-07-121-0/+12
| | | | | Similarly to how git itself does it, allow the index update operation to stage a change in a submodule's HEAD.
* blob: fail to create a blob from a dir with EDIRECTORYCarlos Martín Nieto2015-07-121-0/+23
This also affects `git_index_add_bypath()` by providing a better error message and a specific error code when a directory is passed.