|
8aaa9fb6
|
2016-06-20T18:21:42
|
|
win32: rename pthread.{c,h} to thread.{c,h}
The old pthread-file did re-implement the pthreads API with exact symbol
matching. As the thread-abstraction has now been split up between Unix- and
Windows-specific files within the `git_` namespace to avoid symbol-clashes
between libgit2 and pthreads, the rewritten wrappers have nothing to do with
pthreads anymore.
Rename the Windows-specific pthread-files to honor this change.
|
|
a342e870
|
2016-06-20T18:28:00
|
|
threads: remove now-useless typedefs
|
|
4f10c1e6
|
2016-06-20T19:40:45
|
|
threads: remove unused function pthread_num_processors_np
The function pthread_num_processors_np is currently unused and superseded by the
function `git_online_cpus`. Remove the function.
|
|
6551004f
|
2016-06-20T17:49:47
|
|
threads: split up OS-dependent rwlock code
|
|
139bffa0
|
2016-06-20T17:20:13
|
|
threads: split up OS-dependent thread-condition code
|
|
20d078df
|
2016-06-20T19:48:19
|
|
threads: remove unused function pthread_cond_broadcast
|
|
1c135405
|
2016-06-20T17:07:14
|
|
threads: split up OS-dependent mutex code
|
|
faebc1c6
|
2016-06-20T17:44:04
|
|
threads: split up OS-dependent thread code
|
|
69c71f29
|
2016-06-17T15:45:55
|
|
Merge pull request #3823 from libgit2/ethomson/checkout_no_index
checkout: use empty baseline when no index file exists
|
|
3e9830d7
|
2016-06-16T08:53:30
|
|
Merge pull request #3822 from libgit2/ethomson/checkout_head_docs
documentation: improve docs for `checkout_head`
|
|
bb0bd71a
|
2016-06-15T15:47:28
|
|
checkout: use empty baseline when no index
When no index file exists and a baseline is not explicitly provided, use
an empty baseline instead of trying to load `HEAD`.
|
|
b9266488
|
2016-06-14T12:27:03
|
|
documentation: improve docs for `checkout_head`
`git_checkout_head` is sadly misunderstood as something that can
switch branches. It cannot. Update the documentation to reflect this.
|
|
abb6f72a
|
2016-06-14T11:42:00
|
|
Merge pull request #3812 from stinb/fetch-tag-update-callback
fetch: Fixed spurious update callback for existing tags.
|
|
7f9673e4
|
2016-06-14T14:46:12
|
|
fetch: Fixed spurious update callback for existing tags.
|
|
2a09de91
|
2016-06-14T04:33:55
|
|
Merge pull request #3816 from pks-t/pks/memory-leaks
Memory leak fixes
|
|
65e4ab7a
|
2016-06-14T04:10:11
|
|
Merge pull request #3814 from pks-t/pks/invalid-memrefs
Fix invalid memory references
|
|
43c55111
|
2016-06-07T14:14:07
|
|
winhttp: plug several memory leaks
|
|
432af52b
|
2016-06-07T12:55:17
|
|
global: clean up crt only after freeing tls data
The thread local storage is used to hold some global state that
is dynamically allocated and should be freed upon exit. On
Windows, we clean up the C run-time right after execution of
registered shutdown callbacks and before cleaning up the TLS.
When we clean up the CRT, we also cause it to analyze for memory
leaks. As we did not free the TLS yet this will lead to false
positives.
Fix the issue by first freeing the TLS and cleaning up the CRT
only afterwards.
|
|
292c6027
|
2016-06-07T12:29:16
|
|
tests: fix memory leaks in checkout::typechange
|
|
13deb874
|
2016-06-07T08:35:26
|
|
index: fix NULL pointer access in index_remove_entry
When removing an entry from the index by its position, we first
retrieve the position from the index's entries and then try to
remove the retrieved value from the index map with
`DELETE_IN_MAP`. When `index_remove_entry` returns `NULL` we try
to feed it into the `DELETE_IN_MAP` macro, which will
unconditionally call `idxentry_hash` and then happily dereference
the `NULL` entry pointer.
Fix the issue by not passing a `NULL` entry into `DELETE_IN_MAP`.
|
|
7d02019a
|
2016-06-06T12:59:17
|
|
transports: smart: fix potential invalid memory dereferences
When we receive a packet of exactly four bytes encoding its
length as those four bytes it can be treated as an empty line.
While it is not really specified how those empty lines should be
treated, we currently ignore them and do not return an error when
trying to parse it but simply advance the data pointer.
Callers invoking `git_pkt_parse_line` are currently not prepared
to handle this case as they do not explicitly check this case.
While they could always reset the passed out-pointer to `NULL`
before calling `git_pkt_parse_line` and determine if the pointer
has been set afterwards, it makes more sense to update
`git_pkt_parse_line` to set the out-pointer to `NULL` itself when
it encounters such an empty packet. Like this it is guaranteed
that there will be no invalid memory references to free'd
pointers.
As such, the issue has been fixed such that `git_pkt_parse_line`
always sets the packet out pointer to `NULL` when an empty packet
has been received and callers check for this condition, skipping
such packets.
|
|
f0ee795c
|
2016-06-02T03:08:26
|
|
Merge pull request #3808 from ethomson/read_index_fixes
`git_index_read_index` fixes
|
|
46082c38
|
2016-06-02T02:34:03
|
|
index_read_index: invalidate new paths in tree cache
When adding a new entry to an existing index via `git_index_read_index`,
be sure to remove the tree cache entry for that new path. This will
mark all parent trees as dirty.
|
|
5acf18ac
|
2016-06-02T01:58:25
|
|
rebase: test rebasing a new commit with subfolder
Test a rebase (both a merge rebase and an inmemory rebase) with a new
commit that adds files underneath a new subfolder.
|
|
91fbf9d8
|
2016-06-01T22:31:16
|
|
test: ensure we can round-trip a written tree
Read a tree into an index, write the index, then re-open the index and
ensure that we are treesame to the original.
|
|
9167c145
|
2016-06-02T01:04:58
|
|
index_read_index: set flags for path_len correctly
Update the flags to reset the path_len (to emulate `index_insert`)
|
|
046ec3c9
|
2016-06-02T00:47:51
|
|
index_read_index: differentiate on mode
Treat index entries with different modes as different, which they
are, at least for the purposes of up-to-date calculations.
|
|
93de20b8
|
2016-06-01T14:56:27
|
|
index_read_index: reset error correctly
Clear any error state upon each iteration. If one of the iterations
ends (with an error of `GIT_ITEROVER`) we need to reset that error to 0,
lest we stop the whole process prematurely.
|
|
5baa20b8
|
2016-06-01T14:52:25
|
|
round-trip trees through index_read_index
Read a tree into an index using `git_index_read_index` (by reading
a tree into a new index, then reading that index into the current
index), then write the index back out, ensuring that our new index
is treesame to the tree that we read.
|
|
0aaba445
|
2016-06-01T11:33:58
|
|
Merge pull request #3796 from mmuman/haiku
Preliminary Haiku port
|
|
efb432c9
|
2016-06-01T11:05:45
|
|
Merge pull request #3801 from ethomson/warning
cleanup: unused warning
|
|
14cf05da
|
2016-05-26T12:52:29
|
|
win32: clean up unused warnings in DllMain
|
|
4505a42a
|
2016-05-26T12:42:43
|
|
rebase: change assertion to avoid
It looks like we're getting the operation and not doing anything
with it, when in fact we are asserting that it's not null. Simply
assert that we are within the operation boundary instead of using
the `git_array_get` macro to do this for us.
|
|
e3c42fee
|
2016-05-26T12:39:09
|
|
filebuf: fix uninitialized warning
|
|
0d77a56f
|
2016-05-26T12:28:32
|
|
checkout: drop unused repo
|
|
c2f18b9b
|
2016-05-26T10:51:16
|
|
cleanup: unused warning
|
|
37dba1a7
|
2016-05-27T09:15:01
|
|
Merge pull request #3803 from glensc/patch-1
Update CMakeLists.txt
|
|
13b0b7d5
|
2016-05-27T10:20:35
|
|
Update CMakeLists.txt
typo fix
|
|
784bb303
|
2016-05-26T10:28:00
|
|
Merge pull request #3799 from sschuberth/master
Use AppVeyor's Start-FileDownload cmdlet
|
|
e102daa4
|
2016-05-26T10:25:40
|
|
Merge pull request #3798 from mmuman/stat-test-fix
test: Fix stat() test to mask out unwanted bits
|
|
06f42b62
|
2016-05-26T01:20:41
|
|
Merge branch 'checkout_submodules'
|
|
c864b4ab
|
2016-05-12T13:18:07
|
|
Ignore submodules when checking for merge conflicts in the workdir.
|
|
afab1fff
|
2016-02-16T21:02:41
|
|
checkout: handle dirty submodules correctly
Don't generate conflicts when checking out a modified submodule and the
submodule is dirty or modified in the workdir.
|
|
fdf14637
|
2016-05-26T00:58:43
|
|
Merge pull request #3792 from edquist/misc
Fix comment for GIT_FILEMODE_LINK
|
|
247665ed
|
2016-05-25T12:10:44
|
|
Use AppVeyor's Start-FileDownload cmdlet
Start-FileDownload maintains current directory context and allows
specifying a request timeout, see [1].
[1] https://www.appveyor.com/docs/how-to/download-file#start-filedownload-cmdlet
|
|
407f2e9f
|
2016-05-24T19:07:09
|
|
test: Fix stat() test to mask out unwanted bits
Haiku and Hurd both pass extra bits in struct stat::st_mode.
|
|
c756448c
|
2016-05-24T16:15:57
|
|
Merge pull request #3797 from libgit2/cmn/remove-single-entry
tree: handle removal of all entries in the updater
|
|
a2cb4713
|
2016-05-24T14:30:43
|
|
tree: handle removal of all entries in the updater
When we remove all entries in a tree, we should remove that tree from
its parent rather than include the empty tree.
|
|
c91a1dc1
|
2016-05-23T18:02:24
|
|
Merge pull request #3794 from libgit2/cmn/tree-update-basename
Tree updater fixups
|
|
d94f5037
|
2016-05-22T23:23:58
|
|
CMakeLists: Add libnetwork for Haiku
|
|
53412305
|
2016-05-19T15:29:53
|
|
tree: plug leaks in the tree updater
|
|
6ee08d2c
|
2016-05-19T15:22:02
|
|
tree: use the basename for the entry removal
When we want to remove the file, use the basename as the name of the
entry to remove, instead of the full one, which includes the directories
we've inserted into the stack.
|
|
92249656
|
2016-05-19T15:21:26
|
|
tree: use testrepo2 for the tree updater tests
This gives us trees with subdirectories, which the new test needs.
|
|
c8fb2e15
|
2016-05-18T16:00:01
|
|
Fix comment for GIT_FILEMODE_LINK
0120000 is symbolic link, not commit
|
|
1b56cda1
|
2016-05-18T11:30:02
|
|
Merge pull request #3770 from libgit2/cmn/tree-update
Add a method specifically for modifying trees
|
|
9464f9eb
|
2016-05-02T17:36:58
|
|
Introduce a function to create a tree based on a different one
Instead of going through the usual steps of reading a tree recursively
into an index, modifying it and writing it back out as a tree, introduce
a function to perform simple updates more efficiently.
`git_tree_create_updated` avoids reading trees which are not modified
and supports upsert and delete operations. It is not as versatile as
modifying the index, but it makes some common operations much more
efficient.
|
|
c1485330
|
2016-05-09T08:58:44
|
|
Merge pull request #3767 from pks-t/pks/misc-fixes
Misc fixes
|
|
6f02f198
|
2016-05-08T17:48:22
|
|
Merge pull request #3773 from lucasderraugh/patch-1
Fix unused variable 'message' warning
|
|
17a93afa
|
2016-05-06T18:44:37
|
|
Merge pull request #3757 from johnhaley81/jh/fix-create-initial-commit
Fix `git_commit_create` for an initial commit
|
|
2527db87
|
2016-05-05T23:34:23
|
|
Fix unused variable 'message' warning
|
|
5785ae9b
|
2016-05-04T11:14:17
|
|
Fix initial commit test
`test_commit_commit__create_initial_commit_parent_not_current` was not correctly
testing that `HEAD` was not changed. Now we grab the oid that it was pointing to
before the call to `git_commit_create` and the oid that it's pointing to afterwards
and compare those.
|
|
2e43a37b
|
2016-05-04T19:05:38
|
|
Merge pull request #3769 from libgit2/ethomson/rebase_inmemory_no_base
Rebase: rebase a branch with no merge base for in-memory
|
|
225cb880
|
2016-04-26T08:09:04
|
|
Fix `git_commit_create` for an initial commit
When calling `git_commit_create` with an empty array of `parents` and `parent_count == 0`
the call will segfault at https://github.com/libgit2/libgit2/blob/master/src/commit.c#L107
when it's trying to compare `current_id` to a null parent oid.
This just puts in a check to stop that segfault.
|
|
4f22ccb9
|
2016-05-03T13:32:22
|
|
Add tests for creating an initial commit
|
|
9a363d1b
|
2016-05-03T15:29:50
|
|
rebase: handle no common ancestor for inmemory
|
|
c7b4bbff
|
2016-05-03T15:22:22
|
|
rebase: test rebase (merge) w/ no common ancestor
|
|
fe3057b4
|
2016-05-03T17:36:09
|
|
diff: simplify code for handling empty dirs
When determining diffs between two iterators we may need to
recurse into an unmatched directory for the "new" iterator when
it is either a prefix to the current item of the "old" iterator
or when untracked/ignored changes are requested by the user and
the directory is untracked/ignored.
When advancing into the directory and no files are found, we will
get back `GIT_ENOTFOUND`. If so, we simply skip the directory,
handling resulting unmatched old items in the next iteration. The
other case of `iterator_advance_into` returning either
`GIT_NOERROR` or any other error but `GIT_ENOTFOUND` will be
handled by the caller, which will now either compare the first
directory entry of the "new" iterator in case of `GIT_ENOERROR`
or abort on other cases.
Improve readability of the code to make the above logic more
clear.
|
|
4d384d6b
|
2016-05-02T13:59:51
|
|
Merge pull request #3759 from libgit2/cmn/faster-header
odb: avoid inflating the full delta to read the header
|
|
153fde5b
|
2016-05-02T16:49:59
|
|
delta-apply: fix sign extension
We compute offsets by executing `off |= (*delta++ << 24)` for
multiple constants, where `off` is of type `size_t` and `delta`
is of type `unsigned char`. The usual arithmetic conversions (see
ISO C89 §3.2.1.5 "Usual arithmetic conversions") kick in here,
causing us to promote both operands to `int` and then extending
the result to an `unsigned long` when OR'ing it with `off`.
The integer promotion to `int` may result in wrong size
calculations for big values.
Fix the issue by making the constants `unsigned long`, causing both
operands to be promoted to `unsigned long`.
|
|
7f407710
|
2016-05-02T16:24:14
|
|
odb_loose: fix undefined behavior when computing size
An object's size is computed by reading the object header's size
field until the most significant bit is not set anymore. To get
the total size, we increase the shift on each iteration and add
the shifted value to the total size.
We read the current value into a variable of type `unsigned
char`, from which we then take all bits except the most
significant bit and shift the result. We will end up with a
maximum shift of 60, but this exceeds the width of the value's
type, resulting in undefined behavior.
Fix the issue by instead reading the values into a variable of
type `unsigned long`, which matches the required width. This is
equivalent to git.git, which uses an `unsigned long` as well.
|
|
7b24c4fd
|
2016-05-02T15:47:54
|
|
checkout: set ignorecase=0 when config lookup fails
When `git_repository__cvar` fails we may end up with a
`ignorecase` value of `-1`. As we subsequently check if
`ignorecase` is non-zero, we may end up reporting that data
should be removed when in fact it should not.
Err on the safer side and set `ignorecase = 0` when
`git_repository__cvar` fails.
|
|
fcd1b786
|
2016-05-02T14:46:14
|
|
merge_file: do not unnecessarily check ours/theirs for NULL
The `merge_file__xdiff` function checks if either `ours` or
`theirs` is `NULL`. The function is to be called with existing
files, though, and in fact already unconditionally dereferences
both pointers.
Remove the unnecessary check to silence warnings.
|
|
a97b769a
|
2016-04-27T12:00:31
|
|
odb: avoid inflating the full delta to read the header
When we read the header, we want to know the size and type of the
object. We're currently inflating the full delta in order to read the
first few bytes. This can mean hundreds of kB needlessly inflated for
large objects.
Instead use a packfile stream to read just enough so we can read the two
varints in the header and avoid inflating most of the delta.
|
|
f80852af
|
2016-05-02T14:30:14
|
|
index: fix memory leak on error case
|
|
d24425fa
|
2016-04-29T18:34:03
|
|
Merge pull request #3764 from libgit2/ethomson/cmake_pc
cmake: include threading libraries in pkg-config
|
|
097b0761
|
2016-04-29T10:18:04
|
|
cmake: include threading libraries in pkg-config
Include any required threading libraries in our `libgit2.pc`.
|
|
5e8ba35d
|
2016-04-29T10:36:01
|
|
Merge pull request #3763 from libgit2/ethomson/signature_from_buffer
Introduce `git_signature_from_buffer`
|
|
1e7fa834
|
2016-04-28T22:32:20
|
|
Merge pull request #3760 from backhub/bug/openssl_read
Fix return value of openssl_read (infinite loop)
|
|
d383c39b
|
2016-04-28T12:47:14
|
|
Introduce `git_signature_from_buffer`
Allow users to construct a signature from the type of signature
lines that actually appear in commits.
|
|
568c5a9f
|
2016-04-27T13:56:16
|
|
Fix style: no braces
|
|
88284dfb
|
2016-04-26T21:21:27
|
|
Merge pull request #3758 from libgit2/ethomson/annotated_commit_refs
Annotated commits: differentiate between the ref names and the description
|
|
d5592378
|
2016-04-26T11:39:53
|
|
annotated_commit: provide refs and description
Differentiate between the ref_name used to create an annotated_commit
(that can subsequently be used to look up the reference) and the
description that we resolved this with (which _cannot_ be looked up).
The description is used for things like reflogs (and may be a ref name,
and ID something that we revparsed to get here), while the ref name must
actually be a reference name, and is used for things like rebase to
return to the initial branch.
|
|
4734c52a
|
2016-04-26T18:04:03
|
|
Fix return value of openssl_read (infinite loop)
openssl_read should return -1 in case of error.
SSL_read returns values <= 0 in case of error.
A return value of 0 can lead to an infinite loop, so the return value
of ssl_set_error will be returned if SSL_read is not successful (analog
to openssl_write).
|
|
b3ffd8f6
|
2016-04-26T11:48:11
|
|
rebase::abort: test we can abort rebase by revspec
Test that we can properly abort a rebase when it is initialized by a
revspec. This ensures that we do not conflate revspecs and refnames.
|
|
cb2dfa46
|
2016-04-26T13:40:03
|
|
Merge pull request #3755 from arthurschreiber/patch-9
Remove traces of `git_blob_create_fromchunks`
|
|
a3e379cb
|
2016-04-26T11:10:31
|
|
Remove traces of `git_blob_create_fromchunks`
|
|
9068704b
|
2016-04-26T11:02:45
|
|
Merge pull request #3749 from arthurschreiber/arthur/add-git-reference-dup
Allow creating copies of `git_reference` objects.
|
|
c30955e0
|
2016-04-26T11:02:05
|
|
Merge pull request #3748 from libgit2/ethomson/rebase_detached
Rebase improvements with IDs
|
|
b058297a
|
2016-04-25T09:45:27
|
|
Merge pull request #3752 from libgit2/cmn/silly-tags
tag: ignore extra header fields
|
|
eb39284b
|
2016-04-25T12:16:05
|
|
tag: ignore extra header fields
While no extra header fields are defined for tags, git accepts them by
ignoring them and continuing the search for the message. There are a few
tags like this in the wild which git parses just fine, so we should do
the same.
|
|
908f24fd
|
2016-04-22T10:34:17
|
|
Allow creating copies of `git_reference` objects.
|
|
512bd2c7
|
2016-04-22T15:40:08
|
|
Merge pull request #3747 from libgit2/ethomson/warnings
:zap: some warnings
|
|
1f84caf0
|
2016-04-21T18:16:37
|
|
rebase: correctly finish rebasing detached heads
When rebasing with IDs, we do not return to the `branch`,
we remain in a detached HEAD state.
|
|
badc7283
|
2016-04-21T17:29:19
|
|
rebase: handle detached HEADs in `init`
When `init`ing a rebase from a detached HEAD, be sure to remember
that we were in a detached HEAD state so that we can correctly
`abort` the object that we just created.
|
|
320f53cd
|
2016-04-21T17:03:21
|
|
rebase: test abort immediately after init
Instead of `open`ing a rebase and `abort`ing that, test that we can
`abort` a rebase that has just begun with `init`.
|
|
0bd77401
|
2016-04-21T11:05:21
|
|
clone test: annotate unused vars
|
|
375bb2fe
|
2016-04-21T11:02:31
|
|
transport: cast away constness for free
|
|
e0aed4bd
|
2016-04-21T11:01:09
|
|
stransport: pass proxy opts instead of char*
|
|
db22a91b
|
2016-04-21T10:58:22
|
|
iterator: ignore submodule in has_ended
|
|
1dc44910
|
2016-04-19T19:48:52
|
|
Merge pull request #3110 from libgit2/cmn/proxy-config
Proxy configuration
|