Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-11tests: nsec: correctly free nsec_pathPatrick Steinhardt
git_buf_clear does not free allocated memory associated with a git_buf. Use `git_buf_free` instead to correctly free its memory and plug the memory leak.
2016-03-08index::racy: force racy entryEdward Thomson
Instead of hoping that we can get a racy entry by going real fast and praying real hard, just create a racy entry.
2016-03-08index::nsec: don't expect shit filesystems to not suckEdward Thomson
If the underlying filesystem doesn't support better than one second resolution, then don't expect that turning on `GIT_USE_NSEC` does anything magical to change that.
2016-02-29turn on strict object validation by defaultEdward Thomson
2016-02-29tests: use legitimate object idsEdward Thomson
Use legitimate (existing) object IDs in tests so that we have the ability to turn on strict object validation when running tests.
2016-02-29git_index_add: validate objects in index entries (optionally)Edward Thomson
When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate the index entries given to `git_index_add`.
2016-02-25nsec: update staging test for GIT_USE_NSECSEdward Thomson
The index::nsec::staging_maintains_other_nanos test was created to ensure that when we stage an entry when GIT_USE_NSECS is *unset* that we truncate the index entry and do not persist the (old, invalid) nanosec values. Ensure that when GIT_USE_NSECS is *set* that we do not do that, and actually write the correct nanosecond values.
2016-02-12win32: introduce p_timeval that isn't stupidEdward Thomson
Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.
2015-12-21typos in commentsDmitriy Olshevskiy
2015-11-30tests: fix warning for nested struct initializationPatrick Steinhardt
2015-11-20Fix some warningsJacques Germishuys
2015-11-17racy: make git_index_read_index handle racinessEdward Thomson
Ensure that `git_index_read_index` clears the uptodate bit on files that it modifies. Further, do not propagate the cache from an on-disk index into another on-disk index. Although this should not be done, as `git_index_read_index` is used to bring an in-memory index into another index (that may or may not be on-disk), ensure that we do not accidentally bring in these bits when misused.
2015-11-17racy: ensure git_index_read_tree clears uptodateEdward Thomson
Ensure that `git_index_read_tree` clears the uptodate bit on files that it modifies.
2015-11-17index: test for smudged entries on write onlyEdward Thomson
Test that entries are only smudged when we write the index: the entry smudging is to prevent us from updating an index in a way that it would be impossible to tell that an item was racy. Consider when we load an index: any entries that have the same (or newer) timestamp than the index itself are considered racy, and are subject to further scrutiny. If we *save* that index with the same entries that we loaded, then the index would now have a newer timestamp than the entries, and they would no longer be given that additional scrutiny, failing our racy detection! So test that we smudge those entries only on writing the new index, but that we can detect them (in diff) without having to write.
2015-11-17index: don't detect raciness in uptodate entriesEdward Thomson
Keep track of entries that we believe are up-to-date, because we added the index entries since the index was loaded. This prevents us from unnecessarily examining files that we wrote during the cleanup of racy entries (when we smudge racily clean files that have a timestamp newer than or equal to the index's timestamp when we read it). Without keeping track of this, we would examine every file that we just checked out for raciness, since all their timestamps would be newer than the index's timestamp.
2015-11-12Merge pull request #3170 from CmdrMoozy/nsec_fixCarlos Martín Nieto
git_index_entry__init_from_stat: set nsec fields in entry stats
2015-11-12Failing test for case sensitive conflicts in the indexnulltoken
2015-11-03index: test that add_bypath preserves symlinksEdward Thomson
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.)
2015-10-22index: test that we round-trip nsecsEdward Thomson
Test that nanoseconds are round-tripped correctly when we read an index file that contains them. We should, however, ignore them because we don't understand them, and any new entries in the index should contain a `0` nsecs field, while existing preserving entries.
2015-10-02Merge branch 'master' into nsec_fix_nextAxel Rasmussen
2015-09-30index: also try conflict mode when insertingEdward Thomson
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.
2015-09-29index: test that add_bypath preserves modeEdward Thomson
2015-09-28Plug some leaksCarlos Martín Nieto
2015-09-19diff/index: respect USE_NSEC for racily clean file detectionAxel Rasmussen
2015-09-17git_futils_mkdir_*: make a relative-to-base mkdirEdward Thomson
Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter assumes that we own everything beneath the base, as if it were being called with a base of the repository or working directory, and is tailored towards checkout and ensuring that there is no bogosity beneath the base that must be cleaned up. This is (at best) slow and (at worst) unsafe in the larger context of a filesystem where we do not own things and cannot do things like unlink symlinks that are in our way.
2015-09-08Merge pull request #3353 from ethomson/wrongcase_addCarlos Martín Nieto
index: canonicalize directory case when adding
2015-09-08Merge pull request #3381 from leoyanggit/index_directory_iteratorEdward Thomson
New feature: add the ablility to iterate through a directory in index
2015-09-08git_index_add: allow case changing renamesEdward Thomson
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.
2015-09-08index: canonicalize directory case when addingEdward Thomson
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`.
2015-09-06Merge pull request #3366 from libgit2/cmn/index-hashmapEdward Thomson
Use a hashmap for path-based lookups in the index
2015-09-04New API: git_index_find_prefixLeo Yang
Find the first index entry matching a prefix.
2015-08-14index: add tests around case switchingCarlos Martín Nieto
We were missing tests for switching the case-sensitivity of an index in-memory and then looking up entries in it.
2015-08-04win32: ensure hidden files can be stagedEdward Thomson
2015-08-01index: test that an unregistered submodule gets stagedCarlos Martín Nieto
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.
2015-08-01index: add test for adding an old-style submodule to indexLinquize
2015-07-12index: allow add_bypath to update submodulesCarlos Martín Nieto
Similarly to how git itself does it, allow the index update operation to stage a change in a submodule's HEAD.
2015-07-12blob: fail to create a blob from a dir with EDIRECTORYCarlos Martín Nieto
This also affects `git_index_add_bypath()` by providing a better error message and a specific error code when a directory is passed.
2015-06-30index tests: add eol to avoid compiler warningEdward Thomson
2015-06-30index test: include repository.h for declEdward Thomson
2015-06-26index, iterator, fetchhead: plug leaksCarlos Martín Nieto
2015-06-22index: add a diff test for smudging a file which becomes emptyCarlos Martín Nieto
Even though the file is empty and thus the size in the entry matches, we should be able to detect it as a difference.
2015-06-22tests: move racy tests to the indexCarlos Martín Nieto
They fit there much better, even though we often check by diffing, it's about the behaviour of the index.
2015-06-19index: user a better assertion when comparing sizesCarlos Martín Nieto
This will tell us which numbers we were trying to compare, rather than just telling us that they're different.
2015-06-02Fixed build warnings on Xcode 6.1Pierre-Olivier Latour
2015-05-28git_index_add_all: test that conflicts are handledEdward Thomson
When confronted with a conflict in the index, `git_index_add_all` should stage the working directory copy. If there is no file in the working directory, the conflict should simply be removed.
2015-05-28introduce `git_index_entry_is_conflict`Edward Thomson
It's not always obvious the mapping between stage level and conflict-ness. More importantly, this can lead otherwise sane people to write constructs like `if (!git_index_entry_stage(entry))`, which (while technically correct) is unreadable. Provide a nice method to help avoid such messy thinking.
2015-05-28conflict tests: use GIT_IDXENTRY_STAGE_SETEdward Thomson
2015-05-28index: validate mode of new conflictsEdward Thomson
2015-05-28conflicts: when adding conflicts, remove stagedEdward Thomson
When adding a conflict for some path, remove the staged entry. Otherwise, an illegal index (with both stage 0 and high-stage entries) would result.
2015-05-21index_add_all: include untracked files in new subdirsEdward Thomson