]> git.proxmox.com Git - libgit2.git/log
libgit2.git
8 years agostatus: test submodules with mixed case
Edward Thomson [Thu, 31 Mar 2016 21:33:44 +0000 (17:33 -0400)]
status: test submodules with mixed case

8 years agoMerge pull request #3716 from libgit2/cmn/typedef-sizet
Edward Thomson [Thu, 31 Mar 2016 14:04:43 +0000 (10:04 -0400)]
Merge pull request #3716 from libgit2/cmn/typedef-sizet

Add a no-op size_t typedef for the doc parser

8 years agoMerge pull request #3575 from pmq20/master-13jan16
Carlos Martín Nieto [Thu, 31 Mar 2016 11:12:46 +0000 (04:12 -0700)]
Merge pull request #3575 from pmq20/master-13jan16

Remove duplicated calls to git_mwindow_close

8 years agoMerge pull request #3715 from pks-t/pks/xprepare-memleak
Carlos Martín Nieto [Thu, 31 Mar 2016 10:50:11 +0000 (03:50 -0700)]
Merge pull request #3715 from pks-t/pks/xprepare-memleak

xprepare memleaks

8 years agoAdd a no-op size_t typedef for the doc parser
Carlos Martín Nieto [Thu, 31 Mar 2016 09:35:53 +0000 (11:35 +0200)]
Add a no-op size_t typedef for the doc parser

Clang's documentation parser, which we use in our documentation system
does not report any comments for functions which use size_t as a type.

The root cause is buried somewhere in libclang but we can work around it
by defining the type ourselves. This typedef makes sure that libclang
sees it and that we do not change its size.

8 years agoxdiff/xprepare: fix a memory leak
Patrick Steinhardt [Thu, 31 Mar 2016 09:32:36 +0000 (11:32 +0200)]
xdiff/xprepare: fix a memory leak

The xdl_prepare_env() function may initialise an xdlclassifier_t
data structure via xdl_init_classifier(), which allocates memory
to several fields, for example 'rchash', 'rcrecs' and 'ncha'.
If this function later exits due to the failure of xdl_optimize_ctxs(),
then this xdlclassifier_t structure, and the memory allocated to it,
is not cleaned up.

In order to fix the memory leak, insert a call to xdl_free_classifier()
before returning.

This patch was originally written by Ramsay Jones (see commit
87f16258367a3b9a62663b11f898a4a6f3c19d31 in git.git).

8 years agoxdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits
Patrick Steinhardt [Thu, 31 Mar 2016 09:30:31 +0000 (11:30 +0200)]
xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits

Commit 307ab20b3 ("xdiff: PATIENCE/HISTOGRAM are not independent option
bits", 19-02-2012) introduced the XDF_DIFF_ALG() macro to access the
flag bits used to represent the diff algorithm requested. In addition,
code which had used explicit manipulation of the flag bits was changed
to use the macros.

However, one example of direct manipulation remains. Update this code to
use the XDF_DIFF_ALG() macro.

This patch was originally written by Ramsay Jones (see commit
5cd6978a9cfef58de061a9525f3678ade479564d in git.git).

8 years agoMerge pull request #3712 from ethomson/config_duplicate_section
Carlos Martín Nieto [Tue, 29 Mar 2016 10:26:43 +0000 (03:26 -0700)]
Merge pull request #3712 from ethomson/config_duplicate_section

config: don't write duplicate section

8 years agoMerge pull request #3703 from libgit2/cmn/multivar-set-locked
Edward Thomson [Mon, 28 Mar 2016 17:51:21 +0000 (13:51 -0400)]
Merge pull request #3703 from libgit2/cmn/multivar-set-locked

config: don't special-case multivars that don't exist yet

8 years agoconfig::write::repeated: init our buffer
Edward Thomson [Mon, 28 Mar 2016 15:56:13 +0000 (08:56 -0700)]
config::write::repeated: init our buffer

8 years agoconfig: don't write section header if we're in it
Edward Thomson [Mon, 28 Mar 2016 15:13:51 +0000 (11:13 -0400)]
config: don't write section header if we're in it

If we hit the EOF while trying to write a new value, it may be that
we're already in the section that we were looking for.  If so, do not
write a (duplicate) section header, just write the value.

8 years agoconfig: show we write a spurious duplicated section header
Carlos Martín Nieto [Fri, 4 Mar 2016 13:51:16 +0000 (14:51 +0100)]
config: show we write a spurious duplicated section header

We should notice that we are in the correct section to add. This is a
cosmetic bug, since replacing any of these settings does work.

8 years agoMerge pull request #3708 from sschuberth/master
Edward Thomson [Mon, 28 Mar 2016 13:50:31 +0000 (09:50 -0400)]
Merge pull request #3708 from sschuberth/master

CMakeLists: Further improve the error messages regarding CMAKE_SIZEOF_VOID_P

8 years agoMerge pull request #3691 from ethomson/iterators
Carlos Martín Nieto [Sat, 26 Mar 2016 12:39:07 +0000 (05:39 -0700)]
Merge pull request #3691 from ethomson/iterators

Some FANTASTIC iterator refactoring

8 years agoiterator: comment fixed
Marc Strapetz [Tue, 22 Mar 2016 09:30:07 +0000 (10:30 +0100)]
iterator: comment fixed

8 years agoiterator: unused includes removed
Marc Strapetz [Tue, 22 Mar 2016 09:29:41 +0000 (10:29 +0100)]
iterator: unused includes removed

8 years agoiterator: new workdir-iterator test for pathlist + includings trees
Marc Strapetz [Tue, 22 Mar 2016 09:29:12 +0000 (10:29 +0100)]
iterator: new workdir-iterator test for pathlist + includings trees

8 years agoiterator: new index-iterator test for pathlist + includings trees
Marc Strapetz [Tue, 22 Mar 2016 09:28:50 +0000 (10:28 +0100)]
iterator: new index-iterator test for pathlist + includings trees

8 years agoiterator: more pathlist-related tests should test actual paths
Marc Strapetz [Tue, 22 Mar 2016 09:27:50 +0000 (10:27 +0100)]
iterator: more pathlist-related tests should test actual paths

8 years agoiterator: cleanups
Edward Thomson [Mon, 21 Mar 2016 21:19:24 +0000 (17:19 -0400)]
iterator: cleanups

Remove some unused functions, refactor some ugliness.

8 years agoiterator: don't run the gunk test by default on CI
Edward Thomson [Mon, 21 Mar 2016 22:30:21 +0000 (18:30 -0400)]
iterator: don't run the gunk test by default on CI

(It's slow!)

8 years agoiterator: refactor empty iterator to new style
Edward Thomson [Mon, 21 Mar 2016 21:03:00 +0000 (17:03 -0400)]
iterator: refactor empty iterator to new style

8 years agoiterator: mandate `advance_over`
Edward Thomson [Mon, 21 Mar 2016 20:51:45 +0000 (16:51 -0400)]
iterator: mandate `advance_over`

Since the three iterators implement `advance_over` differently,
mandate it and implement each.

8 years agoiterator: refactor index iterator
Edward Thomson [Mon, 21 Mar 2016 16:54:47 +0000 (12:54 -0400)]
iterator: refactor index iterator

8 years agoIntroduce `git_path_common_dirlen`
Edward Thomson [Fri, 18 Mar 2016 21:33:46 +0000 (17:33 -0400)]
Introduce `git_path_common_dirlen`

8 years agoiterator: move the index into the iterator itself
Edward Thomson [Fri, 18 Mar 2016 16:59:35 +0000 (12:59 -0400)]
iterator: move the index into the iterator itself

8 years agoiterator: give the tests a proper hierarchy
Edward Thomson [Fri, 18 Mar 2016 14:59:38 +0000 (10:59 -0400)]
iterator: give the tests a proper hierarchy

Iterator tests were split over repo::iterator and diff::iterator,
with duplication between the two.  Move them to iterator::index,
iterator::tree, and iterator::workdir.

8 years agoMerge pull request #3574 from chescock/buffer-sideband-pack-data
Carlos Martín Nieto [Thu, 24 Mar 2016 13:56:25 +0000 (06:56 -0700)]
Merge pull request #3574 from chescock/buffer-sideband-pack-data

Buffer sideband packet data

8 years agoCMakeLists: Further improve the error messages regarding CMAKE_SIZEOF_VOID_P
Sebastian Schuberth [Thu, 24 Mar 2016 13:10:29 +0000 (14:10 +0100)]
CMakeLists: Further improve the error messages regarding CMAKE_SIZEOF_VOID_P

8 years agoAdded clar test for #3568
Jeff Hostetler [Mon, 4 Jan 2016 17:12:24 +0000 (12:12 -0500)]
Added clar test for #3568

8 years agodiff: stop processing nitem when its removed
Edward Thomson [Thu, 17 Mar 2016 19:29:21 +0000 (15:29 -0400)]
diff: stop processing nitem when its removed

When a directory is removed out from underneath us, stop trying to
manipulate it.

8 years agoiterator: drop `advance_into_or_over`
Edward Thomson [Thu, 17 Mar 2016 19:19:45 +0000 (15:19 -0400)]
iterator: drop `advance_into_or_over`

Now that iterators do not return `GIT_ENOTFOUND` when advancing
into an empty directory, we do not need a special `advance_into_or_over`
function.

8 years agoiterator: test that we can `advance_into` empty dirs
Edward Thomson [Thu, 17 Mar 2016 19:09:38 +0000 (15:09 -0400)]
iterator: test that we can `advance_into` empty dirs

Prior iterator implementations returned `GIT_ENOTFOUND` when
trying to advance into empty directories.  Ensure that we no longer
do that and simply handle them gracefully.

8 years agoFailing test.
joshaber [Wed, 10 Feb 2016 18:46:14 +0000 (13:46 -0500)]
Failing test.

8 years agoiterator: test pathlist handling for directories
Marc Strapetz [Wed, 16 Mar 2016 10:38:02 +0000 (11:38 +0100)]
iterator: test pathlist handling for directories

tree_iterator was only working properly for a pathlist containing
file paths. In case of directory paths, it didn't match children
which contradicts GIT_DIFF_DISABLE_PATHSPEC_MATCH and
is different from index_iterator and fs_iterator.

As a consequence head-to-index status reporting for a specific
directory did not work properly -- all files have been reported
as added.

Include additional tests.

8 years agoiterator: test `advance_over` with a pathlist
Edward Thomson [Wed, 16 Mar 2016 21:14:36 +0000 (17:14 -0400)]
iterator: test `advance_over` with a pathlist

8 years agoiterator: add tests for advance_over
Edward Thomson [Wed, 16 Mar 2016 20:29:38 +0000 (16:29 -0400)]
iterator: add tests for advance_over

`git_iterator_advance_over` is a gnarly bit of code with no actual
tests.

8 years agoiterator: test workdir pathlist with deep paths
Edward Thomson [Wed, 16 Mar 2016 17:31:35 +0000 (13:31 -0400)]
iterator: test workdir pathlist with deep paths

In the workdir iterator we do some tricky things to step down into
directories to look for things that are in our pathlist.  Make sure
that we don't confuse between folders that we're definitely going to
return everything in and folders that we're only stepping down into
to keep looking for matches.

8 years agoiterator: workdir tests with submodules
Edward Thomson [Wed, 16 Mar 2016 16:15:55 +0000 (12:15 -0400)]
iterator: workdir tests with submodules

Ensure that when specifying start/end paths, or pathlists, that we
deal correctly with submodules.

8 years agoiterator: expand workdir tests with pathlist
Edward Thomson [Wed, 16 Mar 2016 15:45:44 +0000 (11:45 -0400)]
iterator: expand workdir tests with pathlist

Expand the workdir tests to validate the paths in case sensitive
and insensitive tests.

8 years agoiterator: test that we're at the end of iteration
Edward Thomson [Wed, 16 Mar 2016 14:17:20 +0000 (10:17 -0400)]
iterator: test that we're at the end of iteration

Ensure that we have hit the end of iteration; previously we tested
that we saw all the values that we expected to see.  We did not
then ensure that we were at the end of the iteration (and that there
were subsequently values in the iteration that we did *not* expect.)

8 years agoiterator: combine fs+workdir iterators more completely
Edward Thomson [Thu, 10 Mar 2016 05:04:26 +0000 (00:04 -0500)]
iterator: combine fs+workdir iterators more completely

Drop some of the layers of indirection between the workdir and the
filesystem iterators.  This makes the code a little bit easier to
follow, and reduces the number of unnecessary allocations a bit as
well.  (Prior to this, when we filter entries, we would allocate them,
filter them and then free them; now we do the filtering before
allocation.)

Also, rename `git_iterator_advance_over_with_status` to just
`git_iterator_advance_over`.  Mostly because it's a fucking long-ass
function name otherwise.

8 years agoiterator: test fs iterator w/ many nested empty dirs
Edward Thomson [Thu, 10 Mar 2016 17:54:33 +0000 (12:54 -0500)]
iterator: test fs iterator w/ many nested empty dirs

8 years agoiterator: skip unreadable directories in fs iterator
Edward Thomson [Thu, 10 Mar 2016 16:07:13 +0000 (11:07 -0500)]
iterator: skip unreadable directories in fs iterator

Do not abort iteration in the middle when encountering an unreadable
directory.  Instead, skip it, as if it didn't exist.

8 years agocheckout: provide internal func to compute target path
Edward Thomson [Fri, 11 Mar 2016 16:27:58 +0000 (11:27 -0500)]
checkout: provide internal func to compute target path

Many code paths in checkout need the final, full on-disk path of the
file they're writing.  (No surprise).  However, they all munge the
`data->path` buffer themselves to get there.  Provide a nice helper
method for them.

Plus, drop the use `git_iterator_current_workdir_path` which does the
same thing but different.  Checkout is the only caller of this silly
function, which lets us remove it.

8 years agoiterators: refactored tree iterator
Edward Thomson [Thu, 25 Feb 2016 21:05:18 +0000 (16:05 -0500)]
iterators: refactored tree iterator

Refactored the tree iterator to never recurse; simply process the
next entry in order in `advance`.  Additionally, reduce the number of
allocations and sorting as much as possible to provide a ~30% speedup
on case-sensitive iteration.  (The gains for case-insensitive iteration
are less majestic.)

8 years agorepo::iterator: don't go out of bounds
Edward Thomson [Wed, 2 Mar 2016 20:38:13 +0000 (15:38 -0500)]
repo::iterator: don't go out of bounds

8 years agogit_object_dup: introduce typesafe versions
Edward Thomson [Wed, 17 Feb 2016 18:04:19 +0000 (18:04 +0000)]
git_object_dup: introduce typesafe versions

8 years agoiterator: disambiguate reset and reset_range
Edward Thomson [Thu, 25 Feb 2016 20:11:14 +0000 (15:11 -0500)]
iterator: disambiguate reset and reset_range

Disambiguate the reset and reset_range functions.  Now reset_range
with a NULL path will clear the start or end; reset will leave the
existing start and end unchanged.

8 years agoiterator: drop unused/unimplemented `seek`
Edward Thomson [Thu, 25 Feb 2016 19:51:23 +0000 (14:51 -0500)]
iterator: drop unused/unimplemented `seek`

8 years agostatus: update test to include valid OID
Edward Thomson [Thu, 17 Mar 2016 04:47:50 +0000 (00:47 -0400)]
status: update test to include valid OID

8 years agoMerge pull request #3707 from sschuberth/master
Edward Thomson [Wed, 23 Mar 2016 20:14:04 +0000 (13:14 -0700)]
Merge pull request #3707 from sschuberth/master

CMakeLists: Show the pointer size for an unsupported architecture

8 years agoCMakeLists: Show the pointer size for an unsupported architecture
Sebastian Schuberth [Wed, 23 Mar 2016 19:37:39 +0000 (20:37 +0100)]
CMakeLists: Show the pointer size for an unsupported architecture

Showing the pointer size gives a hint as to why we think this is an
unsupported architecture.

8 years agoarray: fix search for empty arrays
Carlos Martín Nieto [Wed, 23 Mar 2016 15:51:52 +0000 (16:51 +0100)]
array: fix search for empty arrays

When the array is empty `cmp` never gets set by the comparison
function. Initialize it so we return ENOTFOUND in those cases.

8 years agoMerge pull request #3704 from ethomson/tree-reuse
Carlos Martín Nieto [Wed, 23 Mar 2016 10:45:53 +0000 (03:45 -0700)]
Merge pull request #3704 from ethomson/tree-reuse

tree: drop the now-unnecessary entries vector

8 years agoMerge pull request #3502 from libgit2/cmn/createblob-stream
Carlos Martín Nieto [Tue, 22 Mar 2016 21:34:35 +0000 (14:34 -0700)]
Merge pull request #3502 from libgit2/cmn/createblob-stream

Add ability to write a filtered blob through a stream

8 years agoblob: remove _fromchunks()
Carlos Martín Nieto [Sun, 8 Nov 2015 03:28:08 +0000 (04:28 +0100)]
blob: remove _fromchunks()

The callback mechanism makes it awkward to write data from an IO
source; move to `_fromstream()` which lets the caller remain in control,
in the same vein as we prefer iterators over foreach callbacks.

8 years agoCHANGELOG: add a note about _fromstream() and _fromstream_commit()
Carlos Martín Nieto [Wed, 4 Nov 2015 18:39:55 +0000 (10:39 -0800)]
CHANGELOG: add a note about _fromstream() and _fromstream_commit()

8 years agoblob: fix fromchunks iteration counter
Carlos Martín Nieto [Wed, 4 Nov 2015 18:36:50 +0000 (10:36 -0800)]
blob: fix fromchunks iteration counter

By returning when the count goes to zero rather than below it, setting
`howmany` to 7 in fact writes out the string 6 times.

Correct the termination condition to write out the string the amount of
times we specify.

8 years agoblob: introduce creating a blob by writing into a stream
Carlos Martín Nieto [Wed, 4 Nov 2015 18:30:48 +0000 (10:30 -0800)]
blob: introduce creating a blob by writing into a stream

The pair of `git_blob_create_frombuffer()` and
`git_blob_create_frombuffer_commit()` is meant to replace
`git_blob_create_fromchunks()` by providing a way for a user to write a
new blob when they want filtering or they do not know the size.

This approach allows the caller to retain control over when to add data
to this buffer and a more natural fit into higher-level language's own
stream abstractions instead of having to handle IO wait in the callback.

The in-memory buffer size of 2MB is chosen somewhat arbitrarily to be a
round multiple of usual page sizes and a value where most blobs seem
likely to be either going to be way below or way over that size. It's
also a round number of pages.

This implementation re-uses the helper we have from `_fromchunks()` so
we end up writing everything to disk, but hopefully more efficiently
than with a default filebuf. A later optimisation can be to avoid
writing the in-memory contents to disk, with some extra complexity.

8 years agofilebuf: allow using a custom buffer size
Carlos Martín Nieto [Wed, 4 Nov 2015 17:20:14 +0000 (09:20 -0800)]
filebuf: allow using a custom buffer size

Allow setting the buffer size on open in order to use this data
structure more generally as a spill buffer, with larger buffer sizes for
specific use-cases.

8 years agotree: drop the now-unnecessary entries vector
Edward Thomson [Tue, 22 Mar 2016 04:18:44 +0000 (00:18 -0400)]
tree: drop the now-unnecessary entries vector

Remove the now-unnecessary entries vector.  Add `git_array_search`
to binary search through an array to accomplish this.

8 years agoMerge pull request #3559 from yongthecoder/master
Carlos Martín Nieto [Tue, 22 Mar 2016 08:54:49 +0000 (01:54 -0700)]
Merge pull request #3559 from yongthecoder/master

Add a sanity check in git_indexer_commit to avoid subtraction overflow.

8 years agoMerge pull request #3701 from jfultz/fix-0.24.0-changelog
Carlos Martín Nieto [Tue, 22 Mar 2016 07:44:05 +0000 (00:44 -0700)]
Merge pull request #3701 from jfultz/fix-0.24.0-changelog

Fix some errors I found in the changelog for 0.24.0

8 years agoMerge pull request #3702 from libgit2/cmn/tree-reuse
Edward Thomson [Tue, 22 Mar 2016 04:29:33 +0000 (21:29 -0700)]
Merge pull request #3702 from libgit2/cmn/tree-reuse

Reuse a tree's buffer and allocate constant-sized entries in an array

8 years agoconfig: don't special-case multivars that don't exist yet
Carlos Martín Nieto [Mon, 21 Mar 2016 20:10:26 +0000 (21:10 +0100)]
config: don't special-case multivars that don't exist yet

This special-casing ignores that we might have a locked file, so the
hashtable does not represent the contents of the file we want to
write. This causes multivar writes to overwrite entries instead of add
to them when under lock.

There is no need for this as the normal code-path will write to the file
just fine, so simply get rid of it.

8 years agotree: store the entries in a growable array
Carlos Martín Nieto [Sun, 20 Mar 2016 11:01:45 +0000 (12:01 +0100)]
tree: store the entries in a growable array

Take advantage of the constant size of tree-owned arrays and store them
in an array instead of a pool. This still lets us free them all at once
but lets the system allocator do the work of fitting them in.

8 years agotree: re-use the id and filename in the odb object
Carlos Martín Nieto [Sun, 20 Mar 2016 10:00:12 +0000 (11:00 +0100)]
tree: re-use the id and filename in the odb object

Instead of copying over the data into the individual entries, point to
the originals, which are already in a format we can use.

8 years agoFix some errors I found in the changelog for 0.24.0
John Fultz [Fri, 18 Mar 2016 20:03:08 +0000 (15:03 -0500)]
Fix some errors I found in the changelog for 0.24.0

8 years agoMerge pull request #3699 from libgit2/cmn/win32-free-tls
Edward Thomson [Fri, 18 Mar 2016 13:37:41 +0000 (06:37 -0700)]
Merge pull request #3699 from libgit2/cmn/win32-free-tls

win32: free thread-local data on thread exit

8 years agowin32: free thread-local data on thread exit
Carlos Martin Nieto [Fri, 18 Mar 2016 20:00:27 +0000 (13:00 -0700)]
win32: free thread-local data on thread exit

8 years agoMerge pull request #3660 from mstrap/mingw
Edward Thomson [Fri, 18 Mar 2016 13:37:04 +0000 (06:37 -0700)]
Merge pull request #3660 from mstrap/mingw

MinGW builds should optionally create DLLs without "lib" prefix

8 years agoMerge pull request #3564 from ethomson/merge_drivers
Carlos Martín Nieto [Thu, 17 Mar 2016 17:01:37 +0000 (18:01 +0100)]
Merge pull request #3564 from ethomson/merge_drivers

Custom merge drivers and proper gitattributes `merge` handling

8 years agoMerge pull request #3695 from ethomson/contributing
Carlos Martín Nieto [Thu, 17 Mar 2016 16:25:49 +0000 (17:25 +0100)]
Merge pull request #3695 from ethomson/contributing

CONTRIBUTING: document the optional tests

8 years agoCONTRIBUTING: document the optional tests
Edward Thomson [Thu, 17 Mar 2016 16:01:37 +0000 (12:01 -0400)]
CONTRIBUTING: document the optional tests

8 years agomerge drivers: handle configured but not found driver
Edward Thomson [Mon, 29 Feb 2016 02:30:00 +0000 (21:30 -0500)]
merge drivers: handle configured but not found driver

8 years agomerge driver: remove `check` callback
Edward Thomson [Sun, 28 Feb 2016 14:34:11 +0000 (09:34 -0500)]
merge driver: remove `check` callback

Since the `apply` callback can defer, the `check` callback is not
necessary.  Removing the `check` callback further makes the `payload`
unnecessary along with the `cleanup` callback.

8 years agomerge driver: improve inline documentation
Edward Thomson [Sat, 27 Feb 2016 21:57:12 +0000 (16:57 -0500)]
merge driver: improve inline documentation

8 years agomerge driver: correct global initialization
Edward Thomson [Sat, 27 Feb 2016 21:42:02 +0000 (16:42 -0500)]
merge driver: correct global initialization

8 years agomerge driver: get a pointer to favor
Edward Thomson [Sun, 7 Feb 2016 23:58:34 +0000 (15:58 -0800)]
merge driver: get a pointer to favor

8 years agomerge driver: correct indentation
Edward Thomson [Sun, 7 Feb 2016 23:19:43 +0000 (15:19 -0800)]
merge driver: correct indentation

8 years agomerge driver: tests for set and unset merge attribute
Edward Thomson [Sat, 26 Dec 2015 19:47:17 +0000 (19:47 +0000)]
merge driver: tests for set and unset merge attribute

Ensure that setting the merge attribute forces the built-in default
`text` driver and does *not* honor the `merge.default` configuration
option.  Further ensure that unsetting the merge attribute forces
a conflict (the `binary` driver).

8 years agomerge driver: tests for custom default merge drivers
Edward Thomson [Fri, 25 Dec 2015 06:34:39 +0000 (00:34 -0600)]
merge driver: tests for custom default merge drivers

8 years agomerge driver: allow custom default driver
Edward Thomson [Fri, 25 Dec 2015 04:52:23 +0000 (22:52 -0600)]
merge driver: allow custom default driver

Allow merge users to configure a custom default merge driver via
`git_merge_options`.  Similarly, honor the `merge.default` configuration
option.

8 years agomerge driver: test GIT_EMERGECONFLICT
Edward Thomson [Thu, 24 Dec 2015 05:52:02 +0000 (23:52 -0600)]
merge driver: test GIT_EMERGECONFLICT

When a `check` or `apply` callback function returns `GIT_EMERGECONFLICT`
stop and product a conflict.

8 years agomerge driver: test GIT_PASSTHROUGH
Edward Thomson [Thu, 24 Dec 2015 05:44:58 +0000 (23:44 -0600)]
merge driver: test GIT_PASSTHROUGH

When a `check` or `apply` callback function returns `GIT_PASSTHROUGH`,
move on to the default merge driver.

8 years agomerge driver: introduce custom merge drivers
Edward Thomson [Wed, 23 Dec 2015 16:23:08 +0000 (10:23 -0600)]
merge driver: introduce custom merge drivers

Consumers can now register custom merged drivers with
`git_merge_driver_register`.  This allows consumers to support the
merge drivers, as configured in `.gitattributes`.  Consumers will be
asked to perform the file-level merge when a custom driver is
configured.

8 years agoFix rebase bug and include test for merge=union
Stan Hu [Thu, 3 Dec 2015 17:57:56 +0000 (09:57 -0800)]
Fix rebase bug and include test for merge=union

8 years agoSupport union merges via .gitattributes file
Stan Hu [Sat, 31 Oct 2015 17:50:13 +0000 (18:50 +0100)]
Support union merges via .gitattributes file

8 years agoMerge pull request #3673 from libgit2/cmn/commit-with-signature
Edward Thomson [Thu, 17 Mar 2016 13:57:56 +0000 (06:57 -0700)]
Merge pull request #3673 from libgit2/cmn/commit-with-signature

commit: add function to attach a signature to a commit

8 years agoMerge pull request #3685 from pks-t/pks/memleaks
Edward Thomson [Thu, 17 Mar 2016 13:55:24 +0000 (06:55 -0700)]
Merge pull request #3685 from pks-t/pks/memleaks

Test memleaks

8 years agoMerge pull request #3687 from mstrap/CMAKE_C_FLAGS_DEBUG
Edward Thomson [Thu, 17 Mar 2016 13:54:03 +0000 (06:54 -0700)]
Merge pull request #3687 from mstrap/CMAKE_C_FLAGS_DEBUG

CMake: do not overwrite but only append to CMAKE_C_FLAGS_DEBUG

8 years agoMerge pull request #3693 from libgit2/cmn/extract-oneline-sig
Edward Thomson [Thu, 17 Mar 2016 13:43:54 +0000 (06:43 -0700)]
Merge pull request #3693 from libgit2/cmn/extract-oneline-sig

commit: fix extraction of single-line signatures

8 years agocommit: fix extraction of single-line signatures
Carlos Martín Nieto [Thu, 17 Mar 2016 09:45:22 +0000 (10:45 +0100)]
commit: fix extraction of single-line signatures

The function to extract signatures suffers from a similar bug to the
header field finding one by having an unecessary line feed check as a
break condition of its loop.

Fix that and add a test for this single-line signature situation.

8 years agoMerge pull request #3690 from libgit2/cmn/pool-limit
Edward Thomson [Wed, 16 Mar 2016 21:12:14 +0000 (14:12 -0700)]
Merge pull request #3690 from libgit2/cmn/pool-limit

win32: choose the page size as our value for the page size

8 years agoSplit the page size from the mmap alignment
Carlos Martín Nieto [Wed, 16 Mar 2016 18:05:11 +0000 (19:05 +0100)]
Split the page size from the mmap alignment

While often similar, these are not the same on Windows. We want to use the page
size on Windows for the pools, but for mmap we need to use the allocation
granularity as the alignment.

On the other platforms these values remain the same.

8 years agoOption "LIBGIT2_PREFIX" to set the CMAKE's TARGET_PROPERTIES PREFIX
Marc Strapetz [Tue, 15 Mar 2016 17:32:37 +0000 (18:32 +0100)]
Option "LIBGIT2_PREFIX" to set the CMAKE's TARGET_PROPERTIES PREFIX

This is especially useful in combination with MinGW to yield the
Windows-compliant DLL name "git2.dll" instead of "libgit2.dll"

8 years agoCMake: do not overwrite but only append to CMAKE_C_FLAGS_DEBUG
Marc Strapetz [Tue, 15 Mar 2016 17:20:32 +0000 (18:20 +0100)]
CMake: do not overwrite but only append to CMAKE_C_FLAGS_DEBUG

This is useful to force "smart" IDEs (like CLIon) to use debug
flag -g even it may have decided that "-D_DEBUG" (which is
already present) is sufficient.

8 years agocommit: add function to attach a signature to a commit
Carlos Martín Nieto [Thu, 10 Mar 2016 09:53:20 +0000 (10:53 +0100)]
commit: add function to attach a signature to a commit

In combination with the function which creates a commit into a buffer,
this allows us to more easily create signed commits.

8 years agoMerge pull request #3677 from pks-t/pks/coverity-fixes-round7
Carlos Martín Nieto [Mon, 14 Mar 2016 18:15:20 +0000 (19:15 +0100)]
Merge pull request #3677 from pks-t/pks/coverity-fixes-round7

Coverity fixes round 7