]> git.proxmox.com Git - libgit2.git/log
libgit2.git
9 years agoMerge pull request #2534 from libgit2/ntk/case_index_conflicts
Edward Thomson [Thu, 12 Nov 2015 15:13:11 +0000 (10:13 -0500)]
Merge pull request #2534 from libgit2/ntk/case_index_conflicts

Failing test for case sensitive conflicts in the index

9 years agoindex: overwrite the path when inserting conflicts
Carlos Martín Nieto [Thu, 12 Nov 2015 10:54:06 +0000 (11:54 +0100)]
index: overwrite the path when inserting conflicts

When we insert a conflict in a case-insensitive index, accept the
new entry's path as the correct case instead of leaving the path we
already had.

This puts `git_index_conflict_add()` on the same level as
`git_index_add()` in this respect.

9 years agoindex: correctly report which conflict stage has a wrong filemode
Carlos Martín Nieto [Tue, 10 Nov 2015 23:36:15 +0000 (00:36 +0100)]
index: correctly report which conflict stage has a wrong filemode

When we're at offset 'i', we're dealing with the 'i+1' stage, since
conflicts start at 1.

9 years agoFailing test for case sensitive conflicts in the index
nulltoken [Tue, 26 Aug 2014 11:51:37 +0000 (13:51 +0200)]
Failing test for case sensitive conflicts in the index

9 years agoMerge pull request #3498 from ethomson/windows_symlinks
Carlos Martín Nieto [Sun, 8 Nov 2015 04:10:18 +0000 (05:10 +0100)]
Merge pull request #3498 from ethomson/windows_symlinks

Diff: Honor `core.symlinks=false` and fake symlinks

9 years agoMerge pull request #3500 from ethomson/submodules_with_path
Carlos Martín Nieto [Sun, 8 Nov 2015 03:54:55 +0000 (04:54 +0100)]
Merge pull request #3500 from ethomson/submodules_with_path

Handle submodules with paths in `git_submodule_update`

9 years agosubmodule: reload HEAD/index after reading config
Edward Thomson [Wed, 4 Nov 2015 21:17:51 +0000 (16:17 -0500)]
submodule: reload HEAD/index after reading config

Reload the HEAD and index data for a submodule after reading the
configuration.  The configuration may specify a `path`, so we must
update HEAD and index data with that path in mind.

9 years agosubmodule: test updating a submodule w/ a path
Edward Thomson [Wed, 4 Nov 2015 21:16:51 +0000 (16:16 -0500)]
submodule: test updating a submodule w/ a path

Test that `git_submodule_update` can handle a submodule that is
freshly cloned and has a path differing from its name.

9 years agoMerge pull request #3465 from libgit2/cmn/tls-register
Edward Thomson [Wed, 4 Nov 2015 19:16:24 +0000 (14:16 -0500)]
Merge pull request #3465 from libgit2/cmn/tls-register

stream: allow registering a user-provided TLS constructor

9 years agoMerge branch 'pr/3487'
Edward Thomson [Tue, 3 Nov 2015 22:52:21 +0000 (17:52 -0500)]
Merge branch 'pr/3487'

9 years agoFix git_commit_summary to convert newlines to spaces even after
Stjepan Rajko [Fri, 9 Oct 2015 17:41:06 +0000 (10:41 -0700)]
Fix git_commit_summary to convert newlines to spaces even after
whitespace.  Collapse spaces around newlines for the summary.

9 years agoindex: test that add_bypath preserves symlinks
Edward Thomson [Tue, 3 Nov 2015 16:27:31 +0000 (11:27 -0500)]
index: test that add_bypath preserves symlinks

Test that on platforms without `core.symlinks`, we preserve symlinks
in `git_index_add_bypath`.  (Users should correct the actual index
entry's mode to change a link to a regular file.)

9 years agodiff: on win32, treat fake "symlinks" specially
Edward Thomson [Tue, 3 Nov 2015 14:43:18 +0000 (09:43 -0500)]
diff: on win32, treat fake "symlinks" specially

On platforms that lack `core.symlinks`, we should not go looking for
symbolic links and `p_readlink` their target.  Instead, we should
examine the file's contents.

9 years agodiff: test "symlinks" in wd are respected on win32
Edward Thomson [Tue, 3 Nov 2015 14:40:30 +0000 (09:40 -0500)]
diff: test "symlinks" in wd are respected on win32

When `core.symlinks = false`, we write the symlinks content (target)
to a regular file.  We should ensure that when we later see that
regular file, we treat it specially - and that changing that regular
file would actually change the symlink target.  (For compatibility
with Git for Windows).

9 years agoMerge pull request #3494 from leoyanggit/fix_unit_test_build
Carlos Martín Nieto [Tue, 3 Nov 2015 16:13:41 +0000 (08:13 -0800)]
Merge pull request #3494 from leoyanggit/fix_unit_test_build

Fix build for unit test

9 years agostream: allow registering a user-provided TLS constructor
Carlos Martín Nieto [Tue, 13 Oct 2015 09:25:41 +0000 (11:25 +0200)]
stream: allow registering a user-provided TLS constructor

This allows the application to use their own TLS stream, regardless of
the capabilities of libgit2 itself.

9 years agostream: accept NULL in the free function
Carlos Martín Nieto [Tue, 13 Oct 2015 17:34:07 +0000 (19:34 +0200)]
stream: accept NULL in the free function

9 years agoMerge branch 'pr/3147'
Edward Thomson [Mon, 2 Nov 2015 21:36:28 +0000 (16:36 -0500)]
Merge branch 'pr/3147'

9 years agoAdd diff progress callback.
Jason Haslam [Thu, 16 Jul 2015 16:17:16 +0000 (10:17 -0600)]
Add diff progress callback.

9 years agoFix build for unit test
Leo Yang [Fri, 30 Oct 2015 17:53:53 +0000 (13:53 -0400)]
Fix build for unit test

If none of GIT_OPENSSL, GIT_WINHTTP or GIT_SECURE_TRANSPORT
is defined we should also be able to build the unit test.

9 years agoMerge pull request #3491 from libgit2/cmn/config-checksum
Edward Thomson [Mon, 2 Nov 2015 20:09:19 +0000 (15:09 -0500)]
Merge pull request #3491 from libgit2/cmn/config-checksum

Use checksums to detect config file changes

9 years agoMerge pull request #3495 from leoyanggit/fix_transport_build
Edward Thomson [Mon, 2 Nov 2015 20:04:26 +0000 (15:04 -0500)]
Merge pull request #3495 from leoyanggit/fix_transport_build

Fix build for custom transport users

9 years agoMerge pull request #3492 from libgit2/vmg/redundant
Vicent Marti [Mon, 2 Nov 2015 13:27:10 +0000 (14:27 +0100)]
Merge pull request #3492 from libgit2/vmg/redundant

merge-base: Remove redundant merge bases

9 years agomerge: Fix memory leak in test
Vicent Marti [Mon, 2 Nov 2015 11:06:50 +0000 (12:06 +0100)]
merge: Fix memory leak in test

9 years agoAdd test case
Vicent Marti [Fri, 30 Oct 2015 17:32:34 +0000 (18:32 +0100)]
Add test case

9 years agomerge-base: Style
Vicent Marti [Fri, 30 Oct 2015 13:02:01 +0000 (14:02 +0100)]
merge-base: Style

9 years agomerge-base: Do not read parents from the root
Vicent Marti [Fri, 30 Oct 2015 10:50:43 +0000 (11:50 +0100)]
merge-base: Do not read parents from the root

9 years agomerge-base: Remove redundant merge bases
Vicent Marti [Fri, 30 Oct 2015 10:45:52 +0000 (11:45 +0100)]
merge-base: Remove redundant merge bases

9 years agofilebuf: use an internal buffer
Carlos Martín Nieto [Fri, 30 Oct 2015 20:36:51 +0000 (21:36 +0100)]
filebuf: use an internal buffer

This reduces the chances of a crash in the thread tests. This shouldn't
affect general usage too much, since the main usage of these functions
are to read into an empty buffer.

9 years agofilebuf: use a checksum to detect file changes
Carlos Martín Nieto [Thu, 29 Oct 2015 20:12:37 +0000 (21:12 +0100)]
filebuf: use a checksum to detect file changes

Instead of relying on the size and timestamp, which can hide changes
performed in the same second, hash the file content's when we care about
detecting changes.

9 years agoconfig: add failing test for an external modification
Carlos Martín Nieto [Thu, 29 Oct 2015 19:31:25 +0000 (20:31 +0100)]
config: add failing test for an external modification

We currently use the timestamp in order to decide whether a config file
has changed since we last read it.

This scheme falls down if the file is written twice within the same
second, as we fail to detect the file change after the first read in
that second.

9 years agoMerge pull request #3493 from ethomson/read_index
Carlos Martín Nieto [Fri, 30 Oct 2015 18:36:16 +0000 (19:36 +0100)]
Merge pull request #3493 from ethomson/read_index

index: read_index must update hashes

9 years agoFix build for custom transport users
Leo Yang [Fri, 30 Oct 2015 18:12:19 +0000 (14:12 -0400)]
Fix build for custom transport users

We should explicitly include the declaration of git_strarray
from "include/git2/sys/transport.h"

9 years agogit: put NULL check at the top
Carlos Martín Nieto [Fri, 30 Oct 2015 17:23:17 +0000 (18:23 +0100)]
git: put NULL check at the top

9 years agoindex: read_index must update hashes
Edward Thomson [Fri, 30 Oct 2015 17:07:02 +0000 (13:07 -0400)]
index: read_index must update hashes

9 years agogit: accept NULL as argument to its stream free
Carlos Martín Nieto [Fri, 30 Oct 2015 16:51:50 +0000 (17:51 +0100)]
git: accept NULL as argument to its stream free

9 years agoMerge pull request #3486 from srajko/reflog-segfault-fix
Carlos Martín Nieto [Thu, 29 Oct 2015 19:37:48 +0000 (20:37 +0100)]
Merge pull request #3486 from srajko/reflog-segfault-fix

Fix segfault when reading reflog with extra newlines

9 years agoPrevent segfault when parsing a reflog with oid parse error
Stjepan Rajko [Mon, 26 Oct 2015 22:33:00 +0000 (15:33 -0700)]
Prevent segfault when parsing a reflog with oid parse error

Using calloc instead of malloc because the parse error will lead to an immediate free of committer (and its properties, which can segfault on free if undefined - test_refs_reflog_reflog__reading_a_reflog_with_invalid_format_returns_error segfaulted before the fix).

#3458

9 years agopool: fix documentation
Edward Thomson [Wed, 28 Oct 2015 14:53:03 +0000 (10:53 -0400)]
pool: fix documentation

9 years agoMerge pull request #3488 from libgit2/vmg/pool
Vicent Marti [Wed, 28 Oct 2015 14:34:16 +0000 (15:34 +0100)]
Merge pull request #3488 from libgit2/vmg/pool

pool: Simplify implementation

9 years agomerge: Do not mallocz unecessary entries
Vicent Marti [Wed, 28 Oct 2015 13:49:28 +0000 (14:49 +0100)]
merge: Do not mallocz unecessary entries

9 years agopool: update comment
Vicent Marti [Wed, 28 Oct 2015 13:31:09 +0000 (14:31 +0100)]
pool: update comment

9 years agopool: Dot not assume mallocs are zeroed out
Vicent Marti [Wed, 28 Oct 2015 09:50:25 +0000 (10:50 +0100)]
pool: Dot not assume mallocs are zeroed out

9 years agopool: Handle 32 bit systems
Vicent Marti [Wed, 28 Oct 2015 09:29:00 +0000 (10:29 +0100)]
pool: Handle 32 bit systems

9 years agopool: Take into account malloc overhead & pool page size
Vicent Marti [Wed, 28 Oct 2015 09:28:43 +0000 (10:28 +0100)]
pool: Take into account malloc overhead & pool page size

9 years agorepository: plug memory leak
Vicent Marti [Wed, 28 Oct 2015 09:15:24 +0000 (10:15 +0100)]
repository: plug memory leak

cc @carlosmn

9 years agopool: Simplify implementation
Vicent Marti [Tue, 27 Oct 2015 16:26:04 +0000 (17:26 +0100)]
pool: Simplify implementation

9 years agoMerge pull request #3489 from libgit2/vmg/reuc-insert
Vicent Marti [Wed, 28 Oct 2015 08:55:20 +0000 (09:55 +0100)]
Merge pull request #3489 from libgit2/vmg/reuc-insert

Better REUC generation when merging

9 years agomerge: Plug memory leak
Vicent Marti [Tue, 27 Oct 2015 21:42:40 +0000 (22:42 +0100)]
merge: Plug memory leak

9 years agomerge: Implement `GIT_MERGE_TREE_SKIP_REUC`
Vicent Marti [Tue, 27 Oct 2015 21:42:15 +0000 (22:42 +0100)]
merge: Implement `GIT_MERGE_TREE_SKIP_REUC`

9 years agoreuc: Be smarter when inserting new REUC entries
Vicent Marti [Tue, 27 Oct 2015 21:17:32 +0000 (22:17 +0100)]
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.

9 years agoMerge pull request #3485 from srajko/giterr_clear-typo-fix
Carlos Martín Nieto [Mon, 26 Oct 2015 20:13:54 +0000 (21:13 +0100)]
Merge pull request #3485 from srajko/giterr_clear-typo-fix

Fix docs typo geterr_clear -> giterr_clear

9 years agoFix docs typo geterr_clear -> giterr_clear
Stjepan Rajko [Wed, 14 Oct 2015 16:41:27 +0000 (09:41 -0700)]
Fix docs typo geterr_clear -> giterr_clear

9 years agoMerge pull request #3477 from linquize/inttypes.h
Edward Thomson [Fri, 23 Oct 2015 15:13:14 +0000 (10:13 -0500)]
Merge pull request #3477 from linquize/inttypes.h

inttypes.h is built-in header file since MSVC 2013

9 years agoMerge pull request #3483 from ethomson/cmake_xcode
Carlos Martín Nieto [Fri, 23 Oct 2015 13:16:21 +0000 (15:16 +0200)]
Merge pull request #3483 from ethomson/cmake_xcode

cmake: split sources into original paths for Xcode and MSVC

9 years agoMerge pull request #3481 from ethomson/xdiff_include
Carlos Martín Nieto [Fri, 23 Oct 2015 13:13:38 +0000 (15:13 +0200)]
Merge pull request #3481 from ethomson/xdiff_include

xdiff: reference util.h in parent directory

9 years agoMerge pull request #3482 from ethomson/merge_fail_on_conflict
Vicent Marti [Fri, 23 Oct 2015 11:37:02 +0000 (13:37 +0200)]
Merge pull request #3482 from ethomson/merge_fail_on_conflict

merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICT

9 years agocmake: split sources into original paths for Xcode and MSVC
Edward Thomson [Fri, 23 Oct 2015 01:17:19 +0000 (20:17 -0500)]
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.

9 years agomerge: add GIT_MERGE_TREE_FAIL_ON_CONFLICT
Edward Thomson [Thu, 22 Oct 2015 18:39:20 +0000 (14:39 -0400)]
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.

9 years agoMerge pull request #3480 from ethomson/nsecs
Carlos Martín Nieto [Thu, 22 Oct 2015 16:35:43 +0000 (18:35 +0200)]
Merge pull request #3480 from ethomson/nsecs

Nanoseconds in the index: ignore for diffing

9 years agoxdiff: reference util.h in parent directory
Edward Thomson [Thu, 22 Oct 2015 14:29:51 +0000 (10:29 -0400)]
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.

9 years agodiff: ignore nsecs when diffing
Edward Thomson [Thu, 22 Oct 2015 13:30:41 +0000 (09:30 -0400)]
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.

9 years agoindex: test that we round-trip nsecs
Edward Thomson [Thu, 22 Oct 2015 13:29:40 +0000 (09:29 -0400)]
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.

9 years agointtypes.h is built-in header file since MSVC 2013
Linquize [Wed, 21 Oct 2015 23:56:34 +0000 (07:56 +0800)]
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

9 years agoMerge pull request #3475 from libgit2/cmn/programdata-config
Edward Thomson [Wed, 21 Oct 2015 20:43:22 +0000 (13:43 -0700)]
Merge pull request #3475 from libgit2/cmn/programdata-config

config: add a ProgramData level

9 years agoMerge pull request #3479 from ethomson/cplusplus
Carlos Martín Nieto [Wed, 21 Oct 2015 18:36:38 +0000 (20:36 +0200)]
Merge pull request #3479 from ethomson/cplusplus

api: be explicit about our C linkage

9 years agowin32: add c linkage guard around inttypes.h inclusion
Edward Thomson [Wed, 21 Oct 2015 13:24:10 +0000 (09:24 -0400)]
win32: add c linkage guard around inttypes.h inclusion

9 years agoconfig: add a ProgramData level
Carlos Martín Nieto [Tue, 20 Oct 2015 15:42:42 +0000 (17:42 +0200)]
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.

9 years agoMerge pull request #3478 from libgit2/vmg/crud
Vicent Marti [Wed, 21 Oct 2015 12:41:13 +0000 (14:41 +0200)]
Merge pull request #3478 from libgit2/vmg/crud

signature: Strip crud

9 years agotests: Fix warnings
Vicent Marti [Wed, 21 Oct 2015 10:09:29 +0000 (12:09 +0200)]
tests: Fix warnings

9 years agoindex: Remove unneeded consts
Vicent Marti [Wed, 21 Oct 2015 10:04:53 +0000 (12:04 +0200)]
index: Remove unneeded consts

9 years agosignature: Strip crud just like Git does
Vicent Marti [Wed, 21 Oct 2015 09:58:44 +0000 (11:58 +0200)]
signature: Strip crud just like Git does

9 years agoMerge pull request #3466 from libgit2/cmn/quick-parse-64
Edward Thomson [Thu, 15 Oct 2015 14:10:48 +0000 (07:10 -0700)]
Merge pull request #3466 from libgit2/cmn/quick-parse-64

revwalk: make commit list use 64 bits for time

9 years agoMerge pull request #3444 from ethomson/add_preserves_conflict_mode
Carlos Martín Nieto [Thu, 15 Oct 2015 10:22:10 +0000 (12:22 +0200)]
Merge pull request #3444 from ethomson/add_preserves_conflict_mode

Preserve modes from a conflict in `git_index_insert`

9 years agoMerge pull request #3468 from libgit2/vmg/odb-lookups
Vicent Marti [Thu, 15 Oct 2015 09:09:12 +0000 (11:09 +0200)]
Merge pull request #3468 from libgit2/vmg/odb-lookups

Fix pathological performance in ODB lookups

9 years agoodb: Prioritize alternate backends
Vicent Marti [Wed, 14 Oct 2015 17:31:54 +0000 (19:31 +0200)]
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.

9 years agoodb: Be smarter when refreshing backends
Vicent Marti [Wed, 14 Oct 2015 17:24:07 +0000 (19:24 +0200)]
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.

9 years agoMerge pull request #3453 from libgit2/cmn/warn-python
Edward Thomson [Wed, 14 Oct 2015 15:30:51 +0000 (08:30 -0700)]
Merge pull request #3453 from libgit2/cmn/warn-python

CMake: be more explicit with python errors

9 years agorevwalk: make commit list use 64 bits for time
Carlos Martín Nieto [Wed, 14 Oct 2015 14:49:01 +0000 (16:49 +0200)]
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.

9 years agoMerge pull request #3455 from Eun/master
Carlos Martín Nieto [Wed, 7 Oct 2015 13:43:36 +0000 (15:43 +0200)]
Merge pull request #3455 from Eun/master

Examples: network/fetch.c transfer_progress_cb - should return a value

9 years agofix return
Eun [Wed, 7 Oct 2015 12:01:05 +0000 (14:01 +0200)]
fix return

9 years agoCMake: be more explicit with python errors
Carlos Martín Nieto [Tue, 6 Oct 2015 11:35:45 +0000 (13:35 +0200)]
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.

9 years agoMerge pull request #3451 from ethomson/xdiff
Edward Thomson [Mon, 5 Oct 2015 22:21:28 +0000 (00:21 +0200)]
Merge pull request #3451 from ethomson/xdiff

xdiff fixes

9 years agoblame: guard xdiff calls for large files
Edward Thomson [Tue, 29 Sep 2015 16:46:41 +0000 (12:46 -0400)]
blame: guard xdiff calls for large files

9 years agodiff: don't feed large files to xdiff
Edward Thomson [Tue, 29 Sep 2015 16:18:17 +0000 (12:18 -0400)]
diff: don't feed large files to xdiff

9 years agomerge_file: treat large files as binary
Edward Thomson [Mon, 28 Sep 2015 22:25:24 +0000 (18:25 -0400)]
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.

9 years agoxdiff: convert size variables to size_t
Edward Thomson [Mon, 28 Sep 2015 20:34:29 +0000 (16:34 -0400)]
xdiff: convert size variables to size_t

9 years agoGITERR_CHECK_ALLOC_ADDn: multi-arg adders
Edward Thomson [Mon, 28 Sep 2015 20:24:50 +0000 (16:24 -0400)]
GITERR_CHECK_ALLOC_ADDn: multi-arg adders

9 years agoMerge pull request #3447 from arthurschreiber/arthur/fix-odb-refdb-free
Carlos Martín Nieto [Thu, 1 Oct 2015 05:56:19 +0000 (07:56 +0200)]
Merge pull request #3447 from arthurschreiber/arthur/fix-odb-refdb-free

refdb and odb backends must provide `free` function

9 years agorefdb and odb backends must provide `free` function
Arthur Schreiber [Wed, 30 Sep 2015 22:50:37 +0000 (00:50 +0200)]
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.

9 years agoMerge pull request #3446 from ethomson/portability
Carlos Martín Nieto [Wed, 30 Sep 2015 15:44:10 +0000 (17:44 +0200)]
Merge pull request #3446 from ethomson/portability

portability: use `CHECK_FUNCTION_EXISTS` for checking whether functions exist...

9 years agoMerge pull request #3445 from libgit2/cmn/ssl-null
Edward Thomson [Wed, 30 Sep 2015 13:29:01 +0000 (06:29 -0700)]
Merge pull request #3445 from libgit2/cmn/ssl-null

openssl: don't try to teardown an unconnected SSL context

9 years agoindex: also try conflict mode when inserting
Edward Thomson [Tue, 29 Sep 2015 19:49:16 +0000 (15:49 -0400)]
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.

9 years agoqsort_r/qsort_s: detect their support
Edward Thomson [Wed, 30 Sep 2015 09:49:04 +0000 (05:49 -0400)]
qsort_r/qsort_s: detect their support

9 years agop_futimes: support using futimens when available
Edward Thomson [Tue, 29 Sep 2015 17:36:37 +0000 (13:36 -0400)]
p_futimes: support using futimens when available

9 years agoopenssl: don't try to teardown an unconnected SSL context
Carlos Martín Nieto [Wed, 30 Sep 2015 07:41:25 +0000 (09:41 +0200)]
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.

9 years agoMerge pull request #3411 from spraints/custom-push-headers
Carlos Martín Nieto [Wed, 30 Sep 2015 07:17:18 +0000 (09:17 +0200)]
Merge pull request #3411 from spraints/custom-push-headers

Include custom HTTP headers

9 years agoMerge pull request #3443 from libgit2/longpath-printf
Carlos Martín Nieto [Tue, 29 Sep 2015 19:46:00 +0000 (21:46 +0200)]
Merge pull request #3443 from libgit2/longpath-printf

win32::longpath: don't print path

9 years agoindex: test that add_bypath preserves mode
Edward Thomson [Tue, 29 Sep 2015 18:16:51 +0000 (14:16 -0400)]
index: test that add_bypath preserves mode

9 years agowin32::longpath: don't print path
Edward Thomson [Mon, 28 Sep 2015 20:46:09 +0000 (16:46 -0400)]
win32::longpath: don't print path