|
abdbfefb
|
2015-10-21T11:58:44
|
|
signature: Strip crud just like Git does
|
|
aef97245
|
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.
|
|
18ff20f8
|
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.
|
|
486270dc
|
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.
|
|
66956c50
|
2015-09-30T05:49:04
|
|
qsort_r/qsort_s: detect their support
|
|
cd768280
|
2015-09-29T13:36:37
|
|
p_futimes: support using futimens when available
|
|
08a2a939
|
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.
|
|
6aed945f
|
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-
|
|
80b4536b
|
2015-09-22T23:10:56
|
|
win32: propogate filename too long errors
|
|
1ffa0739
|
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.
|
|
ad8e8fa7
|
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.
|
|
59ac2242
|
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.
|
|
d1a7d0e1
|
2015-09-11T16:35:14
|
|
Removing memory leak in mempack's free
It calls git_mempack_reset which reallocates the object array. git_oidmap_free is now called on it explicitly.
|
|
7e53d83c
|
2015-09-10T14:44:52
|
|
Fixing dangling pointers in git_mempack_reset
git_mempack_reset was leaving free'd pointers in the oidmap.
|
|
d960fb32
|
2015-08-14T15:42:59
|
|
added a single line of additional error reporting from libssh2 when failing to retrieve the list of authentication methods
|
|
c1dabd18
|
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.
|
|
683af196
|
2015-09-29T12:46:41
|
|
blame: guard xdiff calls for large files
|
|
7eb26267
|
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.
|
|
61c6f441
|
2015-09-29T12:18:17
|
|
diff: don't feed large files to xdiff
|
|
5045868a
|
2015-09-28T16:34:29
|
|
xdiff: convert size variables to size_t
|
|
f362a1b1
|
2015-09-28T16:24:50
|
|
GITERR_CHECK_ALLOC_ADDn: multi-arg adders
|
|
c2549eea
|
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.
|
|
d994cfc8
|
2015-08-15T18:15:23
|
|
http: propagate the credentials callback's error code
When we ask for credentials, the user may choose to return EUSER to
indicate that an error has happened on its end and it wants to be given
back control.
We must therefore pass that back to the user instead of mentioning that
it was on_headers_complete() that returned an error code. Since we can,
we return the exact error code from the user (other than PASSTHROUGH)
since it doesn't cost anything, though using other error codes aren't
recommended.
|
|
5470fd6d
|
2015-08-13T22:52:52
|
|
Fix bug in git_smart__push: push_transfer_progress cb is never called
The conditional checked cbs->transfer_progress then used the value in cbs->push_transfer_progress. In both cases it should be push_transfer_progress
|
|
7a215040
|
2015-08-11T22:51:53
|
|
remote: don't confuse tag auto-follow rules with refspec matching
When we're looking to update a tag, we can't stop if the tag auto-follow
rules don't say to update it. The tag might still match the refspec we
were given.
|
|
40abdc65
|
2015-08-06T13:02:35
|
|
curl: use the most secure auth method for the proxy
When curl uses a proxy, it will only use Basic unless we prompt it to
try to use the most secure on it has available.
This is something which git did recently, and it seems like a good idea.
|
|
2cb4b653
|
2015-08-05T10:19:06
|
|
Fix duplicate basenames to support older VS
With Visual Studio versions 2008 and older they ignore the full path to files and only check
the basename of the file to find a collision. Additionally, having duplicate basenames can break
other build tools like GYP.
This fixes https://github.com/libgit2/libgit2/issues/3356
|
|
16cee5d6
|
2015-08-03T08:17:47
|
|
Stage an unregistered submodule in _add_bypath()
|
|
62a273cc
|
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.
|
|
7483e08f
|
2015-08-03T07:38:07
|
|
Handle ssh:// and git:// urls containing a '~' character.
For such a path '/~/...' the leading '/' is stripped so the server will
get a path starting with '~' and correctly handle it.
|
|
a299d0af
|
2015-07-31T16:23:11
|
|
Remove extra semicolon outside of a function
Without this change, compiling with gcc and pedantic generates warning:
ISO C does not allow extra ‘;’ outside of a function.
|
|
e5a77249
|
2015-08-01T15:38:04
|
|
Cherry-pick PR #3332: Resolve documentation warnings
|
|
a91dff89
|
2015-07-29T22:23:00
|
|
case-insensitive check for WWW-Authenticate header
Fixes issue #3338
|
|
a4ded362
|
2015-07-26T17:19:22
|
|
iterator: skip over errors in diriter init
An error here will typically mean that the directory was removed between
the time we iterated the parent and the time we wanted to visit it in
which case we should ignore it.
Other kinds of errors such as permissions (or transient errors) also
better dealt with by pretending we didn't see it.
|
|
ac1a5e20
|
2015-07-21T23:36:39
|
|
Make libgit2 work on Windows Vista again
(fixes issue #3316)
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
2563101b
|
2015-07-14T15:33:56
|
|
Fix macro redefinition warning
|
|
55bc1351
|
2015-07-13T09:08:32
|
|
submodule: normalize slashes in resolve_url
Our path functions expect to work with slashes, so convert a
path with backslashes into one with slashes at the top of
the function.
|
|
38dc9940
|
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.
|
|
34ff34fd
|
2015-07-12T13:28:03
|
|
filter: make sure to close the stream even on error
When the stream list init or write fail, we must also make sure to close
the stream, as that's the function contract.
|
|
678c4aac
|
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.
|
|
aafaa491
|
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.
|
|
e48dd86e
|
2015-07-11T18:31:28
|
|
submodule: lookup the submodule by path if available
If we get the path from the gitmodules file, look up the submodule we're
interested in by path, rather then by name. Otherwise we might get
duplicate results.
|
|
f2dc6b77
|
2015-06-30T13:41:01
|
|
khash: add eol so picky compilers stop warning
|
|
a4743de8
|
2015-07-10T09:21:59
|
|
xdiff: cleanup some warnings
|
|
75d0b81a
|
2015-07-07T16:46:48
|
|
xdiff: upgrade to core git 2.4.5
Upgrade xdiff to version used in core git 2.4.5 (0df0541).
Corrects an issue where an LF is added at EOF while applying
an unrelated change (ba31180), cleans up some unused code (be89977 and
e5b0662), and provides an improved callback to avoid leaking internal
(to xdiff) structures (467d348).
This also adds some additional functionality that we do not yet take
advantage of, namely the ability to ignore changes whose lines are
all blank (36617af).
|
|
f5740391
|
2015-07-07T06:55:05
|
|
Fix undefined reference with old versions of openssl
Versions prior to 0.9.8f did not have this function, rhel/centos5 are still on a
heavily backported version of 0.9.8e and theoretically supported until March 2017
Without this ifdef, I get the following link failure:
```
CMakeFiles/libgit2_clar.dir/src/openssl_stream.c.o: In function `openssl_connect':
openssl_stream.c:(.text+0x45a): undefined reference to `SSL_set_tlsext_host_name'
collect2: error: ld returned 1 exit status
make[6]: *** [libgit2_clar] Error 1
```
|
|
dd6b24b1
|
2015-07-02T10:36:15
|
|
iterator_walk: cast away constness for free
|
|
e0af3cb3
|
2015-07-01T21:15:06
|
|
submodule: correctly delimit the keys to use for lookup
The regex we use to look at the gitmodules file does not correctly
delimit the name of submodule which we want to look up and puts '.*'
straight after the name, maching on any submodule which has the seeked
submodule as a prefix of its name.
Add the missing '\.' in the regex so we want a full stop to exist both
before and after the submodule name.
|
|
526f91f5
|
2015-07-01T14:58:13
|
|
Fix 8.3 filename tests failure when 8.3 is disabled
|
|
9126ccac
|
2015-06-30T16:48:47
|
|
Fix #3093 - remove declaration of unused function git_fetch__download_pack
Function was added in commit 2c982daa2eec64b80c7940bfe1142295bd72edd8 on October 5, 2011,
and removed in commit 41fb1ca0ec51ad1d2a14b911aab3215e42965d1b on October 29, 2012.
Given the length of time it's gone unused, it's safe to remove now.
|
|
2f60073d
|
2015-06-30T21:40:20
|
|
Merge pull request #3273 from ethomson/warnings3
More warnings
|
|
1630981e
|
2015-06-30T09:03:23
|
|
http: fixed leak when asking for credentials again
t->cred might have been allocated the previous time and needs to be
freed before asking caller for credentials again.
|
|
0305721c
|
2015-06-30T14:23:41
|
|
winhttp: remove unused var
|
|
69c8bf7e
|
2015-06-30T14:21:29
|
|
posix compat: include sys/stat.h for mingw
|
|
49840056
|
2015-06-30T14:20:31
|
|
diff: use size_t format
|
|
3451c871
|
2015-06-30T09:29:41
|
|
Merge pull request #3271 from jeffhostetler/more_leaks
memory leak refspec.c
|
|
64e6b5b0
|
2015-06-29T17:32:22
|
|
fix memory leak in refspec.c on errors.
|
|
7bfdd1c2
|
2015-06-30T10:21:06
|
|
Merge pull request #3270 from ethomson/warnings2
Remove some warnings
|
|
e5f9df7b
|
2015-06-29T21:45:04
|
|
odb: cast to long long for printf
|
|
60655056
|
2015-06-29T21:37:07
|
|
submodule: cast enum to int for compare
|
|
3ca84ac0
|
2015-06-29T20:29:29
|
|
openssl: free hostname
|
|
149d5d8a
|
2015-06-29T15:17:58
|
|
stash: drop unused variable
|
|
ded4ccab
|
2015-06-29T15:16:22
|
|
iterator_walk: drop unused variable
|
|
8b380060
|
2015-06-29T21:12:44
|
|
http: don't give up on auth on the first try
When the server rejects an authentication request, ask the caller for
the credentials again, instead of giving up on the first try.
|
|
c28a5c97
|
2015-06-29T21:10:47
|
|
submodule: remove trailing slashes from submodule paths
We allow looking up a submodule by path, but we lost the path
normalisation during the recent changes. Bring it back.
|
|
cf4030b0
|
2015-06-29T20:54:17
|
|
submodule: remove some obsolete logic
Remove some of the logic that was left-over from the time we had a cache
of submodules, plugging a leak of the submodule object in certain cases.
|
|
fa399750
|
2015-06-27T21:26:27
|
|
Merge pull request #3265 from libgit2/leaks
Plug a bunch of leaks
|
|
24fa21f3
|
2015-06-26T18:59:53
|
|
index, iterator, fetchhead: plug leaks
|
|
9568660f
|
2015-06-26T18:31:39
|
|
diff: fix leaks in diff printing
|
|
cfafeb84
|
2015-06-26T18:11:05
|
|
Merge pull request #3263 from git-up/fixes
Fixes
|
|
354268ca
|
2015-06-26T17:46:35
|
|
Merge pull request #3259 from ethomson/stash_apply_argh
Stash apply: stage new files even when not updating the index
|
|
cae2a555
|
2015-06-26T08:17:56
|
|
Fixed build failure if GIT_CURL is not defined
|
|
3d9ef2dc
|
2015-06-26T16:45:42
|
|
Revert "object: correct the expected ID size in prefix lookup"
This reverts commit 969d4b703c910a8fd045baafbcd243b4c9825316.
This was a fluke from Coverity. The length to all the APIs in the
library is supposed to be passed in as nibbles, not bytes. Passing it as
bytes would prevent us from parsing uneven-sized SHA1 strings.
Also, the rest of the library was still using nibbles (including
revparse and the odb_prefix APIs), so this change was seriously breaking
things in unexpected ways. ^^
|
|
c2e1b058
|
2015-06-05T18:26:49
|
|
Only write index if updated when passing GIT_DIFF_UPDATE_INDEX
When diffing the index with the workdir and GIT_DIFF_UPDATE_INDEX has been passed,
the previous implementation was always writing the index to disk even if it wasn't
modified.
|
|
c0280bdd
|
2015-06-25T18:55:48
|
|
Merge pull request #3255 from libgit2/cmn/rename-unspecified
Rename FALLBACK to UNSPECIFIED
|
|
b7f5cb8d
|
2015-06-20T19:33:15
|
|
stash: stage new files when unstashing them
Files that were new (staged additions) in the stash tree should
be staged when unstashing, even when not applying the index.
|
|
8960dc1e
|
2015-06-24T18:10:30
|
|
iterator: provide git_iterator_walk
Provide `git_iterator_walk` to walk each iterator in lockstep,
returning each iterator's idea of the contents of the next path.
|
|
82b1c93d
|
2015-06-20T13:44:22
|
|
stash: don't allow apply with staged changes
|
|
3b66c6a3
|
2015-06-25T15:36:53
|
|
Merge pull request #3256 from libgit2/cmn/fetch-spec-fetchhead
remote: insert refspecs with no rhs in FETCH_HEAD
|
|
87987fd1
|
2015-06-25T15:26:43
|
|
Merge pull request #3246 from libgit2/cmn/dont-grow-borrowed
Don't allow growing borrowed buffers
|
|
23aa7c90
|
2015-06-25T13:40:38
|
|
remote: insert refspecs with no rhs in FETCH_HEAD
When a refspec contains no rhs and thus won't cause an explicit update,
we skip all the logic, but that means that we don't update FETCH_HEAD
with it, which is what the implicit rhs is.
Add another bit of logic which puts those remote heads in the list of
updates so we put them into FETCH_HEAD.
|
|
c2418f46
|
2015-06-25T12:48:44
|
|
Rename FALLBACK to UNSPECIFIED
Fallback describes the mechanism, while unspecified explains what the
user is thinking.
|
|
a6599235
|
2015-06-24T19:32:56
|
|
buffer: make use of EINVALID for growing a borrowed buffer
This explains more closely what happens. While here, set an error
message.
|
|
caab22c0
|
2015-06-23T15:41:58
|
|
buffer: don't allow growing borrowed buffers
When we don't own a buffer (asize=0) we currently allow the usage of
grow to copy the memory into a buffer we do own. This muddles the
meaning of grow, and lets us be a bit cavalier with ownership semantics.
Don't allow this any more. Usage of grow should be restricted to buffers
which we know own their own memory. If unsure, we must not attempt to
modify it.
|
|
daacf96d
|
2015-06-24T23:34:40
|
|
Merge pull request #3097 from libgit2/cmn/submodule-config-state
Remove run-time configuration settings from submodules
|
|
e1f434f8
|
2015-06-24T23:33:46
|
|
Merge pull request #3183 from libgit2/cmn/curl-stream
Implement a cURL stream
|
|
9d5efab8
|
2015-06-24T21:13:23
|
|
Merge pull request #3254 from ethomson/diff-binary-patch
Handle binary DIFFABLEness properly
|
|
c2f274c6
|
2015-06-24T19:47:34
|
|
Merge pull request #3250 from ethomson/stash
Stash workdir correctly when added in the index, modified in the workdir
|
|
54077091
|
2015-06-24T12:06:41
|
|
diff: determine DIFFABLE-ness for binaries
Always set `GIT_DIFF_PATCH_DIFFABLE` for all files, regardless of
binary-ness, so that the binary callback is invoked to either
show the binary contents, or just print the standard "Binary files
differ" message. We may need to do deeper inspection for binary
files where we have avoided loading the contents into a file map.
|
|
58ca8c7e
|
2015-06-24T17:27:16
|
|
SecureTransport: use the curl stream if available
If the libcurl stream is available, use that as the underlying stream
instead of the socket stream. This allows us to set a proxy for HTTPS
connections.
|
|
8443f492
|
2015-06-11T16:57:04
|
|
curl: remove the encrypted param to the constructor
We do not want libcurl to perform the TLS negotiation for us, so we
don't need to pass this option.
|
|
f97d5d09
|
2015-06-11T16:54:48
|
|
http: ask for the curl stream for non-encrypted connections
The TLS streams talk over the curl stream themselves, so we don't need
to ask for it explicitly. Do so in the case of the non-encrypted one so
we can still make use proxies in that case.
|
|
e247649d
|
2015-06-11T16:50:44
|
|
openssl: use the curl stream if available
When linking against libcurl, use it as the underlying transport instead
of straight sockets. We can't quite just give over the file descriptor,
as curl puts it into non-blocking mode, so we build a custom BIO so
OpenSSL sends the data through our stream, be it the socket or curl
streams.
|
|
cdee630f
|
2015-06-09T19:07:58
|
|
curl: extract certificate information
The information is exposed by curl for some crypto libraries in the form
of name:content strings. We can't do much more than return this
information.
|
|
8762d721
|
2015-06-07T14:51:10
|
|
http: set the proxy if the stream supports it
Of the built-in ones, only cURL support it, but there's no reason a
user-provided stream wouldn't support it.
|
|
1376e784
|
2015-06-07T14:42:13
|
|
stream: add support for setting a proxy
If the stream claims to support this feature, we can let the transport
set the proxy.
We also set HTTPPROXYTUNNEL option so curl can create a tunnel through
the proxy which lets us create our own TLS session (if needed).
|
|
8dea1c21
|
2015-06-05T11:02:11
|
|
Implement a curl stream
cURL has a mode in which it acts a lot like our streams, providing send
and recv functions and taking care of the TLS and proxy setup for us.
Implement a new stream which uses libcurl instead of raw sockets or the
TLS libraries directly. This version does not support reporting
certificates or proxies yet.
|
|
6a8f3fa8
|
2015-06-23T20:59:03
|
|
Fixed invalid error handling in git_repository_open_ext()
|
|
cc605e73
|
2015-06-23T23:52:03
|
|
Merge pull request #3222 from git-up/conflicted
Fixed GIT_DELTA_CONFLICTED not returned in some cases
|
|
bd670abd
|
2015-06-23T23:30:58
|
|
Merge pull request #3226 from libgit2/cmn/racy-diff-again
racy-git, the missing link
|