Commit Graph

8998 Commits

Author SHA1 Message Date
Edward Thomson
9447b9e55a xplat: use st_mtimespec everywhere on mac 2016-02-09 10:40:33 -08:00
Marius Ungureanu
0c09753cf5 Fix the build when defining USE_NSEC 2016-01-25 14:06:15 +02:00
Carlos Martín Nieto
0f9d15493d Merge pull request #3573 from pmq20/master-12jan16
Make packfile_unpack_compressed a private API
2016-01-16 02:29:17 +01:00
Carlos Martín Nieto
47cf739e97 Merge pull request #3569 from arthurschreiber/arthur/fix-windows-issues
Fix some issues with generated pkg-config file
2016-01-13 17:57:54 +01:00
P.S.V.R
b644e223aa Make packfile_unpack_compressed a private API 2016-01-13 11:02:38 +08:00
Arthur Schreiber
768e185c54 Wrap path in quotes to support paths containing whitespace. 2016-01-09 02:43:03 +01:00
Arthur Schreiber
8a0133c030 Add winhttp dependencies to pc file. 2016-01-09 02:43:03 +01:00
Carlos Martín Nieto
700f0aff24 Merge pull request #3562 from mgorny/ssh-read-stderr-fail
ssh_stream_read(): fix possible *bytes_read < 0 branch
2015-12-29 13:38:01 +00:00
Carlos Martín Nieto
a3776489e6 Merge pull request #3558 from libgit2/cmn/index-nolock
index: get rid of the locking
2015-12-28 15:12:37 +00:00
Carlos Martín Nieto
9d81509ab1 index: get rid of the locking
We don't support using an index object from multiple threads at the same
time, so the locking doesn't have any effect when following the
rules. If not following the rules, things are going to break down
anyway.
2015-12-28 13:55:44 +00:00
Carlos Martín Nieto
ccad5a9960 Merge pull request #3565 from ethomson/templates
Handle dotfiles as the repo template dir and inside the template dir
2015-12-28 11:22:48 +00:00
Edward Thomson
62602547db git_repository_init: include dotfiles when copying templates
Include dotfiles when copying template directory, which will handle
both a template directory itself that begins with a dotfile, and
any dotfiles inside the directory.
2015-12-26 22:41:00 -06:00
Edward Thomson
002821837f repo::init tests: test a template dir with leading dot
Ensure that we can handle template directories that begin with a
leading dot.
2015-12-26 22:32:17 -06:00
Edward Thomson
5c042c5bf5 repo::init tests: test init.templatedir setting
Ensure that `git_repository_init` honors the `init.templatedir`
configuration setting.
2015-12-26 22:06:45 -06:00
Edward Thomson
a066b4cb42 Merge pull request #3552 from ReadmeCritic/master
Update README URLs based on HTTP redirects
2015-12-26 18:31:22 -06:00
ReadmeCritic
1ce509fe9e Update libgit2-glib link 2015-12-26 15:51:32 -08:00
Edward Thomson
869320a85d Merge pull request #3546 from Cruel/master
Fix a couple function signatures
2015-12-26 16:55:29 -06:00
Michał Górny
02fdc2db22 ssh_stream_read(): fix possible *bytes_read < 0 branch
Fix the possibility of returning successfully from ssh_stream_read()
with *bytes_read < 0. This would occur if stdout channel read resulted
in 0, and stderr channel read failed afterwards.
2015-12-26 17:17:05 +01:00
Edward Thomson
3d29b12c9c Merge pull request #3560 from drusk/readme_typo
Fixed minor typo in README.md.
2015-12-23 23:38:59 -06:00
drusk
22829b7443 Fixed minor typo in README.md. 2015-12-23 21:27:40 -08:00
Carlos Martín Nieto
e9c0d7962b Merge pull request #3554 from olshevskiy87/master
typos in comments
2015-12-21 21:47:10 +00:00
Dmitriy Olshevskiy
91f0d186b4 typos in comments 2015-12-21 22:18:07 +03:00
ReadmeCritic
1181ca0c6c Update README URLs based on HTTP redirects 2015-12-17 08:36:04 -08:00
Vicent Marti
9ec6839a72 Merge pull request #3551 from libgit2/vmg/commit-leak
commit: Fix memory leak in test suite
2015-12-17 10:29:58 +01:00
Vicent Marti
5951445fb3 commit: Fix memory leak in test suite 2015-12-17 10:13:04 +01:00
Vicent Marti
1850c99ce2 Merge pull request #3550 from libgit2/vmg/index-fill-2
Index fill: Small fixups
2015-12-17 10:09:02 +01:00
Carlos Martín Nieto
4baf2d8bdf Merge pull request #3548 from tepas/patch-1
fix git_blob_create_fromchunks documentation
2015-12-16 21:58:47 +01:00
Vicent Marti
ef8b7febc5 index: Also size-hint the hash table
Note that we're not checking whether the resize succeeds; in OOM cases,
we let it run with a "small" vector and hash table and see if by chance
we can grow it dynamically as we insert the new entries. Nothing to
lose really.
2015-12-16 19:36:50 +01:00
Vicent Marti
d7d46cfbfd index: Preallocate the entries vector with size hint 2015-12-16 17:04:08 +01:00
Vicent Marti
0cc20a8c48 index: Adjust namemask & mode when filling 2015-12-16 17:04:08 +01:00
Carlos Martín Nieto
f824259e67 Merge pull request #3549 from libgit2/vmg/index-fill
merge: Use `git_index__fill` to populate the index
2015-12-16 15:18:42 +01:00
Vicent Marti
879ebab314 merge: Use git_index__fill to populate the index
Instead of calling `git_index_add` in a loop, use the new
`git_index_fill` internal API to fill the index with the initial staged
entries.

The new `fill` helper assumes that all the entries will be unique and
valid, so it can append them at the end of the entries vector and only
sort it once at the end. It performs no validation checks.

This prevents the quadratic behavior caused by having to sort the
entries list once after every insertion.
2015-12-16 12:30:52 +01:00
tepas
cf339ede0a fix git_blob_create_fromchunks documentation
putting `0.` at the start of the line turns it into a numbered list.
2015-12-16 09:25:18 +11:00
Thomas Edvalson
95746a57c7 Fix a couple function signatures 2015-12-14 19:21:09 -05:00
Edward Thomson
7f2c1469f8 Merge pull request #3528 from chescock/Passthrough-from-credential-callback
Treat GIT_PASSTHROUGH as though git_cred_acquire_cb isn't set.
2015-12-14 13:54:02 -06:00
Edward Thomson
30c8e26074 Merge pull request #3521 from pks-t/blame-line-overflow
Line count overflow in git_blame_hunk and git_blame__entry
2015-12-14 13:53:26 -06:00
Carlos Martín Nieto
6aa06b65cf Merge pull request #3522 from pks-t/email-format-commit-message
diff: include commit message when formatting patch
2015-12-10 12:14:09 +01:00
Carlos Martín Nieto
dc49eb585f Merge pull request #3538 from pks-t/pks/index-memory-leak
index: always queue `remove_entry` for removal
2015-12-10 11:57:44 +01:00
Carlos Martín Nieto
0a294217d8 Merge pull request #3542 from libgit2/cmn/reset-dir-file
reset: perform the checkout before moving HEAD or the index
2015-12-09 20:56:04 +01:00
Carlos Martín Nieto
465c3b38d5 reset: perform the checkout before moving HEAD or the index
This keeps the state of the workdir the same as one from HEAD, removing
a source of possible confusion when calculating the work that is to be
done.
2015-12-09 19:16:11 +01:00
Carlos Martín Nieto
828852553a CHANGELOG: add some things we missed 2015-12-09 13:57:15 +01:00
Carlos Martín Nieto
21b1e015a3 Merge pull request #3539 from libgit2/typedef-submodule-cb
Use a typedef for the submodule_foreach callback.
2015-12-08 21:11:58 +01:00
Edward Thomson
d698929cdd Merge pull request #3537 from libgit2/cmn/tree-is-sorted
tree: mark a tree as already sorted
2015-12-08 13:12:27 -05:00
joshaber
ab273821ee Play nice with the docs. 2015-12-08 11:58:19 -05:00
joshaber
eda726cfb5 Use a typedef for the submodule_foreach callback.
This fits with the style for the rest of the project, but more
importantly, makes life easier for bindings authors who auto-generate
code.
2015-12-08 11:34:00 -05:00
Patrick Steinhardt
b057fdef69 index: always queue remove_entry for removal
When replacing an index with a new one, we need to iterate
through all index entries in order to determine which entries are
equal. When it is not possible to re-use old entries for the new
index, we move it into a list of entries that are to be removed
and thus free'd.

When we encounter a non-zero error code, though, we skip adding
the current index entry to the remove-queue. `INSERT_MAP_EX`,
which is the function last run before adding to the remove-queue,
may return a positive non-zero code that indicates what exactly
happened while inserting the element. In this case we skip adding
the entry to the remove-queue but still continue the current
operation, leading to a leak of the current entry.

Fix this by checking for a negative return value instead of a
non-zero one when we want to add the current index entry to the
remove-queue.
2015-12-08 16:29:08 +01:00
Carlos Martín Nieto
fc43646965 tree: mark a tree as already sorted
The trees are sorted on-disk, so we don't have to go over them
again. This cuts almost a fifth of time spent parsing trees.
2015-12-06 23:17:19 +01:00
Carlos Martín Nieto
a3dc4190e7 Merge pull request #3526 from sschuberth/cmake-number-compare
CMakeLists: Compare CMAKE_SIZEOF_VOID_P as a number, not as a string
2015-12-06 18:11:54 +01:00
Carlos Martín Nieto
8febe654be Merge pull request #3529 from mgorny/fix-checkout-test-umask
checkout test: Apply umask to file-mode test as well
2015-12-06 18:11:37 +01:00
Edward Thomson
5d1f31c6e6 Merge pull request #3530 from libgit2/cmn/parse-mode
tree: use a specialised mode parse function
2015-12-03 17:42:52 -05:00