]> git.proxmox.com Git - libgit2.git/log
libgit2.git
8 years agoiterator: ignore submodule in has_ended
Edward Thomson [Thu, 21 Apr 2016 14:58:22 +0000 (10:58 -0400)]
iterator: ignore submodule in has_ended

8 years agoMerge pull request #3110 from libgit2/cmn/proxy-config
Edward Thomson [Tue, 19 Apr 2016 23:48:52 +0000 (19:48 -0400)]
Merge pull request #3110 from libgit2/cmn/proxy-config

Proxy configuration

8 years agoCI: download the proxy jar also on mingw
Carlos Martín Nieto [Tue, 19 Apr 2016 21:05:16 +0000 (23:05 +0200)]
CI: download the proxy jar also on mingw

We were downloading the jar from within an block which only runs for
MSVC. Move the download to the start of the test so it gets downloaded
for both.

8 years agoMerge pull request #3745 from libgit2/cmn/ignore-starstar
Edward Thomson [Tue, 19 Apr 2016 19:24:14 +0000 (15:24 -0400)]
Merge pull request #3745 from libgit2/cmn/ignore-starstar

Improve star-star matching

8 years agoignore: move star-star matching closer to it use
Carlos Martín Nieto [Mon, 18 Apr 2016 14:05:12 +0000 (16:05 +0200)]
ignore: move star-star matching closer to it use

Instead of threading the state down to the larger loop, let's have the
loop where we detect the double star so each of them are easier to read.

8 years agoignore: fix directory limits when searching for star-star
Carlos Martín Nieto [Mon, 18 Apr 2016 11:34:18 +0000 (13:34 +0200)]
ignore: fix directory limits when searching for star-star

In order to match the star-star, we disable the flag that's looking for
a single path element, but that leads to searching for the pattern in
the middle of elements in the input string.

Mark when we're handing a star-star so we jump over the elements in our
attempt to match the part of the pattern that comes after the star-star.

While here, tighten up the check so we don't allow invalid rules
through.

8 years agoCI: run proxy tests with ctest
Carlos Martín Nieto [Tue, 19 Apr 2016 08:50:30 +0000 (10:50 +0200)]
CI: run proxy tests with ctest

Running clar directly on appveyor makes it think the command returned
failure, so it stops the tests. Running it via ctest lets it go through.

8 years agoproxy: don't specify the protocol in the type
Carlos Martín Nieto [Mon, 14 Mar 2016 16:36:04 +0000 (17:36 +0100)]
proxy: don't specify the protocol in the type

We leave this up to the scheme in the url field. The type should only
tell us about whether we want a proxy and whether we want to auto-detect
it.

8 years agoCI: start the proxy before the build so it's ready
Carlos Martín Nieto [Mon, 14 Mar 2016 12:42:10 +0000 (13:42 +0100)]
CI: start the proxy before the build so it's ready

It takes a bit for the propxy to get ready to accept connections, so
start it before the build so we can be reasonably sure that it's going
to be ready in time.

8 years agowinhttp: correctly detect HTTPS usage
Carlos Martín Nieto [Wed, 30 Sep 2015 15:42:53 +0000 (17:42 +0200)]
winhttp: correctly detect HTTPS usage

8 years agocurl: ask for proxy credentials
Carlos Martín Nieto [Fri, 2 Oct 2015 08:11:43 +0000 (10:11 +0200)]
curl: ask for proxy credentials

8 years agoproxy: add a payload field for the proxy options
Carlos Martín Nieto [Fri, 2 Oct 2015 08:10:13 +0000 (10:10 +0200)]
proxy: add a payload field for the proxy options

I don't quite recall what we do in the other places where we use this,
but we should pass this payload to the callbacks.

8 years agonet: use proxy options struct in the stream config
Carlos Martín Nieto [Mon, 21 Sep 2015 20:38:50 +0000 (22:38 +0200)]
net: use proxy options struct in the stream config

8 years agoproxy: don't require the trailing slash on WinHTTP
Carlos Martín Nieto [Wed, 23 Sep 2015 02:39:05 +0000 (04:39 +0200)]
proxy: don't require the trailing slash on WinHTTP

The path is not something that you use for proxies, so make use of the
new optionality of the path when extracting URL parts.

8 years agoproxy: test proxy support on Travis
Carlos Martín Nieto [Mon, 21 Sep 2015 19:40:37 +0000 (21:40 +0200)]
proxy: test proxy support on Travis

8 years agonetops: make the path optional in URLs
Carlos Martín Nieto [Mon, 21 Sep 2015 19:11:02 +0000 (21:11 +0200)]
netops: make the path optional in URLs

When we're dealing with proxy addresses, we only want a hostname and
port, and the user would not provide a path, so make it optional so we
can use this same function to parse git as well as proxy URLs.

8 years agoproxy: use poxy to test our Windows proxy support
Carlos Martín Nieto [Wed, 29 Jul 2015 19:23:56 +0000 (21:23 +0200)]
proxy: use poxy to test our Windows proxy support

8 years agoproxy: ask the user for credentials if necessary
Carlos Martín Nieto [Thu, 7 May 2015 10:57:56 +0000 (12:57 +0200)]
proxy: ask the user for credentials if necessary

8 years agoproxy: introduce a proxy options struct
Carlos Martín Nieto [Mon, 11 May 2015 14:35:24 +0000 (16:35 +0200)]
proxy: introduce a proxy options struct

It is currently unused; it will go into the remote's options.

8 years agoAdd more tests for path matching with globs and path delimiters
Antonio Scandurra [Thu, 31 Mar 2016 15:38:40 +0000 (17:38 +0200)]
Add more tests for path matching with globs and path delimiters

8 years agoMerge pull request #3740 from Qix-/patch-1
Carlos Martín Nieto [Wed, 13 Apr 2016 09:51:05 +0000 (11:51 +0200)]
Merge pull request #3740 from Qix-/patch-1

Add missing ')' to callbacks documentation

8 years agoAdd missing ')' to callbacks documentation
Josh Junon [Wed, 13 Apr 2016 04:50:18 +0000 (21:50 -0700)]
Add missing ')' to callbacks documentation

Super minor, but it was bugging me.

There was a missing closing paren in the docs.

8 years agoMerge pull request #3738 from ethomson/test_as_root
Carlos Martín Nieto [Mon, 11 Apr 2016 22:14:00 +0000 (00:14 +0200)]
Merge pull request #3738 from ethomson/test_as_root

tests: skip the unreadable file tests as root

8 years agotests: skip the unreadable file tests as root
Edward Thomson [Mon, 11 Apr 2016 17:39:31 +0000 (13:39 -0400)]
tests: skip the unreadable file tests as root

When running as root, skip the unreadable file tests, because, well,
they're probably _not_ unreadable to root unless you've got some
crazy NSA clearance-level honoring operating system shit going on.

8 years agoMerge pull request #3736 from libgit2/cmn/dwim-general-message
Edward Thomson [Mon, 11 Apr 2016 17:29:54 +0000 (13:29 -0400)]
Merge pull request #3736 from libgit2/cmn/dwim-general-message

refs: provide a more general error message for dwim

8 years agoMerge pull request #3737 from ethomson/strict-object
Carlos Martín Nieto [Mon, 11 Apr 2016 17:24:47 +0000 (19:24 +0200)]
Merge pull request #3737 from ethomson/strict-object

Strict object creation in `refs::create`

8 years agorefs::create: strict object creation on by default
Edward Thomson [Mon, 11 Apr 2016 15:50:11 +0000 (11:50 -0400)]
refs::create: strict object creation on by default

When we turned strict object creation validation on by default, we
forgot to inform the refs::create tests of this.  They, in fact,
believed that strict object creation was off by default.  As a result,
their cleanup function went and turned strict object creation off for
the remaining tests.

8 years agoreset: use real ids for the tests
Carlos Martín Nieto [Mon, 11 Apr 2016 09:37:02 +0000 (11:37 +0200)]
reset: use real ids for the tests

This lets us run with strict object creation on.

8 years agorefs: provide a more general error message for dwim
Carlos Martín Nieto [Mon, 11 Apr 2016 15:43:07 +0000 (17:43 +0200)]
refs: provide a more general error message for dwim

If we cannot dwim the input, set the error message to be explicit about
that. Otherwise we leave the error for the last failed lookup, which
can be rather unexpected as it mentions a remote when the user thought
they were trying to look up a branch.

8 years agoMerge pull request #3730 from andhe/fix-stream-test
Edward Thomson [Wed, 6 Apr 2016 19:59:31 +0000 (15:59 -0400)]
Merge pull request #3730 from andhe/fix-stream-test

tests: fix core/stream test when built with openssl off

8 years agotests: fix core/stream test when built with openssl off
Andreas Henriksson [Wed, 6 Apr 2016 08:37:30 +0000 (10:37 +0200)]
tests: fix core/stream test when built with openssl off

When passing -DUSE_OPENSSL:BOOL=OFF to cmake the testsuite will
fail with the following error:

core::stream::register_tls [/tmp/libgit2/tests/core/stream.c:40]
  Function call failed: (error)
  error -1 - <no message>

Fix test to assume failure for tls when built without openssl.
While at it also fix GIT_WIN32 cpp to check if it's defined
or not.

8 years agoMerge pull request #3728 from libgit2/cmn/no-embed
Edward Thomson [Tue, 5 Apr 2016 18:47:02 +0000 (14:47 -0400)]
Merge pull request #3728 from libgit2/cmn/no-embed

Remove Makefile.embed

8 years agoRemove Makefile.embed
Carlos Martín Nieto [Tue, 5 Apr 2016 17:25:23 +0000 (13:25 -0400)]
Remove Makefile.embed

This has not been a supported build mode for quite some time, and it
correspondingly hasn't worked to build the library for a long time. Get
rid of it, as the only build mode we support is though CMakek.

8 years agoMerge pull request #3724 from ethomson/submodule_start_supports_silly_slashes
Carlos Martín Nieto [Sun, 3 Apr 2016 05:19:42 +0000 (22:19 -0700)]
Merge pull request #3724 from ethomson/submodule_start_supports_silly_slashes

iterator/diff: allow trailing `/` on start/end paths to match submodules

8 years agoMerge pull request #3723 from libgit2/cmn/ignore-symlink
Edward Thomson [Sat, 2 Apr 2016 20:52:53 +0000 (16:52 -0400)]
Merge pull request #3723 from libgit2/cmn/ignore-symlink

ignore: don't use realpath to canonicalize path

8 years agoiterator: support trailing `/` in start for submod
Edward Thomson [Sat, 2 Apr 2016 20:03:09 +0000 (13:03 -0700)]
iterator: support trailing `/` in start for submod

Allow callers to specify a start path with a trailing slash to match
a submodule, instead of just a directory.  This is for some legacy
behavior that's sort of dumb, but there it is.

8 years agodiff: test submodules are found with trailing `/`
Edward Thomson [Sat, 2 Apr 2016 18:33:00 +0000 (11:33 -0700)]
diff: test submodules are found with trailing `/`

Test that submodules are found when the are included in a pathspec
but have a trailing slash.

8 years agoignore: don't use realpath to canonicalize path
Carlos Martín Nieto [Fri, 1 Apr 2016 12:33:42 +0000 (14:33 +0200)]
ignore: don't use realpath to canonicalize path

If we're looking for a symlink, realpath will give us the resolved path,
which is not what we're after, but a canonicalized version of the path
the user asked for.

8 years agoMerge pull request #3720 from pks-t/pks/merge-driver-memleaks
Carlos Martín Nieto [Fri, 1 Apr 2016 11:09:50 +0000 (04:09 -0700)]
Merge pull request #3720 from pks-t/pks/merge-driver-memleaks

merge_driver: fix missing `goto done;`

8 years agomerge_driver: fix missing `goto done;`
Patrick Steinhardt [Fri, 1 Apr 2016 07:37:55 +0000 (09:37 +0200)]
merge_driver: fix missing `goto done;`

The code initializing the merge driver registry accidentally
forgot a `goto done` in case of an error. Because of this the
next line, which registers the global shutdown callback for the
merge drivers, is only called when an error occured.

Fix this by adding the missing `goto done`. This fixes some
memory leaks when the global state is shut down.

8 years agoMerge pull request #3719 from libgit2/ethomson/submodule_status
Carlos Martín Nieto [Fri, 1 Apr 2016 07:29:51 +0000 (00:29 -0700)]
Merge pull request #3719 from libgit2/ethomson/submodule_status

WD iterator: properly identify submodules

8 years agoiterator: use correct search function
Edward Thomson [Thu, 31 Mar 2016 19:05:34 +0000 (15:05 -0400)]
iterator: use correct search function

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 #3717 from libgit2/ethomson/leaks
Carlos Martín Nieto [Thu, 31 Mar 2016 21:04:43 +0000 (14:04 -0700)]
Merge pull request #3717 from libgit2/ethomson/leaks

Plug some leaks

8 years agoleaks: call `xdl_free_classifier`
Edward Thomson [Thu, 31 Mar 2016 14:43:57 +0000 (10:43 -0400)]
leaks: call `xdl_free_classifier`

8 years agoleaks: fix some leaks in the tests
Edward Thomson [Wed, 30 Mar 2016 21:47:05 +0000 (17:47 -0400)]
leaks: fix some leaks in the tests

8 years agoleaks: fix some iterator leaks
Edward Thomson [Wed, 30 Mar 2016 21:41:08 +0000 (17:41 -0400)]
leaks: fix some iterator leaks

8 years agoPlug a few leaks
Carlos Martín Nieto [Tue, 29 Mar 2016 12:47:31 +0000 (14:47 +0200)]
Plug a few leaks

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.