|
8683d31f
|
2015-10-22T14:39:20
|
|
merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICT
Provide a new merge option, GIT_MERGE_TREE_FAIL_ON_CONFLICT, which
will stop on the first conflict and fail the merge operation with
GIT_EMERGECONFLICT.
|
|
dc2cf3eb
|
2015-10-22T18:35:43
|
|
Merge pull request #3480 from ethomson/nsecs
Nanoseconds in the index: ignore for diffing
|
|
99a09f7f
|
2015-10-22T09:29:40
|
|
index: test that we round-trip nsecs
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.
|
|
44b1e3e3
|
2015-10-21T13:43:22
|
|
Merge pull request #3475 from libgit2/cmn/programdata-config
config: add a ProgramData level
|
|
8c7c5fa5
|
2015-10-20T17:42:42
|
|
config: add a ProgramData level
This is where portable git stores the global configuration which we can
use to adhere to it even though git isn't quite installed on the system.
|
|
bbe1957b
|
2015-10-21T12:09:29
|
|
tests: Fix warnings
|
|
307c4a2b
|
2015-10-21T11:58:44
|
|
signature: Strip crud just like Git does
|
|
4280fabb
|
2015-10-15T07:10:48
|
|
Merge pull request #3466 from libgit2/cmn/quick-parse-64
revwalk: make commit list use 64 bits for time
|
|
8321596a
|
2015-10-15T12:22:10
|
|
Merge pull request #3444 from ethomson/add_preserves_conflict_mode
Preserve modes from a conflict in `git_index_insert`
|
|
a0a1b19a
|
2015-10-14T19:31:54
|
|
odb: Prioritize alternate backends
For most real use cases, repositories with alternates use them as main
object storage. Checking the alternate for objects before the main
repository should result in measurable speedups.
Because of this, we're changing the sorting algorithm to prioritize
alternates *in cases where two backends have the same priority*. This
means that the pack backend for the alternate will be checked before the
pack backend for the main repository *but* both of them will be checked
before any loose backends.
|
|
5ffdea6f
|
2015-10-14T16:49:01
|
|
revwalk: make commit list use 64 bits for time
We moved the "main" parsing to use 64 bits for the timestamp, but the
quick parsing for the revwalk did not. This means that for large
timestamps we fail to parse the time and thus the walk.
Move this parser to use 64 bits as well.
|
|
6c014bcc
|
2015-09-29T12:18:17
|
|
diff: don't feed large files to xdiff
|
|
e4352066
|
2015-09-28T18:25:24
|
|
merge_file: treat large files as binary
xdiff craps the bed on large files. Treat very large files as binary,
so that it doesn't even have to try.
Refactor our merge binary handling to better match git.git, which
looks for a NUL in the first 8000 bytes.
|
|
d3b29fb9
|
2015-10-01T00:50:37
|
|
refdb and odb backends must provide `free` function
As refdb and odb backends can be allocated by client code, libgit2
can’t know whether an alternative memory allocator was used, and thus
should not try to call `git__free` on those objects.
Instead, odb and refdb backend implementations must always provide
their own `free` functions to ensure memory gets freed correctly.
|
|
21515f22
|
2015-09-29T15:49:16
|
|
index: also try conflict mode when inserting
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.
|
|
72b7c570
|
2015-09-30T09:17:18
|
|
Merge pull request #3411 from spraints/custom-push-headers
Include custom HTTP headers
|
|
10df661b
|
2015-09-29T14:16:51
|
|
index: test that add_bypath preserves mode
|
|
ea467e74
|
2015-09-28T16:46:09
|
|
win32::longpath: don't print path
|
|
fc3ef147
|
2015-09-28T06:41:00
|
|
Merge pull request #3441 from libgit2/cmn/badssl
net: add tests against badssl.com
|
|
5c5df666
|
2015-09-27T23:32:20
|
|
Plug some leaks
|
|
53a28705
|
2015-09-27T22:48:39
|
|
net: add tests against badssl.com
These provide bad X.509 certificates, which we should refuse to connect
to by default.
|
|
e4b2b919
|
2015-09-25T10:37:41
|
|
Fix binary diffs
git expects an empty line after the binary data:
literal X
...binary data...
<empty_line>
The last literal block of the generated patches were not containing the required empty line. Example:
diff --git a/binary_file b/binary_file
index 3f1b3f9098131cfecea4a50ff8afab349ea66d22..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644
GIT binary patch
literal 8
Pc${NM&PdElPvrst3ey5{
literal 6
Nc${NM%g@i}0ssZ|0lokL
diff --git a/binary_file2 b/binary_file2
index 31be99be19470da4af5b28b21e27896a2f2f9ee2..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644
GIT binary patch
literal 8
Pc${NM&PdElPvrst3ey5{
literal 13
Sc${NMEKbZyOexL+Qd|HZV+4u-
git apply of that diff results in:
error: corrupt binary patch at line 9: diff --git a/binary_file2 b/binary_file2
fatal: patch with only garbage at line 10
The proper formating is:
diff --git a/binary_file b/binary_file
index 3f1b3f9098131cfecea4a50ff8afab349ea66d22..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644
GIT binary patch
literal 8
Pc${NM&PdElPvrst3ey5{
literal 6
Nc${NM%g@i}0ssZ|0lokL
diff --git a/binary_file2 b/binary_file2
index 31be99be19470da4af5b28b21e27896a2f2f9ee2..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644
GIT binary patch
literal 8
Pc${NM&PdElPvrst3ey5{
literal 13
Sc${NMEKbZyOexL+Qd|HZV+4u-
|
|
9768ebb1
|
2015-09-22T23:24:30
|
|
win32: test checkout msg on long path err
|
|
aebddbe7
|
2015-09-21T06:01:03
|
|
Merge pull request #3434 from ethomson/reservednames
Win32 Reserved names: don't reserve names outside the working directory
|
|
e8ddd8d7
|
2015-09-17T17:49:32
|
|
repo::reservedname: test a submodule update
Test an initial submodule update, where we are trying to checkout
the submodule for the first time, and placing a file within the
submodule working directory with the same name as the submodule
(and consequently, the same name as the repository itself).
|
|
08313c4b
|
2015-09-18T11:30:50
|
|
config: test that comments are left as with git
|
|
dfe2856d
|
2015-09-18T12:06:55
|
|
Fix a couple of warnings
|
|
e24c60db
|
2015-09-17T09:42:05
|
|
mkdir: find component paths for mkdir_relative
`git_futils_mkdir` does not blindly call `git_futils_mkdir_relative`.
`git_futils_mkdir_relative` is used when you have some base directory
and want to create some path inside of it, potentially removing blocking
symlinks and files in the process. This is not suitable for a general
recursive mkdir within the filesystem.
Instead, when `mkdir` is being recursive, locate the first existent
parent directory and use that as the base for `mkdir_relative`.
|
|
0862ec2e
|
2015-09-17T09:58:38
|
|
core::mkdir tests: ensure we don't stomp symlinks in mkdir
In `mkdir` and `mkdir_r`, ensure that we don't try to remove symlinks
that are in our way.
|
|
08df6630
|
2015-09-16T18:07:56
|
|
core::mkdir tests: include absolute mkdirs
|
|
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.
|
|
8452fecc
|
2015-09-14T14:05:01
|
|
cl_git_path_url: assert sane static buffer size
|
|
4cc355c9
|
2015-09-14T13:58:38
|
|
clone::nonetwork: don't use fixed size buffer
|
|
b0885675
|
2015-09-13T23:21:14
|
|
Merge pull request #3425 from ethomson/diriter_root
Handle `git_path_diriter` instances at the drive root on Windows
|
|
2cde210d
|
2015-09-13T13:52:19
|
|
diriter: test we can iterate root
Ensure that we can iterate the filesystem root and that paths come
back well-formed, not with an additional '/'. (eg, when iterating
`c:/`, expect that we do not get some path like `c://autoexec.bat`).
|
|
f2b25261
|
2015-09-13T19:43:55
|
|
Merge pull request #3423 from libgit2/cmn/push-tests-inline-oid
push: put the git_oid inline in the test structure
|
|
548cb334
|
2015-09-13T16:32:24
|
|
Don't free config in `git_transaction_commit`.
The config is not owned by the transaction, so please don’t free it.
|
|
1e80bf27
|
2015-09-13T06:21:18
|
|
Merge branch 'cmn/ignore-dir-check'
|
|
657afd35
|
2015-09-13T06:18:49
|
|
ignore: add test and adjust style and comment for dir with wildmatch
The previous commit left the comment referencing the earlier state of
the code, change it to explain the current logic. While here, change the
logic to avoid repeating the copy of the base pattern.
|
|
305407e1
|
2015-09-13T06:03:12
|
|
Merge pull request #3370 from libgit2/cmn/submodule-refactor
submodule: refactor to be more explicit in the search
|
|
1af5aecb
|
2015-09-13T05:38:29
|
|
push: put the git_oid inline in the test structure
These are small pieces of data, so there is no advantage to allocating
them separately. Include the two ids inline in the struct we use to
check that the expected and actual ids match.
|
|
92f7d32b
|
2015-09-12T13:46:22
|
|
diff::workdir: ensure ignored files are not returned
Ensure that a diff with the workdir is not erroneously returning
directories.
|
|
a3b9731f
|
2015-09-10T21:23:03
|
|
submodule: add a test for a renamed submdoule dir
|
|
3245896b
|
2015-09-10T13:18:26
|
|
Add a test for custom header validation
Also, *some* custom headers actually are valid.
|
|
8e736a73
|
2015-09-08T15:48:44
|
|
futils: ensure we can write a hidden file
|
|
ea3f2c29
|
2015-09-08T14:35:53
|
|
filebuf: ensure we can lock a hidden file
|
|
4f2b6093
|
2015-09-08T13:53:41
|
|
Tell the git_transport about the custom_headers
|
|
6d6020de
|
2015-09-08T18:34:51
|
|
Merge pull request #3353 from ethomson/wrongcase_add
index: canonicalize directory case when adding
|
|
2964cbea
|
2015-09-08T11:50:08
|
|
Merge pull request #3381 from leoyanggit/index_directory_iterator
New feature: add the ablility to iterate through a directory in index
|
|
a32bc85e
|
2015-08-07T12:43:49
|
|
git_index_add: allow case changing renames
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.
|
|
280adb3f
|
2015-08-04T16:51:00
|
|
index: canonicalize directory case when adding
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`.
|
|
e1d27bca
|
2015-09-06T10:51:29
|
|
Merge pull request #3413 from libgit2/cmn/follow-symlink
filebuf: follow symlinks when creating a lock file
|
|
9fd4c9c8
|
2015-09-06T10:50:22
|
|
Merge pull request #3366 from libgit2/cmn/index-hashmap
Use a hashmap for path-based lookups in the index
|
|
d83b2e9f
|
2015-09-05T03:54:06
|
|
filebuf: follow symlinks when creating a lock file
We create a lockfile to update files under GIT_DIR. Sometimes these
files are actually located elsewhere and a symlink takes their place. In
that case we should lock and update the file at its final location
rather than overwrite the symlink.
|
|
c097f717
|
2015-08-17T15:02:02
|
|
New API: git_index_find_prefix
Find the first index entry matching a prefix.
|
|
21e7015c
|
2015-09-01T02:26:11
|
|
Merge pull request #3402 from ethomson/faster_diff
Provide path matching in the iterators (for faster diffs)
|
|
03210cfa
|
2015-08-31T12:12:21
|
|
iterator test: handle case (in)sensitivity
|
|
4d19bced
|
2015-08-30T19:33:18
|
|
iterator test: use new iter opts in fifo test
|
|
d53c8880
|
2015-08-30T19:25:47
|
|
iterator: saner pathlist matching for idx iterator
Some nicer refactoring for index iteration walks.
The index iterator doesn't binary search through the pathlist space,
since it lacks directory entries, and would have to binary search
each index entry and all its parents (eg, when presented with an index
entry of `foo/bar/file.c`, you would have to look in the pathlist for
`foo/bar/file.c`, `foo/bar` and `foo`). Since the index entries and the
pathlist are both nicely sorted, we walk the index entries in lockstep
with the pathlist like we do for other iteration/diff/merge walks.
|
|
71ef639e
|
2015-08-30T18:57:06
|
|
status test: brackets are now literal
|
|
1af84271
|
2015-08-30T18:35:57
|
|
tree_iterator: use a pathlist
|
|
4a0dbeb0
|
2015-08-30T17:06:26
|
|
diff: use new iterator pathlist handling
When using literal pathspecs in diff with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`
turn on the faster iterator pathlist handling.
Updates iterator pathspecs to include directory prefixes (eg, `foo/`)
for compatibility with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`.
|
|
3273ab3f
|
2015-08-28T20:06:18
|
|
diff: better document GIT_DIFF_PATHSPEC_DISABLE
Document that `GIT_DIFF_PATHSPEC_DISABLE` is not necessarily about
explicit path matching, but also includes matching of directory
names. Enforce this in a test.
|
|
aa06ecaf
|
2015-08-28T19:30:08
|
|
Merge pull request #3352 from ethomson/hidden
win32: ensure hidden files can be staged
|
|
6c9352bf
|
2015-08-28T18:30:39
|
|
iterator: sort subdirs properly with pathlist
When given a pathlist, don't assume that directories sort before
files. Walk through any list of entries sorting before us to make
sure that we've exhausted all entries that *aren't* directories.
Eg, if we're searching for 'foo/bar', and we have a 'foo.c', keep
advancing the pathlist to keep looking for an entry prefixed with
'foo/'.
|
|
ef206124
|
2015-07-28T19:55:37
|
|
Move filelist into the iterator handling itself.
|
|
ed1c6446
|
2015-07-28T11:41:27
|
|
iterator: use an options struct instead of args
|
|
e451cd5c
|
2015-08-15T18:46:38
|
|
diff: don't error out on an invalid regex
When parsing user-provided regex patterns for functions, we must not
fail to provide a diff just because a pattern is not well
formed. Ignore it instead.
|
|
c232d6c3
|
2015-08-14T21:06:51
|
|
index: add tests around case switching
We were missing tests for switching the case-sensitivity of an index
in-memory and then looking up entries in it.
|
|
9f1af7f2
|
2015-08-13T10:22:50
|
|
Merge pull request #3168 from libgit2/cmn/config-tx
Locking and transactional/atomic updates for config
|
|
5340d63d
|
2015-07-12T12:50:23
|
|
config: perform unlocking via git_transaction
This makes the API for commiting or discarding changes the same as for
references.
|
|
36f784b5
|
2015-06-01T20:02:23
|
|
config: expose locking via the main API
This lock/unlock pair allows for the cller to lock a configuration file
to avoid concurrent operations.
It also allows for a transactional approach to updating a configuration
file. If multiple updates must be made atomically, they can be done
while the config is locked.
|
|
b1667039
|
2015-06-01T19:17:03
|
|
config: implement basic transactional support
When a configuration file is locked, any updates made to it will be done
to the in-memory copy of the file. This allows for multiple updates to
happen while we hold the lock, preventing races during complex
config-file manipulation.
|
|
a8792767
|
2015-08-11T20:44:19
|
|
remote: add failing test for a mirror refspec
While we download the remote's remote-tracking branches, we don't
download the tag. This points to the tag auto-follow rules interfering
with the refspec.
|
|
ef4857c2
|
2015-08-03T16:50:27
|
|
errors: tighten up git_error_state OOMs a bit more
When an error state is an OOM, make sure that we treat is specially
and do not try to free it.
|
|
bdec3363
|
2015-08-03T17:48:33
|
|
win32: ensure hidden files can be staged
|
|
988ea594
|
2015-07-27T10:13:49
|
|
Test: check restored oom error points to static buffer
|
|
5ef4b860
|
2015-07-23T13:16:19
|
|
Add failing test for capture/restore oom error
|
|
69adb781
|
2015-08-03T08:33:53
|
|
Merge pull request #3325 from libgit2/cmn/filebuf-rename-error
filebuf: remove lockfile upon rename errors
|
|
b426ac90
|
2015-08-01T19:52:25
|
|
index: test that an unregistered submodule gets staged
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.
|
|
63e5b551
|
2015-07-29T00:08:37
|
|
index: add test for adding an old-style submodule to index
|
|
9d4b7d25
|
2015-07-29T16:46:47
|
|
Merge pull request #3328 from libgit2/cmn/iterator-skip-diriter
iterator: skip over errors in diriter init
|
|
0e391d85
|
2015-07-27T13:31:06
|
|
iterator: adjust unreadable-dir test to new behaviour
We don't want the iterator to make us stop whenever we hit an unreadable
dir. We should instead move over to the next item.
|
|
19d9beb7
|
2015-07-24T19:22:41
|
|
filebuf: remove lockfile upon rename errors
When we have an error renaming the lockfile, we need to make sure
that we remove it upon cleanup. For this, we need to keep track of
whether we opened the file and whether the rename succeeded.
If we did create the lockfile but the rename did not succeed, we
remove the lockfile. This won't protect against all errors, but
the most common ones (target file is open) does get handled.
|
|
668053be
|
2015-07-24T18:44:29
|
|
filebuf: failing test for leaving the lockfile when failing to rename
When we fail to rename, we currently leave the lockfile laying
around. This shows that behaviour.
|
|
2dfd5eae
|
2015-07-24T15:05:16
|
|
Merge pull request #3307 from libgit2/cmn/submodule-backslash
Normalize submodule urls before looking at them
|
|
759b2230
|
2015-07-24T15:04:20
|
|
Merge pull request #3303 from libgit2/cmn/index-add-submodule
Allow adding a submodule through git_index_add_bypath
|
|
91dad181
|
2015-07-24T15:01:04
|
|
Merge pull request #3305 from libgit2/cmn/reflog-del-backend
refdb: delete a ref's reflog upon deletion
|
|
ceb58739
|
2015-07-13T18:50:39
|
|
Merge pull request #3302 from libgit2/cmn/submodule-foreach-diff-path
List a submodule only once when the path matches a submodule in the index
|
|
aa51fa1e
|
2015-07-13T08:39:35
|
|
submodule: add failing test for backslash in url
|
|
f861abad
|
2015-07-12T19:56:19
|
|
Merge branch 'portable-zu'
|
|
768f8be3
|
2015-06-30T19:00:41
|
|
Fix #3094 - improve use of portable size_t/ssize_t format specifiers.
The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
|
|
01d0c02d
|
2015-07-12T19:08:06
|
|
refdb: delete a ref's reflog upon deletion
Removing a reflog upon ref deletion is something which only some
backends might wish to do. Backends which are database-backed may wish
to archive a reflog, log-based ones may not need to do anything.
|
|
247d27c2
|
2015-07-11T19:41:03
|
|
index: allow add_bypath to update submodules
Similarly to how git itself does it, allow the index update operation to
stage a change in a submodule's HEAD.
|
|
0d98af09
|
2015-07-11T19:03:38
|
|
blob: fail to create a blob from a dir with EDIRECTORY
This also affects `git_index_add_bypath()` by providing a better error
message and a specific error code when a directory is passed.
|