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-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-01checkout test: Apply umask to file-mode test as wellMichał Górny
Fix the file-mode test to expect system umask being applied to the created file as well (it is currently applied to the directory only). This fixes the test on systems where umask != 022. Signed-off-by: Michał Górny <mgorny@gentoo.org>
2015-11-20Fix some warningsJacques Germishuys
2015-11-17checkout::crlf test: don't crash when no idx entryEdward Thomson
When there's no matching index entry (for whatever reason), don't try to dereference the null return value to get at the id. Otherwise when we break something in the index API, the checkout test crashes for confusing reasons and causes us to step through it in a debugger thinking that we had broken much more than we actually did.
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-16checkout: overwrite files with differing modesEdward Thomson
When a file exists on disk and we're checking out a file that differs in executableness, remove the old file. This allows us to recreate the new file with p_open, which will take the new mode into account and handle setting the umask properly. Remove any notion of chmod'ing existing files, since it is now handled by the aforementioned removal and was incorrect, as it did not take umask into account.
2015-09-16checkout::tree tests: don't use hardcoded modeEdward Thomson
2015-09-16checkout::tree tests: don't use static bufferEdward Thomson
2015-09-16Check that checkout preserves filemode in working directory.Matti Virolainen
2015-09-16Check that an executable in index is not an executable after checkout.Matti Virolainen
2015-06-30checkout test: mark unused varsEdward Thomson
2015-06-30checkout test: check getcwd return valueEdward Thomson
2015-06-26checkout: plug a few leaksCarlos Martín Nieto
2015-06-22crlf tests: ensure that Unix obeys autocrlf=trueEdward Thomson
All platforms do terrible, horrible, no good, very bad translation when core.autocrlf=true. It's not just Windows!
2015-06-22crlf tests: use known-good data produced by gitEdward Thomson
Given a variety of combinations of core.autocrlf settings and attributes settings, test that we check out data into the working directory the same as a known-good test resource created by git.git.
2015-06-22crlf: include utf8 resources in master branchEdward Thomson
Include the UTF8 and UTF8 BOM tests in the master crlf test branch for completeness.
2015-06-20tests: tick over five seconds instead of oneCarlos Martín Nieto
When ticking over one second, it can happen that the actual time ticks over the same second between the time that we undermine our own race protections and the time in which we perform the index update. Such timing would make the time in the entries match the index' timestamp and we have not gained anything. Ticking over five seconds makes it so that if real-time rolls over that second, our index is still ahead. This is still suboptimal as we're dealing with timing, but five seconds should be long enough for any reasonable test runner to finish the tests.
2015-06-17Fixed Xcode 6.1 build warningsPierre-Olivier Latour
2015-06-16Introduce p_utimes and p_futimesEdward Thomson
Provide functionality to set the time on a filesystem entry, using utimes or futimes on POSIX type systems or SetFileTime on Win32.
2015-06-16tests: tick the index when we count OID calculationsCarlos Martín Nieto
These tests want to test that we don't recalculate entries which match the index already. This is however something we force when truncating racily-clean entries. Tick the index forward as we know that we don't perform the modifications which the racily-clean code is trying to avoid.
2015-06-16crlf: tick the index forward to work around racy-git behaviourCarlos Martín Nieto
In order to avoid racy-git, we zero out the file size for entries with the same timestamp as the index (or during the initial checkout). This is the case in a couple of crlf tests, as the code is fast enough to do everything in the same second. As we know that we do not perform the modification just after writing out the index, which is what this is designed to work around, tick the mtime of the index file such that it doesn't agree with the files anymore, and we do not zero out these entries.
2015-06-12Fix leaks in tests/checkout/icaseJeff Hostetler
2015-05-29Rename GIT_EMERGECONFLICT to GIT_ECONFLICTEdward Thomson
We do not error on "merge conflicts"; on the contrary, merge conflicts are a normal part of merging. We only error on "checkout conflicts", where a change exists in the index or the working directory that would otherwise be overwritten by performing the checkout. This *may* happen during merge (after the production of the new index that we're going to checkout) but it could happen during any checkout.
2015-05-28conflict tests: use GIT_IDXENTRY_STAGE_SETEdward Thomson
2015-05-26Fix ident replacement to match Git behaviorColomban Wendling
Git inserts a space after the SHA1 (as of 2.1.4 at least), so do the same.
2015-05-13Remove the callbacks struct from the remoteCarlos Martín Nieto
Having the setting be different from calling its actions was not a great idea and made for the sake of the wrong convenience. Instead of that, accept either fetch options, push options or the callbacks when dealing with the remote. The fetch options are currently only the callbacks, but more options will be moved from setters and getters on the remote to the options. This does mean passing the same struct along the different functions but the typical use-case will only call git_remote_fetch() or git_remote_push() and so won't notice much difference.
2015-05-04checkout test: better case-insensitive test on MacEdward Thomson
On Mac OS, `realpath` is deficient in determining the actual filename on-disk as it will simply provide the string you gave it if that file exists, instead of returning the filename as it exists. Instead we must read the directory entries for the parent directory to get the canonical filename.
2015-05-04checkout test: only run icase on icase platformEdward Thomson
2015-05-04checkout: remove blocking dir when FORCEdEdward Thomson
2015-05-04Revert "Always checkout with case sensitive iterator"Edward Thomson
This reverts commit 40d791545abfb3cb71553a27dc64129e1a9bec28.
2015-05-04checkout test: ensure we write to casechanged dirEdward Thomson
Ensure that on a case insensitive filesystem that we can checkout into some folder 'FOLDER' that exists on disk, even if the target of the checkout is a different case (eg 'folder').
2015-05-04checkout test: ignore unstaged case-changing renamesEdward Thomson
On Windows, you might sloppily rewrite a file (or have a sloppy text editor that does it for you) and accidentally change its case. (eg, "README" -> "readme"). Git ignores this accidental case changing rename during checkout and will happily write the new content to the file despite the name change. We should, too.
2015-04-23Merge pull request #3032 from jfultz/index-file-modesEdward Thomson
Fix git_checkout_tree() to do index filemodes correctly on Windows.
2015-04-10Merge pull request #3030 from linquize/symlink_supportedEdward Thomson
If work_dir is not specified, use repo_dir to test if symlink is supported
2015-04-07Fix git_checkout_tree() to do index filemodes correctly on Windows.John Fultz
git_checkout_tree() has some fallback behaviors for file systems which don't have full support of filemodes. Generally works fine, but if a given file had a change of type from a 0644 to 0755 (i.e., you add executable permissions), the fallback behavior incorrectly triggers when writing hte updated index. This would cause a git_checkout_tree() command, even with the GIT_CHECKOUT_FORCE option set, to leave a dirty index on Windows. Also added checks to an existing test to catch this case.
2015-04-04Test: Create repo in while current dir is readonly and checkout symlinkLinquize
2015-03-25Illustrate bad checkout on WindowsJacques Germishuys
2015-03-17Lower case the include directive of windows headerClaudiu Olteanu
Since the Linux platform has a case sensitive file system, the header name should be lower case for cross compiling purposes. (On Linux, the mingw header is called ```windows.h```).
2015-03-03Remove swp filesCarlos Martín Nieto
2015-03-03repository: remove log message override for switching the active branchCarlos Martín Nieto
We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
2015-03-03branch: don't accept a reflog message overrideCarlos Martín Nieto
This namespace is about behaving like git's branch command, so let's do exactly that instead of taking a reflog message. This override is still available via the reference namespace.
2015-03-03reset: remove reflog message overrideCarlos Martín Nieto
This function is meant to simulate what git does in the reset command, so we should include the reflog message in that.
2015-03-03Remove the signature from ref-modifying functionsCarlos Martín Nieto
The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
2015-02-27checkout tests: just use SAFE where appropriateEdward Thomson
2015-02-27checkout: remove `GIT_CHECKOUT_SAFE_CREATE` as a strategyEdward Thomson
2015-02-27checkout: upgrade to `SAFE_CREATE` when no index fileEdward Thomson
When the repository does not contain an index, emulate git's behavior and upgrade to `SAFE_CREATE`. This allows us to check out repositories created with `git clone --no-checkout`.
2015-02-14checkout: introduce GIT_CHECKOUT_DONT_WRITE_INDEXEdward Thomson
2015-02-12Merge pull request #2866 from ethomson/checkout_perf2Carlos Martín Nieto
Checkout performance
2015-02-04remove some unused warningsEdward Thomson