|
1e5e02b4
|
2015-10-27T17:26:04
|
|
pool: Simplify implementation
|
|
efc659b0
|
2015-10-28T09:55:20
|
|
Merge pull request #3489 from libgit2/vmg/reuc-insert
Better REUC generation when merging
|
|
a1f5d691
|
2015-10-27T22:42:15
|
|
merge: Implement `GIT_MERGE_TREE_SKIP_REUC`
|
|
7a02e93e
|
2015-10-27T22:42:40
|
|
merge: Plug memory leak
|
|
d307a013
|
2015-10-27T22:17:32
|
|
reuc: Be smarter when inserting new REUC entries
Inserting new REUC entries can quickly become pathological given that
each insert unsorts the REUC vector, and both subsequent lookups *and*
insertions will require sorting it again before being successful.
To avoid this, we're switching to `git_vector_insert_sorted`: this keeps
the REUC vector constantly sorted and lets us use the `on_dup` callback
to skip an extra binary search on each insertion.
|
|
2382d1bc
|
2015-10-26T21:13:54
|
|
Merge pull request #3485 from srajko/giterr_clear-typo-fix
Fix docs typo geterr_clear -> giterr_clear
|
|
2b96b6ef
|
2015-10-14T09:41:27
|
|
Fix docs typo geterr_clear -> giterr_clear
|
|
821131fd
|
2015-10-23T10:13:14
|
|
Merge pull request #3477 from linquize/inttypes.h
inttypes.h is built-in header file since MSVC 2013
|
|
979a5c12
|
2015-10-23T15:16:21
|
|
Merge pull request #3483 from ethomson/cmake_xcode
cmake: split sources into original paths for Xcode and MSVC
|
|
e324005e
|
2015-10-23T15:13:38
|
|
Merge pull request #3481 from ethomson/xdiff_include
xdiff: reference util.h in parent directory
|
|
7c0c21c3
|
2015-10-23T13:37:02
|
|
Merge pull request #3482 from ethomson/merge_fail_on_conflict
merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICT
|
|
7208ff4d
|
2015-10-22T20:17:19
|
|
cmake: split sources into original paths for Xcode and MSVC
The MSVC_SPLIT_SOURCES function is helpful for other IDEs, like Xcode,
and will split the source files up into their target directories,
instead of merely placing them all in a "Sources" directory.
Rename MSVC_SPLIT_SOURCES to IDE_SPLIT_SOURCES and enable it for Xcode.
|
|
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
|
|
c7b336b0
|
2015-10-22T10:29:51
|
|
xdiff: reference util.h in parent directory
Although CMake will correctly configure include directories for us,
some people may use their own build system, and we should reference
`util.h` based on where it actually lives.
|
|
7499eae9
|
2015-10-22T09:30:41
|
|
diff: ignore nsecs when diffing
Although our index contains the literal time present in the index,
we do not read nanoseconds from disk, and thus we should not use
them in any comparisons, lest we always think our working directory
is dirty.
Guard this behind a `GIT_USE_NSECS` for future improvement.
|
|
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.
|
|
240a85cf
|
2015-10-22T07:56:34
|
|
inttypes.h is built-in header file since MSVC 2013
The reason is that the types defined in libgit2's inttypes.h collide with system inttypes.h
3rd party library header files may directly reference MSVC's built-in inttypes.h
Fixes #3476
|
|
44b1e3e3
|
2015-10-21T13:43:22
|
|
Merge pull request #3475 from libgit2/cmn/programdata-config
config: add a ProgramData level
|
|
f555f7cd
|
2015-10-21T20:36:38
|
|
Merge pull request #3479 from ethomson/cplusplus
api: be explicit about our C linkage
|
|
0f9b6742
|
2015-10-21T09:24:10
|
|
win32: add c linkage guard around inttypes.h inclusion
|
|
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.
|
|
855f048a
|
2015-10-21T14:41:13
|
|
Merge pull request #3478 from libgit2/vmg/crud
signature: Strip crud
|
|
bbe1957b
|
2015-10-21T12:09:29
|
|
tests: Fix warnings
|
|
128e94bb
|
2015-10-21T12:04:53
|
|
index: Remove unneeded consts
|
|
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`
|
|
d5f7aad8
|
2015-10-15T11:09:12
|
|
Merge pull request #3468 from libgit2/vmg/odb-lookups
Fix pathological performance in ODB lookups
|
|
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.
|
|
43820f20
|
2015-10-14T19:24:07
|
|
odb: Be smarter when refreshing backends
In the current implementation of ODB backends, each backend is tasked
with refreshing itself after a failed lookup. This is standard Git
behavior: we want to e.g. reload the packfiles on disk in case they have
changed and that's the reason we can't find the object we're looking
for.
This behavior, however, becomes pathological in repositories where
multiple alternates have been loaded. Given that each alternate counts
as a separate backend, a miss in the main repository (which can
potentially be very frequent in cases where object storage comes from
the alternate) will result in refreshing all its packfiles before we
move on to the alternate backend where the object will most likely be
found.
To fix this, the code in `odb.c` has been refactored as to perform the
refresh of all the backends externally, once we've verified that the
object is nowhere to be found.
If the refresh is successful, we then perform the lookup sequentially
through all the backends, skipping the ones that we know for sure
weren't refreshed (because they have no refresh API).
The on-disk pack backend has been adjusted accordingly: it no longer
performs refreshes internally.
|
|
ac7e50dd
|
2015-10-14T08:30:51
|
|
Merge pull request #3453 from libgit2/cmn/warn-python
CMake: be more explicit with python errors
|
|
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.
|
|
d8dc2b8f
|
2015-10-07T15:43:36
|
|
Merge pull request #3455 from Eun/master
Examples: network/fetch.c transfer_progress_cb - should return a value
|
|
8b8f1f91
|
2015-10-07T14:01:05
|
|
fix return
|
|
e3f94c71
|
2015-10-06T13:35:45
|
|
CMake: be more explicit with python errors
There's been a few reports of users not understanding what the python
error means, so spell out the options they have.
|
|
ac69a823
|
2015-10-06T00:21:28
|
|
Merge pull request #3451 from ethomson/xdiff
xdiff fixes
|
|
ae195a71
|
2015-09-29T12:46:41
|
|
blame: guard xdiff calls for large files
|
|
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.
|
|
46c0e6e3
|
2015-09-28T16:34:29
|
|
xdiff: convert size variables to size_t
|
|
4bc9b74c
|
2015-09-28T16:24:50
|
|
GITERR_CHECK_ALLOC_ADDn: multi-arg adders
|
|
a99f33e9
|
2015-10-01T07:56:19
|
|
Merge pull request #3447 from arthurschreiber/arthur/fix-odb-refdb-free
refdb and odb backends must provide `free` function
|
|
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.
|
|
ba1a5553
|
2015-09-30T17:44:10
|
|
Merge pull request #3446 from ethomson/portability
portability: use `CHECK_FUNCTION_EXISTS` for checking whether functions exist...
|
|
e8ccdd6b
|
2015-09-30T06:29:01
|
|
Merge pull request #3445 from libgit2/cmn/ssl-null
openssl: don't try to teardown an unconnected SSL context
|
|
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.
|
|
e683d152
|
2015-09-30T05:49:04
|
|
qsort_r/qsort_s: detect their support
|
|
8649dfd8
|
2015-09-29T13:36:37
|
|
p_futimes: support using futimens when available
|
|
146a96de
|
2015-09-30T09:41:25
|
|
openssl: don't try to teardown an unconnected SSL context
SSL_shutdown() does not like it when we pass an unitialized ssl context
to it. This means that when we fail to connect to a host, we hide the
error message saying so with OpenSSL's indecipherable error message.
|
|
72b7c570
|
2015-09-30T09:17:18
|
|
Merge pull request #3411 from spraints/custom-push-headers
Include custom HTTP headers
|
|
c628ebca
|
2015-09-29T21:46:00
|
|
Merge pull request #3443 from libgit2/longpath-printf
win32::longpath: don't print path
|
|
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.
|
|
a8d0b4de
|
2015-09-25T17:55:31
|
|
Merge pull request #3439 from bisho/master
Fix binary diffs
|
|
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-
|
|
d7375662
|
2015-09-25T10:16:16
|
|
Copy custom_headers insteach of referencing the caller's copy
|
|
d16c1b97
|
2015-09-24T10:30:37
|
|
These can be static
|
|
e60db3c7
|
2015-09-24T09:24:10
|
|
Revise custom header error messages
If the header doesn't look like a header (e.g. if it doesn't have a ":"
or if it has newlines), report "custom HTTP header '%s' is malformed".
If the header has the same name as a header already set by libgit2 (e.g.
"Host"), report "HTTP header '%s' is already set by libgit2".
|
|
63cc5723
|
2015-09-24T09:13:05
|
|
Don't null-check
|
|
098f1e6e
|
2015-09-24T09:09:48
|
|
Use an array of forbidden custom headers
|
|
588e28eb
|
2015-09-24T13:20:48
|
|
Merge pull request #3437 from libgit2/cmn/plug-sm
submodule: plug a few leaks
|
|
ab8f2c66
|
2015-09-23T15:09:19
|
|
submodule: plug a few leaks
|
|
27187344
|
2015-09-23T15:16:01
|
|
Merge pull request #3435 from ethomson/nametoolong
win32: give better error message on long paths
|
|
9768ebb1
|
2015-09-22T23:24:30
|
|
win32: test checkout msg on long path err
|
|
92a47824
|
2015-09-22T23:10:56
|
|
win32: propogate filename too long errors
|
|
aebddbe7
|
2015-09-21T06:01:03
|
|
Merge pull request #3434 from ethomson/reservednames
Win32 Reserved names: don't reserve names outside the working directory
|
|
cdef1fad
|
2015-09-18T16:46:57
|
|
Merge pull request #3433 from libgit2/cmn/config-comment
Keep config comments in the same place as git
|
|
538dfc88
|
2015-09-17T18:12:05
|
|
repository: only reserve repo dirs in the workdir
Check that the repository directory is beneath the workdir before
adding it to the list of reserved paths. If it is not, then there
is no possibility of checking out files into it, and it should not
be a reserved word.
This is a particular problem with submodules where the repo directory
may be in the super's .git 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).
|
|
cd677b8f
|
2015-09-18T12:28:05
|
|
config: buffer comments to match git's variable-adding
When there is a comment at the end of a section, git keeps it there,
while we write the new variable right at the end.
Keep comments buffered and dump them when we're going to output a
variable or section, or reach EOF. This puts us in line with the config
files which git produces.
|
|
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
|
|
403e1800
|
2015-09-18T12:03:43
|
|
Merge pull request #3418 from DimStar77/master
pkg-config: fix directory references in libgit2.pc
|
|
5540d9db
|
2015-09-10T16:11:10
|
|
pkg-config: fix directory references in libgit2.pc
Before:
libdir=/usr//usr/lib64
includedir=/usr//usr/include
After:
libdir=/usr/lib64
includedir=/usr/include
(note the duplication of /usr in the before case)
|
|
8d6052df
|
2015-09-17T22:03:26
|
|
Merge pull request #3432 from ethomson/mkdir
`mkdir`: split into `mkdir` and `mkdir_relative`
|
|
9ce2e7b3
|
2015-09-17T12:48:37
|
|
`mkdir`: cope with root path on win32
|
|
e164ddb1
|
2015-09-17T12:23:19
|
|
win32: return EACCES in `p_lstat`
Don't coalesce all errors into ENOENT. At least identify EACCES.
All callers should be handling this case already, as the POSIX
`lstat` will return this.
|
|
81aaf370
|
2015-09-17T11:26:38
|
|
mkdir: chmod existing paths with `GIT_MKDIR_CHMOD`
|
|
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.
|
|
add0378d
|
2015-09-16T17:46:24
|
|
Merge pull request #3429 from ethomson/checkout_chmod
Checkout: handle mode changes
|
|
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.
|
|
b1f6c0b6
|
2015-09-14T14:58:54
|
|
Merge pull request #3428 from ethomson/clone_test_buffer
Clone test buffer
|
|
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
|
|
ceb01c09
|
2015-09-13T22:31:08
|
|
Merge pull request #3426 from ethomson/fs_iterator
iterator: loop fs_iterator advance (don't recurse)
|
|
9d905541
|
2015-09-13T14:18:08
|
|
diriter: don't double '/' on posix
The canonical directory path of the root directory of a volume on
POSIX already ends in a slash (eg, `/`). This is true only at the
root. Do not add a slash to paths in this case.
|
|
26d7cf6e
|
2015-09-11T18:27:04
|
|
iterator: loop fs_iterator advance (don't recurse)
|
|
5a466bef
|
2015-09-13T13:59:41
|
|
diriter: don't double '/' on Windows
The canonical directory path of the root directory of a volume on
windows already ends in a slash (eg, `c:/`). This is true only
at the volume root. Do not add a slash to paths in this case.
|