Commit Graph

7459 Commits

Author SHA1 Message Date
Carlos Martín Nieto
12e1803188 Update some documentation 2014-10-18 15:22:19 +02:00
Carlos Martín Nieto
c51aa74ed3 PROJECTS: remove two completed tasks 2014-10-17 22:09:54 +02:00
Edward Thomson
e0383fa35f Merge pull request #2609 from linquize/describe-opts
Handle describe options better
2014-10-13 16:59:56 -04:00
Edward Thomson
c6e2621052 Merge pull request #2615 from ethomson/mount_points
Mount points
2014-10-13 16:52:44 -04:00
Edward Thomson
c0c8570c51 Merge pull request #2616 from ethomson/index_crlf
Apply filters when writing index
2014-10-13 16:51:40 -04:00
Edward Thomson
6a26488f8b Don't copy buffer in checkout unless needed 2014-10-13 13:36:20 -04:00
Jacques Germishuys
5e2cf2ca2c Ensure filters (i.e. CRLF) are applied when checking out conflict content 2014-10-13 13:36:18 -04:00
Edward Thomson
8d3b2ee3d7 Introduce failing test for conflict filtering in index 2014-10-13 13:36:16 -04:00
Edward Thomson
24deacb7ee Merge pull request #2618 from csware/msvc-no-z-prefix
There is no "z" size specifier on MSVC
2014-10-13 11:01:52 -04:00
Edward Thomson
969b6a4710 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).
2014-10-13 10:58:05 -04:00
Edward Thomson
8d45b4691c 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.
2014-10-13 10:58:03 -04:00
Sven Strickroth
cf1013a888 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>
2014-10-13 16:32:26 +02:00
Linquize
d6bbcefce3 describe: add example 2014-10-12 19:25:20 +08:00
Edward Thomson
9e49cb7a4b Merge pull request #2613 from libgit2/rb/minor-cleanups
Minor cleanups for master
2014-10-11 14:48:57 -04:00
Linquize
59186d9b15 describe: Initialize options for git_describe_format() if null 2014-10-11 07:52:47 +08:00
Linquize
0494a7c9a9 describe: Do not crash if pass null option to git_describe_commit() 2014-10-11 07:52:47 +08:00
Russell Belfer
85fe63bc58 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.
2014-10-10 15:17:27 -07:00
Russell Belfer
babbff347c Move un-namespaced constant to internal header
FLAG_BITS only seems to be used internally
2014-10-10 15:17:05 -07:00
Edward Thomson
fd0f6d3855 Merge pull request #2470 from libgit2/cmn/read-tree-cache
Fill the tree cache when reading in a tree into an index
2014-10-10 14:06:14 -04:00
Carlos Martín Nieto
1b63af5133 Update CHANGELOG and PROJECTS with the tree cache changes 2014-10-10 19:43:42 +02:00
Carlos Martín Nieto
7465e87399 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.
2014-10-10 19:43:42 +02:00
Carlos Martín Nieto
795d8e9328 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.
2014-10-10 19:43:42 +02:00
Carlos Martín Nieto
c2f8b21593 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.
2014-10-10 19:43:42 +02:00
Carlos Martín Nieto
46bb006730 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.
2014-10-10 19:37:48 +02:00
Carlos Martín Nieto
ee4db1c16e 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.
2014-10-10 19:35:19 +02:00
Carlos Martín Nieto
6843cebe17 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.
2014-10-10 19:35:19 +02:00
Carlos Martín Nieto
19c88310cb 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.
2014-10-10 19:35:18 +02:00
Carlos Martín Nieto
d091a9dbde tree-cache: extract the allocation 2014-10-10 19:35:18 +02:00
Edward Thomson
a6ed1fcbe1 Merge pull request #2593 from libgit2/cmn/remote-delete-name
remote: accept a repository and remote name for deletion
2014-10-10 12:21:28 -04:00
Carlos Martín Nieto
bab92a8dcf Merge pull request #2575 from cirosantilli/factor-struct-typedef
[factor] Join typedef and struct definitions in single file.
2014-10-10 18:06:36 +02:00
Carlos Martín Nieto
942a7b39ed 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.
2014-10-10 18:03:09 +02:00
Carlos Martín Nieto
4c0c001529 Merge pull request #2498 from linquize/read-large-file
Can read large file larger than 2GB on Win64
2014-10-10 17:58:35 +02:00
Carlos Martín Nieto
33ca356598 Merge pull request #2556 from sbc100/fix_warnings
Fix warnings in thread-utils.h when building without -DTHREADSAFE=ON
2014-10-10 17:52:31 +02:00
Carlos Martín Nieto
2139c9b76c Merge pull request #2542 from linquize/fetch-head
Do not error out when fetching from second remote
2014-10-10 17:50:28 +02:00
Carlos Martín Nieto
a60d0f11f4 Merge pull request #2600 from libgit2/cmn/embed-ssh
Provide option to embed libssh2
2014-10-10 17:46:53 +02:00
Carlos Martín Nieto
9b36537de4 Merge pull request #2588 from swansontec/ssl-cert-path2
Add support for setting the SSL CA location
2014-10-10 17:42:52 +02:00
Carlos Martín Nieto
0625638f06 Merge pull request #2499 from csware/hard-reset-checkout-callbacks
Allow to propagate checkout callbacks to git HARD reset
2014-10-10 17:40:53 +02:00
Edward Thomson
f54d8d528a Merge pull request #2574 from csware/hostname-for-certificate_check_cb
Provide host name to certificate_check_cb
2014-10-10 11:28:58 -04:00
Edward Thomson
533da4ea00 Merge pull request #2473 from arthurschreiber/arthur/new-javascript-test-files
New test files for the javascript diff driver.
2014-10-10 10:03:06 -04:00
Edward Thomson
f339f441f9 Merge pull request #2603 from libgit2/cmn/revwalk-merge-base
Walk only as far as the common ancestors of uninteresting commits
2014-10-10 09:59:26 -04:00
Carlos Martín Nieto
bd62dc6fdd Merge pull request #2606 from arthurschreiber/arthur/align-git-remote-fetch
Treat an empty list of refspecs the same as a NULL value.
2014-10-10 13:57:36 +02:00
Arthur Schreiber
8e398e4c84 Treat an empty list of refspecs the same as a NULL value. 2014-10-10 13:17:53 +02:00
Carlos Martín Nieto
46a2b8e855 Merge pull request #2592 from libgit2/cmn/describe
Implement git-describe
2014-10-09 22:24:40 +02:00
Arthur Schreiber
994a3006b6 Update the javascript diff driver's function pattern. 2014-10-09 22:21:34 +02:00
Arthur Schreiber
19fa9c0ca0 New test files for the javascript diff driver. 2014-10-09 22:14:55 +02:00
Edward Thomson
324154a453 Merge branch 'anuraggup/git_filter' 2014-10-09 14:57:19 -04:00
Anurag Gupta (OSG)
5623e627d4 git_filter: dup the filter name 2014-10-09 14:54:48 -04:00
Edward Thomson
dfff1b5bcb Merge pull request #2599 from linquize/config-trailing-spaces
config: Handle multiple spaces that follow a configuration value and precede a comment char
2014-10-09 12:16:17 -04:00
Edward Thomson
919e701605 Merge pull request #2601 from SeijiIto/master
Fix README.md
2014-10-09 11:38:31 -04:00
Sven Strickroth
db3d169c33 Add tests for host names
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2014-10-09 17:32:38 +02:00