]> git.proxmox.com Git - libgit2.git/log
libgit2.git
9 years agorevwalk::mergebase test: free memory
Edward Thomson [Sat, 25 Oct 2014 23:53:27 +0000 (19:53 -0400)]
revwalk::mergebase test: free memory

9 years agomwindow: clean up pack map at shutdown
Edward Thomson [Sat, 25 Oct 2014 23:53:07 +0000 (19:53 -0400)]
mwindow: clean up pack map at shutdown

9 years agosubmodule test: free submodule
Edward Thomson [Sat, 25 Oct 2014 23:52:52 +0000 (19:52 -0400)]
submodule test: free submodule

9 years agoglobal: clean up openssl_locks on shutdown
Edward Thomson [Sat, 25 Oct 2014 23:52:11 +0000 (19:52 -0400)]
global: clean up openssl_locks on shutdown

9 years agoclone::local test: isalpha -> git__isalpha
Edward Thomson [Sat, 25 Oct 2014 23:51:46 +0000 (19:51 -0400)]
clone::local test: isalpha -> git__isalpha

9 years agoconfig test: clean up memory leak
Edward Thomson [Sat, 25 Oct 2014 23:51:12 +0000 (19:51 -0400)]
config test: clean up memory leak

9 years agoCleanup memory leak in ssh transport
Edward Thomson [Mon, 13 Oct 2014 19:43:03 +0000 (15:43 -0400)]
Cleanup memory leak in ssh transport

9 years agoClean up some memory leaks
Edward Thomson [Mon, 13 Oct 2014 18:34:32 +0000 (14:34 -0400)]
Clean up some memory leaks

9 years agoClean up various compiler warnings
Edward Thomson [Mon, 13 Oct 2014 17:34:15 +0000 (13:34 -0400)]
Clean up various compiler warnings

9 years agoMerge from 2660
Carlos Martín Nieto [Mon, 27 Oct 2014 00:48:37 +0000 (01:48 +0100)]
Merge from 2660

9 years agotests: fix leak
Carlos Martín Nieto [Mon, 27 Oct 2014 00:47:40 +0000 (01:47 +0100)]
tests: fix leak

9 years agoFix test repo dir not deleted after running
Linquize [Sun, 26 Oct 2014 17:06:28 +0000 (01:06 +0800)]
Fix test repo dir not deleted after running

9 years agoMerge pull request #2638 from libgit2/cmn/config-refresh-remove
Edward Thomson [Fri, 24 Oct 2014 23:52:39 +0000 (16:52 -0700)]
Merge pull request #2638 from libgit2/cmn/config-refresh-remove

config: remove the refresh function and backend field

9 years agoMerge pull request #2646 from libgit2/cmn/remote-rename
Edward Thomson [Fri, 24 Oct 2014 23:44:07 +0000 (16:44 -0700)]
Merge pull request #2646 from libgit2/cmn/remote-rename

remote: accept a repo and name for renaming

9 years agoMerge pull request #2649 from swisspol/2630
Edward Thomson [Fri, 24 Oct 2014 21:02:53 +0000 (14:02 -0700)]
Merge pull request #2649 from swisspol/2630

Fixed memory leak in git_tag_delete()

9 years agoMerge pull request #2647 from ethomson/clar_tmpname
Edward Thomson [Fri, 24 Oct 2014 21:01:13 +0000 (14:01 -0700)]
Merge pull request #2647 from ethomson/clar_tmpname

clar: use a custom temp directory name

9 years agoMerge pull request #2645 from libgit2/cmn/common-crypto
Edward Thomson [Fri, 24 Oct 2014 15:27:38 +0000 (08:27 -0700)]
Merge pull request #2645 from libgit2/cmn/common-crypto

[RFC] Use CommonCrypto for hashing

9 years agoFixed memory leak in git_tag_delete()
Pierre-Olivier Latour [Fri, 24 Oct 2014 15:23:14 +0000 (08:23 -0700)]
Fixed memory leak in git_tag_delete()

9 years agoclar: use a custom temp directory name
Edward Thomson [Fri, 24 Oct 2014 14:50:57 +0000 (10:50 -0400)]
clar: use a custom temp directory name

9 years agoMerge pull request #2644 from libgit2/cmn/remove-supported-url
Edward Thomson [Fri, 24 Oct 2014 14:39:10 +0000 (07:39 -0700)]
Merge pull request #2644 from libgit2/cmn/remove-supported-url

remote: delete git_remote_supported_url()

9 years agoremote: accept a repo and name for renaming
Carlos Martín Nieto [Fri, 24 Oct 2014 14:25:59 +0000 (16:25 +0200)]
remote: accept a repo and name for renaming

Remote objects are not meant to be changed from under the user. We did
this in rename, but only the name and left the refspecs, such that a
save would save the wrong refspecs (and a fetch and anything else would
use the wrong refspecs).

Instead, let's simply take a name and not change any loaded remote from
under the user.

9 years agoremote: delete git_remote_supported_url()
Carlos Martín Nieto [Fri, 24 Oct 2014 10:19:13 +0000 (12:19 +0200)]
remote: delete git_remote_supported_url()

This function does not in fact tell us anything, as almost anything with
a colon in it is a valid rsync-style SSH path; it can not tell us that
we do not support ftp or afp or similar as those are still valid SSH
paths and we do support that.

9 years agohash: use CommonCrypto on OSX for SHA-1
Carlos Martín Nieto [Fri, 24 Oct 2014 11:29:11 +0000 (13:29 +0200)]
hash: use CommonCrypto on OSX for SHA-1

OSX has its own cryptographic library, let's make use of it instead of
calling out to OpenSSL.

9 years agoconfig: remove the refresh function and backend field
Carlos Martín Nieto [Thu, 23 Oct 2014 17:05:02 +0000 (19:05 +0200)]
config: remove the refresh function and backend field

We have been refreshing on read and write for a while now, so
git_config_refresh() is at best a no-op, and might just end up wasting
cycles.

9 years agoMerge pull request #2622 from libgit2/refresh-config-snapshot
Carlos Martín Nieto [Thu, 23 Oct 2014 16:58:39 +0000 (18:58 +0200)]
Merge pull request #2622 from libgit2/refresh-config-snapshot

Refresh git configuration before looking for the tracking branch redux.

9 years agoMerge pull request #2625 from libgit2/cmn/ssl-tls
Edward Thomson [Thu, 23 Oct 2014 15:27:13 +0000 (08:27 -0700)]
Merge pull request #2625 from libgit2/cmn/ssl-tls

ssl: dump the SSL ciphers in favour of TLS

9 years agossl: dump the SSL ciphers in favour of TLS
Carlos Martín Nieto [Sat, 18 Oct 2014 13:52:10 +0000 (15:52 +0200)]
ssl: dump the SSL ciphers in favour of TLS

All versions of SSL are considered deprecated now, so let's ask OpenSSl
to only use TLSv1. We still ask it to load those ciphers for
compatibility with servers which want to use an older hello but will use
TLS for encryption.

For good measure we also disable compression, which can be exploitable,
if the OpenSSL version supports it.

9 years agoPatch from @carlosmn to refresh the parent config before snapshotting.
Alan Rogers [Mon, 20 Oct 2014 22:29:45 +0000 (09:29 +1100)]
Patch from @carlosmn to refresh the parent config before snapshotting.

9 years agoChange the length of the file so that the change is picked up.
Alan Rogers [Mon, 20 Oct 2014 22:29:17 +0000 (09:29 +1100)]
Change the length of the file so that the change is picked up.

9 years agoAdd a test to make sure a new snapshot has the new value.
Alan Rogers [Thu, 16 Oct 2014 02:52:55 +0000 (13:52 +1100)]
Add a test to make sure a new snapshot has the new value.

9 years agoMerge pull request #2617 from linquize/describe-example
Edward Thomson [Thu, 23 Oct 2014 03:48:04 +0000 (20:48 -0700)]
Merge pull request #2617 from linquize/describe-example

describe: add example

9 years agoMerge pull request #2619 from ethomson/remotes_with_unc
Edward Thomson [Thu, 23 Oct 2014 03:38:59 +0000 (20:38 -0700)]
Merge pull request #2619 from ethomson/remotes_with_unc

Remote paths: canonicalize UNC paths on Win32

9 years agoRemote paths: canonicalize UNC paths on Win32
Edward Thomson [Tue, 14 Oct 2014 20:31:55 +0000 (16:31 -0400)]
Remote paths: canonicalize UNC paths on Win32

Git for Windows will handle UNC paths only when in forward-slash
format, eg "//server/path".  When given a UNC path as a remote,
rewrite standard format ("\\server\path") into this ridiculous
format.

9 years agoMerge pull request #2634 from libgit2/cmn/tree-cache-count
Edward Thomson [Wed, 22 Oct 2014 21:45:36 +0000 (14:45 -0700)]
Merge pull request #2634 from libgit2/cmn/tree-cache-count

tree-cache: correct the entry_count calculation

9 years agotree-cache: correct the entry_count calculation
Carlos Martín Nieto [Wed, 22 Oct 2014 19:09:31 +0000 (21:09 +0200)]
tree-cache: correct the entry_count calculation

The entry_count field is the amount of index entries covered by a
particular cache entry, that is how many files are there (recursively)
under a particular directory.

The current code that attemps to do this is severely defincient and is
trying to count the amount of children, which always comes up to zero.

We don't even need to recount, since we have the information during the
cache creation. We can take that number and keep it, as we only ever
invalidate or replace.

9 years agoUpdate some documentation
Carlos Martín Nieto [Fri, 17 Oct 2014 20:22:59 +0000 (22:22 +0200)]
Update some documentation

9 years agoPROJECTS: remove two completed tasks
Carlos Martín Nieto [Fri, 17 Oct 2014 20:09:54 +0000 (22:09 +0200)]
PROJECTS: remove two completed tasks

9 years agoMerge pull request #2609 from linquize/describe-opts
Edward Thomson [Mon, 13 Oct 2014 20:59:56 +0000 (16:59 -0400)]
Merge pull request #2609 from linquize/describe-opts

Handle describe options better

9 years agoMerge pull request #2615 from ethomson/mount_points
Edward Thomson [Mon, 13 Oct 2014 20:52:44 +0000 (16:52 -0400)]
Merge pull request #2615 from ethomson/mount_points

Mount points

9 years agoMerge pull request #2616 from ethomson/index_crlf
Edward Thomson [Mon, 13 Oct 2014 20:51:40 +0000 (16:51 -0400)]
Merge pull request #2616 from ethomson/index_crlf

Apply filters when writing index

9 years agoDon't copy buffer in checkout unless needed
Edward Thomson [Sun, 12 Oct 2014 01:38:22 +0000 (21:38 -0400)]
Don't copy buffer in checkout unless needed

9 years agoEnsure filters (i.e. CRLF) are applied when checking out conflict content
Jacques Germishuys [Fri, 10 Oct 2014 11:22:11 +0000 (13:22 +0200)]
Ensure filters (i.e. CRLF) are applied when checking out conflict content

9 years agoIntroduce failing test for conflict filtering in index
Edward Thomson [Sun, 12 Oct 2014 00:56:50 +0000 (20:56 -0400)]
Introduce failing test for conflict filtering in index

9 years agoMerge pull request #2618 from csware/msvc-no-z-prefix
Edward Thomson [Mon, 13 Oct 2014 15:01:52 +0000 (11:01 -0400)]
Merge pull request #2618 from csware/msvc-no-z-prefix

There is no "z" size specifier on MSVC

9 years agois_empty_dir (wi32): cope with empty mount points
Edward Thomson [Sat, 11 Oct 2014 15:23:34 +0000 (11:23 -0400)]
is_empty_dir (wi32): cope with empty mount points

FindFirstFile will fail with INVALID_HANDLE_VALUE if there are no
children to the given path, which can happen if the given path is a
file (and obviously has no children) or if the given path is an empty
mount point.  (Most directories have at least directory entries '.'
and '..', but ridiculously another volume mounted in another drive
letter's path space do not, and thus have nothing to enumerate.)

If FindFirstFile fails, check if this is a directory-like thing
(a mount point).

9 years agop_lstat win32: don't canonicalize volume mounts
Edward Thomson [Sat, 11 Oct 2014 18:34:24 +0000 (14:34 -0400)]
p_lstat win32: don't canonicalize volume mounts

A reparse point that is an IO_REPARSE_TAG_MOUNT_POINT could be
a junction or an actual filesystem mount point.  (Who knew?)
If it's the latter, its reparse point will report the actual
volume information \??\Volume{GUID}\ and we should not attempt
to dereference that further, instead readlink should report
EINVAL since it's not a symlink / junction and its original
path was canonical.

Yes, really.

9 years agoThere is no "z" size specifier on MSVC
Sven Strickroth [Sun, 12 Oct 2014 15:21:17 +0000 (17:21 +0200)]
There is no "z" size specifier on MSVC

See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx and https://stackoverflow.com/questions/6655410/why-doesnt-zd-printf-format-work-in-vs2010

Signed-off-by: Sven Strickroth <email@cs-ware.de>
9 years agodescribe: add example
Linquize [Sun, 12 Oct 2014 07:52:53 +0000 (15:52 +0800)]
describe: add example

9 years agoMerge pull request #2613 from libgit2/rb/minor-cleanups
Edward Thomson [Sat, 11 Oct 2014 18:48:57 +0000 (14:48 -0400)]
Merge pull request #2613 from libgit2/rb/minor-cleanups

Minor cleanups for master

9 years agodescribe: Initialize options for git_describe_format() if null
Linquize [Fri, 10 Oct 2014 15:37:20 +0000 (23:37 +0800)]
describe: Initialize options for git_describe_format() if null

9 years agodescribe: Do not crash if pass null option to git_describe_commit()
Linquize [Fri, 10 Oct 2014 13:48:46 +0000 (21:48 +0800)]
describe: Do not crash if pass null option to git_describe_commit()

9 years agoDon't use cl_git_pass for POSIX functions
Russell Belfer [Fri, 10 Oct 2014 22:17:27 +0000 (15:17 -0700)]
Don't use cl_git_pass for POSIX functions

If there is a failure then cl_git_pass tries to get the libgit2
error, but p_... functions don't set that.

Also - trailing whitespace cleanup.

9 years agoMove un-namespaced constant to internal header
Russell Belfer [Fri, 10 Oct 2014 22:17:05 +0000 (15:17 -0700)]
Move un-namespaced constant to internal header

FLAG_BITS only seems to be used internally

9 years agoMerge pull request #2470 from libgit2/cmn/read-tree-cache
Edward Thomson [Fri, 10 Oct 2014 18:06:14 +0000 (14:06 -0400)]
Merge pull request #2470 from libgit2/cmn/read-tree-cache

Fill the tree cache when reading in a tree into an index

9 years agoUpdate CHANGELOG and PROJECTS with the tree cache changes
Carlos Martín Nieto [Mon, 29 Sep 2014 07:21:57 +0000 (09:21 +0200)]
Update CHANGELOG and PROJECTS with the tree cache changes

9 years agoindex: fill the tree cache on write-tree
Carlos Martín Nieto [Mon, 29 Sep 2014 07:07:41 +0000 (09:07 +0200)]
index: fill the tree cache on write-tree

An obvious place to fill the tree cache is on write-tree, as we're
guaranteed to be able to fill in the whole tree cache.

The way this commit does this is not the most efficient, as we read the
root tree from the odb instead of filling in the cache as we go along,
but it fills the cache such that successive operations (and persisting
the index to disk) will be able to take advantage of the cache, and it
reuses the code we already have for filling the cache.

Filling in the cache as we create the trees would require some
reallocation of the children vector, which is currently not possible
with out pool implementation. A different data structure would likely
allow us to perform this operation at a later date.

9 years agoindex: make sure to write cached subtrees if parent is invalidated
Carlos Martín Nieto [Mon, 29 Sep 2014 06:03:22 +0000 (08:03 +0200)]
index: make sure to write cached subtrees if parent is invalidated

If e.g. the root tree is invalidated, we still want to write out
its children, since those may still have valid cache entries.

9 years agoindex: write out the tree cache extension
Carlos Martín Nieto [Sun, 28 Sep 2014 05:00:49 +0000 (07:00 +0200)]
index: write out the tree cache extension

Keeping the cache around after read-tree is only one part of the
optimisation opportunities. In order to share the cache between program
instances, we need to write the TREE extension to the index.

Do so, taking the opportunity to rename 'entries' to 'entry_count' to
match the name given in the format description. The included test is
rather trivial, but works as a sanity check.

9 years agotree-cache: remove the parent pointer
Carlos Martín Nieto [Fri, 11 Jul 2014 09:52:38 +0000 (11:52 +0200)]
tree-cache: remove the parent pointer

This wasn't used. We invalidate based on the full path, so we always go
down the tree, never up.

9 years agoindex: add tests for the tree cache
Carlos Martín Nieto [Fri, 11 Jul 2014 09:48:51 +0000 (11:48 +0200)]
index: add tests for the tree cache

These test that we invalidate at the right levels and that we remove the
tree cache when clearing the index.

9 years agoindex: fill the tree cache when reading from a tree
Carlos Martín Nieto [Thu, 10 Jul 2014 12:10:39 +0000 (14:10 +0200)]
index: fill the tree cache when reading from a tree

When reading from a tree, we know what every tree is going to look like,
so we can fill in the tree cache completely, making use of the index for
modification of trees a lot quicker.

9 years agotree-cache: move to use a pool allocator
Carlos Martín Nieto [Thu, 10 Jul 2014 11:48:13 +0000 (13:48 +0200)]
tree-cache: move to use a pool allocator

This simplifies freeing the entries quite a bit; though there aren't
that many failure paths right now, introducing filling the cache from a
tree will introduce more. This makes sure not to leak memory on errors.

9 years agotree-cache: extract the allocation
Carlos Martín Nieto [Thu, 10 Jul 2014 10:21:28 +0000 (12:21 +0200)]
tree-cache: extract the allocation

9 years agoMerge pull request #2593 from libgit2/cmn/remote-delete-name
Edward Thomson [Fri, 10 Oct 2014 16:21:28 +0000 (12:21 -0400)]
Merge pull request #2593 from libgit2/cmn/remote-delete-name

remote: accept a repository and remote name for deletion

9 years agoMerge pull request #2575 from cirosantilli/factor-struct-typedef
Carlos Martín Nieto [Fri, 10 Oct 2014 16:06:36 +0000 (18:06 +0200)]
Merge pull request #2575 from cirosantilli/factor-struct-typedef

[factor] Join typedef and struct definitions in single file.

9 years agoFix test build
Carlos Martín Nieto [Fri, 10 Oct 2014 16:03:09 +0000 (18:03 +0200)]
Fix test build

Some PRs have fallen out of sync with the changes in signatures, so we
need to take a few extra parameters into account.

9 years agoMerge pull request #2498 from linquize/read-large-file
Carlos Martín Nieto [Fri, 10 Oct 2014 15:58:35 +0000 (17:58 +0200)]
Merge pull request #2498 from linquize/read-large-file

Can read large file larger than 2GB on Win64

9 years agoMerge pull request #2556 from sbc100/fix_warnings
Carlos Martín Nieto [Fri, 10 Oct 2014 15:52:31 +0000 (17:52 +0200)]
Merge pull request #2556 from sbc100/fix_warnings

Fix warnings in thread-utils.h when building without -DTHREADSAFE=ON

9 years agoMerge pull request #2542 from linquize/fetch-head
Carlos Martín Nieto [Fri, 10 Oct 2014 15:50:28 +0000 (17:50 +0200)]
Merge pull request #2542 from linquize/fetch-head

Do not error out when fetching from second remote

9 years agoMerge pull request #2600 from libgit2/cmn/embed-ssh
Carlos Martín Nieto [Fri, 10 Oct 2014 15:46:53 +0000 (17:46 +0200)]
Merge pull request #2600 from libgit2/cmn/embed-ssh

Provide option to embed libssh2

9 years agoMerge pull request #2588 from swansontec/ssl-cert-path2
Carlos Martín Nieto [Fri, 10 Oct 2014 15:42:52 +0000 (17:42 +0200)]
Merge pull request #2588 from swansontec/ssl-cert-path2

Add support for setting the SSL CA location

9 years agoMerge pull request #2499 from csware/hard-reset-checkout-callbacks
Carlos Martín Nieto [Fri, 10 Oct 2014 15:40:53 +0000 (17:40 +0200)]
Merge pull request #2499 from csware/hard-reset-checkout-callbacks

Allow to propagate checkout callbacks to git HARD reset

9 years agoMerge pull request #2574 from csware/hostname-for-certificate_check_cb
Edward Thomson [Fri, 10 Oct 2014 15:28:58 +0000 (11:28 -0400)]
Merge pull request #2574 from csware/hostname-for-certificate_check_cb

Provide host name to certificate_check_cb

9 years agoMerge pull request #2473 from arthurschreiber/arthur/new-javascript-test-files
Edward Thomson [Fri, 10 Oct 2014 14:03:06 +0000 (10:03 -0400)]
Merge pull request #2473 from arthurschreiber/arthur/new-javascript-test-files

New test files for the javascript diff driver.

9 years agoMerge pull request #2603 from libgit2/cmn/revwalk-merge-base
Edward Thomson [Fri, 10 Oct 2014 13:59:26 +0000 (09:59 -0400)]
Merge pull request #2603 from libgit2/cmn/revwalk-merge-base

Walk only as far as the common ancestors of uninteresting commits

9 years agoMerge pull request #2606 from arthurschreiber/arthur/align-git-remote-fetch
Carlos Martín Nieto [Fri, 10 Oct 2014 11:57:36 +0000 (13:57 +0200)]
Merge pull request #2606 from arthurschreiber/arthur/align-git-remote-fetch

Treat an empty list of refspecs the same as a NULL value.

9 years agoTreat an empty list of refspecs the same as a NULL value.
Arthur Schreiber [Fri, 10 Oct 2014 11:17:53 +0000 (13:17 +0200)]
Treat an empty list of refspecs the same as a NULL value.

9 years agoMerge pull request #2592 from libgit2/cmn/describe
Carlos Martín Nieto [Thu, 9 Oct 2014 20:24:40 +0000 (22:24 +0200)]
Merge pull request #2592 from libgit2/cmn/describe

Implement git-describe

9 years agoUpdate the javascript diff driver's function pattern.
Arthur Schreiber [Thu, 9 Oct 2014 20:21:34 +0000 (22:21 +0200)]
Update the javascript diff driver's function pattern.

9 years agoNew test files for the javascript diff driver.
Arthur Schreiber [Mon, 14 Jul 2014 20:20:02 +0000 (22:20 +0200)]
New test files for the javascript diff driver.

9 years agoMerge branch 'anuraggup/git_filter'
Edward Thomson [Thu, 9 Oct 2014 18:57:09 +0000 (14:57 -0400)]
Merge branch 'anuraggup/git_filter'

9 years agogit_filter: dup the filter name
Anurag Gupta (OSG) [Thu, 9 Oct 2014 18:44:05 +0000 (11:44 -0700)]
git_filter: dup the filter name

9 years agoMerge pull request #2599 from linquize/config-trailing-spaces
Edward Thomson [Thu, 9 Oct 2014 16:16:17 +0000 (12:16 -0400)]
Merge pull request #2599 from linquize/config-trailing-spaces

config: Handle multiple spaces that follow a configuration value and precede a comment char

9 years agoMerge pull request #2601 from SeijiIto/master
Edward Thomson [Thu, 9 Oct 2014 15:38:31 +0000 (11:38 -0400)]
Merge pull request #2601 from SeijiIto/master

Fix README.md

9 years agoAdd tests for host names
Sven Strickroth [Wed, 24 Sep 2014 09:28:45 +0000 (11:28 +0200)]
Add tests for host names

Signed-off-by: Sven Strickroth <email@cs-ware.de>
9 years agoMerge pull request #2597 from ethomson/fixup
Edward Thomson [Thu, 9 Oct 2014 15:32:26 +0000 (11:32 -0400)]
Merge pull request #2597 from ethomson/fixup

Trivial fixups

9 years agoFix an uninitialized variable
Carlos Martín Nieto [Thu, 9 Oct 2014 15:02:11 +0000 (17:02 +0200)]
Fix an uninitialized variable

9 years agoMerge pull request #2448 from libgit2/cmn/reference-transaction
Edward Thomson [Thu, 9 Oct 2014 14:49:37 +0000 (10:49 -0400)]
Merge pull request #2448 from libgit2/cmn/reference-transaction

Introduce reference transactions

9 years agoMerge pull request #2462 from libgit2/cmn/remote-fetch-refs
Edward Thomson [Thu, 9 Oct 2014 14:41:38 +0000 (10:41 -0400)]
Merge pull request #2462 from libgit2/cmn/remote-fetch-refs

Implement opportunistic ref updates

9 years agotransaction: rename lock() to lock_ref()
Carlos Martín Nieto [Thu, 9 Oct 2014 14:29:30 +0000 (16:29 +0200)]
transaction: rename lock() to lock_ref()

This leaves space for future expansion to locking other resources
without having to change the API for references.

9 years agoMerge pull request #2604 from arthurschreiber/arthur/add-merge-bases-many
Carlos Martín Nieto [Thu, 9 Oct 2014 14:00:28 +0000 (16:00 +0200)]
Merge pull request #2604 from arthurschreiber/arthur/add-merge-bases-many

Add `git_merge_bases_many`

9 years agoExtract shared functionality.
Arthur Schreiber [Thu, 9 Oct 2014 12:16:10 +0000 (14:16 +0200)]
Extract shared functionality.

9 years agoAdd git_merge_bases_many.
Arthur Schreiber [Thu, 9 Oct 2014 11:58:23 +0000 (13:58 +0200)]
Add git_merge_bases_many.

9 years agorevwalk: clear first-parent flag on reset
Carlos Martín Nieto [Wed, 8 Oct 2014 15:17:31 +0000 (17:17 +0200)]
revwalk: clear first-parent flag on reset

This should have been included when implementing the feature but was
missed.

9 years agorevwalk: catch no-push and no-hide cases
Carlos Martín Nieto [Wed, 8 Oct 2014 15:14:48 +0000 (17:14 +0200)]
revwalk: catch no-push and no-hide cases

If there have been no pushes, we can immediately return ITEROVER. If
there have been no hides, we must not run the uninteresting pre-mark
phase, as we do not want to hide anything and this would simply cause us
to spend time loading objects.

9 years agorevwalk: mark uninteresting only up to the common ancestors
Carlos Martín Nieto [Wed, 8 Oct 2014 13:52:11 +0000 (15:52 +0200)]
revwalk: mark uninteresting only up to the common ancestors

This introduces a phase at the start of preparing a walk which pre-marks
uninteresting commits, but only up to the common ancestors.

We do this in a similar way to git, by walking down the history and
marking (which is what we used to do), but we keep a time-sorted
priority queue of commits and stop marking as soon as there are only
uninteresting commits in this queue.

This is a similar rule to the one used to find the merge-base. As we
keep inserting commits regardless of the uninteresting bit, if there are
only uninteresting commits in the queue, it means we've run out of
interesting commits in our walk, so we can stop.

The old mark_unintesting() logic is still in place, but that stops
walking if it finds an already-uninteresting commit, so it will stop on
the ones we've pre-marked; but keeping it allows us to also hide those
that are hidden via the callback.

9 years agorevwalk: keep a single list of user inputs
Carlos Martín Nieto [Wed, 8 Oct 2014 08:45:47 +0000 (10:45 +0200)]
revwalk: keep a single list of user inputs

The old separation was due to the old merge-base finding, so it's no
longer necessary.

9 years agorevwalk: clear the flags on reset
Carlos Martín Nieto [Wed, 8 Oct 2014 08:24:06 +0000 (10:24 +0200)]
revwalk: clear the flags on reset

These store merge-base information which is only valid for a single run.

9 years agoFix README.md
SeijiIto [Mon, 6 Oct 2014 07:17:01 +0000 (16:17 +0900)]
Fix README.md

9 years agoProvide option to embed libssh2
Carlos Martín Nieto [Tue, 17 Jun 2014 13:37:21 +0000 (15:37 +0200)]
Provide option to embed libssh2