Commit Graph

4069 Commits

Author SHA1 Message Date
Scott J. Goldman
28b1cdf3a1 Handle packed peeled objects without trailing newlines
Fixes #1262
2013-01-21 14:46:28 -08:00
Carlos Martín Nieto
d47c6aabfe commit: don't include the LF in the header field value
When the encoding header changed to be treated as an additional
header, the EOL pointer started to point to the byte after the LF,
making the git__strndup call copy the LF into the value.

Increase the EOL pointer value after copying the data to keep the rest
of the semantics but avoid copying LF.
2013-01-20 04:20:09 +01:00
Carlos Martín Nieto
7a2cf780d1 Fix compilation on OpenBSD 2013-01-20 01:57:32 +01:00
Philip Kelley
d77f80d841 Merge pull request #1260 from phkelley/development
Fix really bad error handling in git_smart__negotiate_fetch
2013-01-18 12:05:10 -08:00
Philip Kelley
77844988b8 Fix really bad error handling in git_smart__negotiate_fetch 2013-01-18 14:51:46 -05:00
Vicent Martí
537abd4a2c Merge pull request #1258 from zcbenz/fix_index_remove_test
Fix linking error caused by ddcb28a41f.
2013-01-17 22:09:57 -08:00
Zhao Cheng
c55c624441 Fix linking error caused by ddcb28a41f. 2013-01-18 13:22:55 +08:00
Vicent Martí
ddcb28a41f Merge pull request #1239 from ethomson/index_remove
add an index_remove_bypath that removes conflicts
2013-01-17 16:56:57 -08:00
Vicent Martí
3a93ab9065 Merge pull request #1256 from arrbee/asciify-test-data
Move all non-ascii test data to raw hex
2013-01-17 16:33:40 -08:00
Vicent Martí
214bf53b41 Merge pull request #1257 from ethomson/crlf_test_fix
add a git config, don't run crlf tests on non-win32
2013-01-17 16:32:46 -08:00
Edward Thomson
271680d7f4 add a git config, don't run crlf tests on non-win32 2013-01-17 18:18:44 -06:00
Russell Belfer
f63d0ee9fc Move all non-ascii test data to raw hex
This takes all of the characters in core::env and makes them use
hex sequences instead of keeping tricky character data inline in
the test.
2013-01-17 15:47:10 -08:00
Vicent Martí
75f49ae49b Merge pull request #1244 from carlosmn/pack-evict
A comparison of eviction algorithms for the delta base cache
2013-01-17 13:45:52 -08:00
Ben Straub
c49fa037cc Merge pull request #1247 from sba1/dont-segfault-if-transport-doesnt-support-push
Don't segfault if transport doesn't support push.
2013-01-17 13:37:32 -08:00
Vicent Martí
5c8901ab80 Merge pull request #1255 from arrbee/fix-signed-commit-header-parsing
Add skipping of unknown commit headers
2013-01-17 13:36:33 -08:00
Vicent Martí
56af285c80 Merge pull request #1254 from ethomson/index_filtered_size
cache should contain on-disk (filtered) file size
2013-01-17 13:34:20 -08:00
Sebastian Bauer
b90eb84ff9 Test that pushs properly fail for transports that don't provide a push implementation. 2013-01-17 22:32:37 +01:00
Russell Belfer
291090a076 Add skipping of unknown commit headers
This moves the check for the "encoding" header into a loop which
is just scanning for non-required headers at the end of a commit
header.  That loop will skip unrecognized lines (including header
continuation lines) until a terminating completely blank line is
found, and only then does it move to reading the commit message.
2013-01-17 13:19:09 -08:00
Edward Thomson
6e959708e5 cache should contain on-disk (filtered) file size 2013-01-17 15:17:32 -06:00
Sebastian Bauer
9bf56c7b1c Don't segfault if transport doesn't support push.
Instead, set an more informative error message.
2013-01-17 20:55:06 +01:00
Vicent Martí
34a4ad46e8 Merge pull request #1211 from arrbee/fix-icase-status-file
Fix case insensitivity issues in git_status_file
2013-01-16 15:52:58 -08:00
Vicent Martí
4b45675d7c Merge pull request #1248 from sba1/doc-fix
Some doc improvements in transport.h
2013-01-16 14:20:41 -08:00
Vicent Martí
365485e3c6 Merge pull request #1245 from nulltoken/topic/git_branch_tracking_name
Introduce git_branch_tracking_name()
2013-01-16 14:17:48 -08:00
nulltoken
bf031581d3 branch: Introduce git_branch_tracking_name() 2013-01-16 22:56:13 +01:00
nulltoken
28cbd2e2a8 Fix indentations 2013-01-16 22:53:59 +01:00
Sebastian Bauer
62d4fa23a8 Some doc improvements 2013-01-16 12:25:28 +01:00
Russell Belfer
fffe429a20 Shortcut spool and sort for empty iterator 2013-01-15 09:51:35 -08:00
Russell Belfer
25423d03b8 Support case insensitive tree iterators and status
This makes tree iterators directly support case insensitivity by
using a secondary index that can be sorted by icase.  Also, this
fixes the ambiguity check in the git_status_file API to also be
case insensitive.  Lastly, this adds new test cases for case
insensitive range boundary checking for all types of iterators.

With this change, it should be possible to deprecate the spool
and sort iterator, but I haven't done that yet.
2013-01-15 09:51:35 -08:00
Russell Belfer
98527b5b24 Add git_tree_entry_cmp and git_tree_entry_icmp
This adds a new external API git_tree_entry_cmp and a new internal
API git_tree_entry_icmp for sorting tree entries.  The case
insensitive one is internal only because general users should
never be seeing case-insensitively sorted trees.
2013-01-15 09:51:35 -08:00
Russell Belfer
23594c1dae Add git_path_icmp to case-insensitive path cmp
This adds git_path_icmp to complement git_path_cmp.
2013-01-15 09:51:35 -08:00
Russell Belfer
851ad65081 Add payload "_r" versions of bsearch and tsort
git__bsearch and git__tsort did not pass a payload through to the
comparison function.  This makes it impossible to implement sorted
lists where the sort order depends on external data (e.g. building
a secondary sort order for the entries in a tree).  This commit
adds git__bsearch_r and git__tsort_r versions that pass a third
parameter to the cmp function of a user payload.
2013-01-15 09:51:35 -08:00
Russell Belfer
a49340c3e5 Test for ignore_case ranges on workdir iterator
This adds a test that confirms that the working directory iterator
can actually correctly process ranges of files case insensitively
with proper sorting and proper boundaries.
2013-01-15 09:51:34 -08:00
Russell Belfer
134d8c918c Update iterator API with flags for ignore_case
This changes the iterator API so that flags can be passed in to
the constructor functions to control the ignore_case behavior.
At this point, the flags are not supported on tree iterators (i.e.
there is no functional change over the old API), but the API
changes are all made to accomodate this.

By the way, I went with a flags parameter because in the future
I have a couple of other ideas for iterator flags that will make
it easier to fix some diff/status/checkout bugs.
2013-01-15 09:51:34 -08:00
Russell Belfer
5c8bb98ce9 Fix err msg for ambiguous path in git_status_file
Returning GIT_EAMBIGUOUS from inside the status callback gets
overridden with GIT_EUSER.  `git_status_file` accounted for this
via the callback payload, but was allowing the error message to
be cleared.  Move the `giterr_set` call outside the callback to
where the EUSER case was being dealt with.
2013-01-15 09:49:32 -08:00
Russell Belfer
4b18103755 Minor iterator API cleanups
In preparation for further iterator changes, this cleans up a few
small things in the iterator API:

* removed the git_iterator_for_repo_index_range API
* made git_iterator_free not be inlined
* minor param name and test function name tweaks
2013-01-15 09:49:32 -08:00
Russell Belfer
facc0650b1 Simplify git_diff__paired_foreach icase handling 2013-01-15 09:49:32 -08:00
nulltoken
bcbb1e201b status: Enhance git_status_file() test coverage 2013-01-15 09:49:32 -08:00
Russell Belfer
230010d19b Merge pull request #1238 from nulltoken/fix/checkout-index
checkout: Teach checkout to cope with orphaned Head
2013-01-15 09:46:50 -08:00
Russell Belfer
848d77dc83 Merge pull request #1242 from sba1/init-with-template-fix
Some fixes for external template support
2013-01-14 10:05:35 -08:00
Carlos Martín Nieto
9c62aaab40 pack: evict all of the pages at once
Somewhat surprisingly, this can increase the speed considerably, as we
don't bother trying to decide what to evict, and the most used entries
are quickly back into the cache.
2013-01-14 18:10:56 +01:00
Carlos Martín Nieto
ed6648ba46 pack: evict objects from the cache in groups of eight
This drops the cache eviction below libcrypto and zlib in the perf
output. The number has been chosen empirically.
2013-01-14 17:16:45 +01:00
Sebastian Bauer
72719e7333 Altered the description of the template.
Before, it was identical to the default template making it difficult
to check, if the proper template was copied an external template
test.
2013-01-13 12:26:52 +01:00
Sebastian Bauer
5885ba112d Now checks in the template test whether the description file has
been properly copied.

This is a minimal effort to test whether the template really has
been used when creating an repo with external templates.
2013-01-13 12:26:52 +01:00
Sebastian Bauer
85f4031276 Do not use GIT_CPDIR_CHMOD flag when copying the template.
This is an intermin solution. While this essentially disables the
--shared flag feature, previously external templates did not work
at all. This change fixes the previously corrected, and since
then failing, repo_init__extended_with_template() test.

The problem is now documented in the source code comments.
2013-01-13 11:35:08 +01:00
nulltoken
5b524d6902 Fix Travis compilation warnings 2013-01-13 10:25:55 +01:00
nulltoken
2a3b3e0324 checkout: Teach checkout to cope with orphaned Head
Fix #1236
2013-01-13 10:25:54 +01:00
Edward Thomson
25743bd7c5 add an index_remove_bypath that removes conflicts, renamed add_from_workdir to match 2013-01-12 13:47:56 -06:00
Sebastian Bauer
b7b1acfdbd Clear local error variable after invoking giterr_clear(). 2013-01-12 20:02:00 +01:00
Carlos Martín Nieto
09e29e47b3 pack: fixes to the cache
The offset should be git_off_t, and we should check the return value
of the mutex lock function.
2013-01-12 19:41:30 +01:00
Carlos Martín Nieto
0b3aa7bede tests: plug leaks 2013-01-12 19:01:45 +01:00