|
35439f59
|
2016-02-11T12:24:21
|
|
win32: introduce p_timeval that isn't stupid
Windows defines `timeval` with `long`, which we cannot
sanely cope with. Instead, use a custom timeval struct.
|
|
326c9fc2
|
2015-12-01T20:41:23
|
|
checkout test: Apply umask to file-mode test as well
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>
|
|
87428c55
|
2015-11-20T20:48:51
|
|
Fix some warnings
|
|
de999f26
|
2015-11-13T15:36:45
|
|
checkout::crlf test: don't crash when no idx entry
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.
|
|
0226f7dd
|
2015-08-29T13:59:20
|
|
diff/index: respect USE_NSEC for racily clean file detection
|
|
ac2fba0e
|
2015-09-16T15:07:27
|
|
git_futils_mkdir_*: make a relative-to-base mkdir
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.
|
|
eea7c850
|
2015-09-16T05:44:27
|
|
checkout: overwrite files with differing modes
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.
|
|
6fe32284
|
2015-09-16T10:17:54
|
|
checkout::tree tests: don't use hardcoded mode
|
|
b4d183a7
|
2015-09-16T04:12:47
|
|
checkout::tree tests: don't use static buffer
|
|
33cad995
|
2015-06-01T14:31:49
|
|
Check that checkout preserves filemode in working directory.
|
|
6124d983
|
2015-06-01T11:16:36
|
|
Check that an executable in index is not an executable after checkout.
|
|
504b0697
|
2015-06-30T14:25:00
|
|
checkout test: mark unused vars
|
|
64c415c2
|
2015-06-29T22:12:20
|
|
checkout test: check getcwd return value
|
|
afd8a94e
|
2015-06-26T18:49:39
|
|
checkout: plug a few leaks
|
|
1e46d545
|
2015-06-09T03:50:00
|
|
crlf tests: ensure that Unix obeys autocrlf=true
All platforms do terrible, horrible, no good, very bad translation
when core.autocrlf=true. It's not just Windows!
|
|
3d92b9ab
|
2015-06-08T09:08:01
|
|
crlf tests: use known-good data produced by git
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.
|
|
bd5e59ee
|
2015-06-08T09:04:39
|
|
crlf: include utf8 resources in master branch
Include the UTF8 and UTF8 BOM tests in the master crlf test
branch for completeness.
|
|
863dd89a
|
2015-06-18T12:45:40
|
|
tests: tick over five seconds instead of one
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.
|
|
85a5e8eb
|
2015-06-17T09:00:23
|
|
Fixed Xcode 6.1 build warnings
|
|
121c3171
|
2015-06-16T15:18:04
|
|
Introduce p_utimes and p_futimes
Provide functionality to set the time on a filesystem entry,
using utimes or futimes on POSIX type systems or SetFileTime
on Win32.
|
|
e44abe16
|
2015-06-16T08:51:45
|
|
tests: tick the index when we count OID calculations
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.
|
|
c4e6ab5f
|
2015-06-15T14:32:08
|
|
crlf: tick the index forward to work around racy-git behaviour
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.
|
|
26d5c0b8
|
2015-06-12T09:28:47
|
|
Fix leaks in tests/checkout/icase
|
|
885b94aa
|
2015-05-28T15:26:13
|
|
Rename GIT_EMERGECONFLICT to GIT_ECONFLICT
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.
|
|
2f1080ea
|
2015-05-19T11:17:07
|
|
conflict tests: use GIT_IDXENTRY_STAGE_SET
|
|
1ecbcd8e
|
2015-05-26T19:16:27
|
|
Fix ident replacement to match Git behavior
Git inserts a space after the SHA1 (as of 2.1.4 at least), so do the
same.
|
|
8f0104ec
|
2015-04-21T22:10:36
|
|
Remove the callbacks struct from the remote
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.
|
|
cd79d99a
|
2015-04-23T15:58:53
|
|
checkout test: better case-insensitive test on Mac
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.
|
|
64842d87
|
2015-04-23T09:21:33
|
|
checkout test: only run icase on icase platform
|
|
05f69012
|
2015-03-31T16:28:13
|
|
checkout: remove blocking dir when FORCEd
|
|
3520c970
|
2015-03-27T15:39:28
|
|
Revert "Always checkout with case sensitive iterator"
This reverts commit 40d791545abfb3cb71553a27dc64129e1a9bec28.
|
|
6dfd8506
|
2015-04-01T15:23:37
|
|
checkout test: ensure we write to casechanged dir
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').
|
|
431f9807
|
2015-03-27T15:33:44
|
|
checkout test: ignore unstaged case-changing renames
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.
|
|
27fa7477
|
2015-04-23T10:54:08
|
|
Merge pull request #3032 from jfultz/index-file-modes
Fix git_checkout_tree() to do index filemodes correctly on Windows.
|
|
63af449e
|
2015-04-10T11:33:14
|
|
Merge pull request #3030 from linquize/symlink_supported
If work_dir is not specified, use repo_dir to test if symlink is supported
|
|
67db2bde
|
2015-03-10T12:02:45
|
|
Fix git_checkout_tree() to do index filemodes correctly on Windows.
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.
|
|
7c2a2172
|
2015-04-04T00:29:01
|
|
Test: Create repo in while current dir is readonly and checkout symlink
|
|
7c2b9e06
|
2015-03-22T19:06:53
|
|
Illustrate bad checkout on Windows
|
|
118e6fdc
|
2015-03-16T23:08:16
|
|
Lower case the include directive of windows header
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```).
|
|
76f03418
|
2015-03-03T17:04:38
|
|
Remove swp files
|
|
4e498646
|
2015-01-15T16:50:31
|
|
repository: remove log message override for switching the active branch
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.
|
|
6bfb990d
|
2015-01-07T14:47:02
|
|
branch: don't accept a reflog message override
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.
|
|
23a17803
|
2015-01-07T14:16:50
|
|
reset: remove reflog message override
This function is meant to simulate what git does in the reset command,
so we should include the reflog message in that.
|
|
659cf202
|
2015-01-07T12:23:05
|
|
Remove the signature from ref-modifying functions
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.
|
|
496b76d4
|
2015-02-27T11:02:37
|
|
checkout tests: just use SAFE where appropriate
|
|
96b82b11
|
2015-02-14T11:44:05
|
|
checkout: remove `GIT_CHECKOUT_SAFE_CREATE` as a strategy
|
|
e6da3e44
|
2015-02-14T10:33:06
|
|
checkout: upgrade to `SAFE_CREATE` when no index file
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`.
|
|
8639ea5f
|
2015-01-17T22:47:03
|
|
checkout: introduce GIT_CHECKOUT_DONT_WRITE_INDEX
|
|
d24a5312
|
2015-02-12T02:34:58
|
|
Merge pull request #2866 from ethomson/checkout_perf2
Checkout performance
|
|
fa89ff20
|
2015-02-03T05:35:24
|
|
remove some unused warnings
|
|
07c989e9
|
2015-02-03T20:01:24
|
|
win32: further cleanups for 8.3 disabling
|
|
5f28ec84
|
2015-02-03T12:16:11
|
|
win32: cleanup 8.3 disabled tests
|
|
2fbce0bf
|
2015-02-02T22:18:38
|
|
checkout test: ensure .gitattributes lifecycle
The .gitattributes cache should not reload .gitattributes in the
middle of checking out, only between checkout operations. Otherwise,
we'll spend all our time stat'ing and read'ing the gitattributes.
|
|
9dcc4a36
|
2015-01-28T23:04:50
|
|
Fix test failures when 8.3 is disabled
|
|
e0902fbc
|
2015-01-15T17:17:01
|
|
checkout tests: cleanup realpath impl on Win32
|
|
53eb139d
|
2015-01-14T20:16:01
|
|
checkout tests: emulate p_realpath poorly on Win32
|
|
e74340b0
|
2015-01-14T18:47:00
|
|
checkout: remove files before writing new ones
On case insensitive filesystems, we may have files in the working
directory that case fold to a name we want to write. Remove those
files (by default) so that we will not end up with a filename that
has the unexpected case.
|
|
232bc895
|
2015-01-14T13:15:34
|
|
checkout tests: nasty symlinks
Symbolic links that abuse case insensitivity to write into .git.
|
|
1d50b364
|
2015-01-12T16:16:27
|
|
checkout: introduce git_checkout_perfdata
Checkout can now provide performance data about the number of (some)
syscalls performed using an optional callback.
|
|
b4c6a9da
|
2014-10-26T05:45:23
|
|
Add files and tests with many UTF-8 chars and few UTF-8 chars
|
|
c4a2fd5c
|
2015-01-04T17:39:43
|
|
Plug a couple of leaks
|
|
40d79154
|
2014-05-09T19:32:52
|
|
Always checkout with case sensitive iterator
On a case-insensitive filesystem, we need to deal with case-changing
renames (eg, foo -> FOO) by removing the old and adding the new,
exactly as if we were on a case-sensitive filesystem.
Update the `checkout::tree::can_cancel_checkout_from_notify` test, now
that notifications are always sent case sensitively.
|
|
61ee5b0e
|
2014-05-08T17:35:03
|
|
Introduce test for checkout case-changing rename
|
|
ec74b40c
|
2014-12-16T18:53:55
|
|
Introduce core.protectHFS and core.protectNTFS
Validate HFS ignored char ".git" paths when `core.protectHFS` is
specified. Validate NTFS invalid ".git" paths when `core.protectNTFS`
is specified.
|
|
11d67b75
|
2014-12-10T19:12:16
|
|
checkout: disallow bad paths on HFS
HFS filesystems ignore some characters like U+200C. When these
characters are included in a path, they will be ignored for the
purposes of comparison with other paths. Thus, if you have a ".git"
folder, a folder of ".git<U+200C>" will also match. Protect our
".git" folder by ensuring that ".git<U+200C>" and friends do not match it.
|
|
a64119e3
|
2014-11-25T18:13:00
|
|
checkout: disallow bad paths on win32
Disallow:
1. paths with trailing dot
2. paths with trailing space
3. paths with trailing colon
4. paths that are 8.3 short names of .git folders ("GIT~1")
5. paths that are reserved path names (COM1, LPT1, etc).
6. paths with reserved DOS characters (colons, asterisks, etc)
These paths would (without \\?\ syntax) be elided to other paths - for
example, ".git." would be written as ".git". As a result, writing these
paths literally (using \\?\ syntax) makes them hard to operate with from
the shell, Windows Explorer or other tools. Disallow these.
|
|
f7fcb18f
|
2014-11-23T14:12:54
|
|
Plug leaks
Valgrind is now clean except for libssl and libgcrypt.
|
|
2d24816b
|
2014-11-06T18:49:37
|
|
checkout_index: Remove stage 0 when checking out conflicts
|
|
9f664347
|
2014-11-06T14:40:21
|
|
checkout_index: remove conflicts when checking out new files
|
|
8d3b2ee3
|
2014-10-11T20:56:50
|
|
Introduce failing test for conflict filtering in index
|
|
0625638f
|
2014-10-10T17:40:53
|
|
Merge pull request #2499 from csware/hard-reset-checkout-callbacks
Allow to propagate checkout callbacks to git HARD reset
|
|
14556cbf
|
2014-09-17T17:13:25
|
|
Merge pull request #2567 from cirosantilli/factor-41
Factor 40 and 41 constants from source.
|
|
c5cf8cad
|
2014-09-17T15:19:08
|
|
Replace void casts with GIT_UNUSED.
|
|
3b2cb2c9
|
2014-09-16T11:49:25
|
|
Factor 40 and 41 constants from source.
|
|
b8add6c4
|
2014-08-03T15:44:13
|
|
Allow to propagate checkout callbacks to git HARD reset
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
c1bf2942
|
2014-07-02T15:29:25
|
|
Merge pull request #2455 from ethomson/equal_oid
Introduce `cl_assert_equal_oid`
|
|
0cee70eb
|
2014-07-01T14:09:01
|
|
Introduce cl_assert_equal_oid
|
|
f4046267
|
2014-06-26T09:16:12
|
|
checkout::conflict tests: only test owner mode
The checkout::conflict type conflict tests were failing because
they were overly assertive about the resultant mode, testing
group & other bits, which failed miserably for people who had a
umask less restrictive than 022. Only test the resultant owner bits.
|
|
d412165f
|
2014-06-18T16:54:32
|
|
Update text=auto / core.autocrlf=false behavior
Git for Windows 1.9.4 changed the behavior when the text=auto
attribute is specified and core.autocrlf=false. Previous observed
behavior would *not* filter files when going into the working
directory, the new behavior *does* filter. Update our behavior to match.
|
|
5a76ad35
|
2014-06-19T11:45:46
|
|
crlf: pass-through mixed EOL buffers from LF->CRLF
When checking out files, we're performing conversion into the user's
native line endings, but we only want to do it for files which have
consistent line endings. Refuse to perform the conversion for mixed-EOL
files.
The CRLF->LF filter is left as-is, as that conversion is considered to be
normalization by git and should force a conversion of the line endings.
|
|
6affd71f
|
2014-01-03T17:38:34
|
|
git_checkout_opts -> git_checkout_options
|
|
f77127da
|
2014-02-09T12:37:16
|
|
Tests for core.autocrlf and .gitattributes
|
|
a2ce19ca
|
2014-02-05T13:35:26
|
|
Prevent user's merge.conflictstyle from breaking tests
|
|
586be3b8
|
2014-02-03T15:05:55
|
|
Add reflog parameters to git_reset
|
|
b31ebfbc
|
2014-01-27T14:12:29
|
|
Add reflog params to git_branch_create
|
|
94f263f5
|
2014-01-25T08:04:49
|
|
Add reflog params to set-head calls
|
|
9950bb4e
|
2014-01-24T20:23:17
|
|
diff: rename the file's 'oid' to 'id'
In the same vein as the previous commits in this series.
|
|
d541170c
|
2014-01-24T11:36:41
|
|
index: rename an entry's id to 'id'
This was not converted when we converted the rest, so do it now.
|
|
e8b81c69
|
2014-01-22T13:24:32
|
|
Preserve tree filemode in index during checkout
Don't try to determine whether the system supports file modes
when putting the tree data in the index during checkout. The tree's
mode is canonical and did not come from stat(2) in the first place.
|
|
0b28217b
|
2014-01-15T12:51:31
|
|
refs: remove the _with_log differentiation
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
|
|
bf4a577c
|
2013-12-13T10:10:32
|
|
Overwrite ignored directories on checkout
|
|
81a2012d
|
2013-12-12T11:30:50
|
|
Overwrite ignored files on checkout
|
|
8046b26c
|
2013-12-10T16:16:36
|
|
Try a test that won't assert on Linux
|
|
cbd04896
|
2013-12-10T14:38:35
|
|
Fix checkout notify callback docs and tests
The checkout notify callback behavior on non-zero return values
was not being tested. This adds tests, fixes a bug with positive
values, and clarifies the documentation to make it clear that the
checkout can be canceled via this mechanism.
|
|
17820381
|
2013-11-14T14:05:52
|
|
Rename tests-clar to tests
|