]> git.proxmox.com Git - libgit2.git/log
libgit2.git
11 years agorefs: handle ALLOW_ONELEVEL normalization with leading slash
Carlos Martín Nieto [Thu, 31 Jan 2013 19:23:30 +0000 (20:23 +0100)]
refs: handle ALLOW_ONELEVEL normalization with leading slash

A leading slash confuses the name normalization code when the flags
include ALLOW_ONELEVEL. Catch this case in particular to avoid
triggering an assertion in the uppercase check which expects us not to
pass it an empty string.

The existing tests don't catch this as they simply use the NORMAL
flag.

This fixes #1300.

11 years agoMerge pull request #1297 from arrbee/diff-patch-line-totals
Vicent Martí [Wed, 30 Jan 2013 22:45:12 +0000 (14:45 -0800)]
Merge pull request #1297 from arrbee/diff-patch-line-totals

Add helper API for diff line stats from patch

11 years agoLet people know that the ML is deprecated
Vicent Martí [Wed, 30 Jan 2013 20:24:38 +0000 (12:24 -0800)]
Let people know that the ML is deprecated

11 years agoFree buffer at end of test
Russell Belfer [Wed, 30 Jan 2013 19:25:20 +0000 (11:25 -0800)]
Free buffer at end of test

11 years agoAdd helper for diff line stats
Russell Belfer [Wed, 30 Jan 2013 19:10:39 +0000 (11:10 -0800)]
Add helper for diff line stats

This adds a `git_diff_patch_line_stats()` API that gets the total
number of adds, deletes, and context lines in a patch.  This will
make it a little easier to emulate `git diff --stat` and the like.

Right now, this relies on generating the `git_diff_patch` object,
which is a pretty heavyweight way to get stat information.  At
some future point, it would probably be nice to be able to get
this information without allocating the entire `git_diff_patch`,
but that's a much larger project.

11 years agoMerge pull request #1296 from arrbee/stricter-config-name-checks
Vicent Martí [Tue, 29 Jan 2013 21:57:53 +0000 (13:57 -0800)]
Merge pull request #1296 from arrbee/stricter-config-name-checks

Stricter config entry name validation

11 years agoMerge pull request #1295 from carlosmn/obsd
Vicent Martí [Tue, 29 Jan 2013 21:54:30 +0000 (13:54 -0800)]
Merge pull request #1295 from carlosmn/obsd

Fix p_realpath on OpenBSD

11 years agoMerge pull request #1285 from phkelley/vector
Russell Belfer [Tue, 29 Jan 2013 21:54:08 +0000 (13:54 -0800)]
Merge pull request #1285 from phkelley/vector

Vector improvements and their fallout

11 years agoNow with no multiply
Philip Kelley [Tue, 29 Jan 2013 21:49:12 +0000 (16:49 -0500)]
Now with no multiply

11 years agoTest config name validation
Russell Belfer [Tue, 29 Jan 2013 20:16:59 +0000 (12:16 -0800)]
Test config name validation

This is @nulltoken's work to test various invalid config section
and key names and make sure we are validating properly.

11 years agoImplement config key validation rules
Russell Belfer [Tue, 29 Jan 2013 20:15:18 +0000 (12:15 -0800)]
Implement config key validation rules

This is a new implementation of core git's config key checking
rules that prevents non-alphanumeric characters (and '-') for
the top-level section and key names inside of config files.

This also validates the target section name when renaming
sections.

11 years agoTest buf join with NULL behavior explicitly
Russell Belfer [Tue, 29 Jan 2013 20:13:24 +0000 (12:13 -0800)]
Test buf join with NULL behavior explicitly

11 years agoFix p_realpath on OpenBSD
Carlos Martín Nieto [Tue, 29 Jan 2013 17:00:32 +0000 (18:00 +0100)]
Fix p_realpath on OpenBSD

OpenBSD's realpath(3) doesn't require the last part of the path to
exist. Override p_realpath in this OS to bring it in line with the
library's assumptions.

11 years agoMerge pull request #1289 from jwiegley/development
Vicent Martí [Mon, 28 Jan 2013 22:54:19 +0000 (14:54 -0800)]
Merge pull request #1289 from jwiegley/development

Added git_treebuilder_entrycount

11 years agoAdded git_treebuilder_entrycount
John Wiegley [Mon, 28 Jan 2013 21:56:04 +0000 (15:56 -0600)]
Added git_treebuilder_entrycount

Conflicts:
src/tree.c

11 years agoFix 2 bugs in online::push tests.
Congyi Wu [Mon, 28 Jan 2013 21:13:19 +0000 (16:13 -0500)]
Fix 2 bugs in online::push tests.

- Fix stack corruption introduced in 9bccf33c due to passing pointer to
local variable _cred_acquire_called.
- Fix strcmp in do_verify_push_status when expected or actual push_status
  is NULL

11 years agoMerge pull request #1283 from lznuaa/master
Vicent Martí [Sun, 27 Jan 2013 21:15:48 +0000 (13:15 -0800)]
Merge pull request #1283 from lznuaa/master

Fix local repository clone failure

11 years agoVector improvements and their fallout
Philip Kelley [Sun, 27 Jan 2013 19:17:07 +0000 (14:17 -0500)]
Vector improvements and their fallout

11 years agoFix fail clone local repository because can't found object
Frank Li [Sun, 27 Jan 2013 05:36:37 +0000 (13:36 +0800)]
Fix fail clone local repository because can't found object

avoid use object which is already free

Signed-off-by: Frank Li <lznuaa@gmail.com>
11 years agoFix a mutex leak in pack.c
Philip Kelley [Sat, 26 Jan 2013 20:12:53 +0000 (15:12 -0500)]
Fix a mutex leak in pack.c

11 years agoExpand valgrind suppressions even more for libssl, libcrypto
Philip Kelley [Sat, 26 Jan 2013 04:35:04 +0000 (23:35 -0500)]
Expand valgrind suppressions even more for libssl, libcrypto

11 years agoMerge pull request #1278 from sba1/cl-assert-equal-s
Vicent Martí [Sat, 26 Jan 2013 04:37:39 +0000 (20:37 -0800)]
Merge pull request #1278 from sba1/cl-assert-equal-s

Use cl_assert_equal_s() instead of strcmp().

11 years agoMerge pull request #1281 from phkelley/valgrind
Vicent Martí [Sat, 26 Jan 2013 04:35:03 +0000 (20:35 -0800)]
Merge pull request #1281 from phkelley/valgrind

Improve valgrind suppressions

11 years agoImprove valgrind suppressions
Philip Kelley [Sat, 26 Jan 2013 04:24:13 +0000 (23:24 -0500)]
Improve valgrind suppressions

11 years agoFix 3 memory leaks
Philip Kelley [Sat, 26 Jan 2013 03:43:52 +0000 (22:43 -0500)]
Fix 3 memory leaks

11 years agoMerge pull request #1279 from carlosmn/config-trailing-backslash
Vicent Martí [Fri, 25 Jan 2013 20:02:21 +0000 (12:02 -0800)]
Merge pull request #1279 from carlosmn/config-trailing-backslash

config: support trailing backslashes

11 years agoMerge pull request #1280 from nulltoken/fix/clone-segfault
Vicent Martí [Fri, 25 Jan 2013 20:01:36 +0000 (12:01 -0800)]
Merge pull request #1280 from nulltoken/fix/clone-segfault

clone: Prevent segfault upon faulted remote creation

11 years agoconfig: support trailing backslashes
Carlos Martín Nieto [Fri, 25 Jan 2013 12:29:28 +0000 (13:29 +0100)]
config: support trailing backslashes

Check whether the backslash at the end of the line is being escaped or
not so as not to consider it a continuation marker when it's e.g. a
Windows-style path.

11 years agotests-clar: ifdef GIT_WIN32 win helper functions
Michael Schubert [Thu, 24 Jan 2013 19:38:01 +0000 (20:38 +0100)]
tests-clar: ifdef GIT_WIN32 win helper functions

11 years agoclone: Prevent segfault upon faulted remote creation
nulltoken [Fri, 25 Jan 2013 11:00:27 +0000 (12:00 +0100)]
clone: Prevent segfault upon faulted remote creation

11 years agoUse cl_assert_equal_s() instead of strcmp().
Sebastian Bauer [Fri, 25 Jan 2013 05:48:55 +0000 (06:48 +0100)]
Use cl_assert_equal_s() instead of strcmp().

Replaced all cl_assert(!strcmp()) or semantically equivalent forms
by cl_assert_equal_s().

11 years agoMerge pull request #1277 from sba1/branch-name
Vicent Martí [Fri, 25 Jan 2013 04:45:00 +0000 (20:45 -0800)]
Merge pull request #1277 from sba1/branch-name

Add git_branch_name()

11 years agoAdded git_branch_name().
Sebastian Bauer [Thu, 24 Jan 2013 19:44:17 +0000 (20:44 +0100)]
Added git_branch_name().

This is a convenience function to get the branch name of a given
ref. The returned branch name is compatible with the name that can
be supplied e.g. to git_branch_lookup(). That is, the prefixes
"refs/heads" or "refs/remotes" are omitted.

Also added a new test for testing the new function.

11 years agoindex: Speed up loading a tree into the index
Scott J. Goldman [Fri, 25 Jan 2013 02:53:08 +0000 (18:53 -0800)]
index: Speed up loading a tree into the index

The index is empty; repeated tree entries cannot collide.

cc github/gitrpc#83

11 years agoLeak cleanup in push tests
Philip Kelley [Thu, 24 Jan 2013 19:04:35 +0000 (14:04 -0500)]
Leak cleanup in push tests

11 years agoMerge pull request #1250 from jamill/push_update_tips
Philip Kelley [Thu, 24 Jan 2013 19:03:11 +0000 (11:03 -0800)]
Merge pull request #1250 from jamill/push_update_tips

Update remote tips on push

11 years agoMerge pull request #1275 from ethomson/examples_windows
Vicent Martí [Wed, 23 Jan 2013 23:55:29 +0000 (15:55 -0800)]
Merge pull request #1275 from ethomson/examples_windows

update examples to work on windows

11 years agoupdate examples to work on windows
Edward Thomson [Wed, 23 Jan 2013 23:38:00 +0000 (17:38 -0600)]
update examples to work on windows

11 years agoopts: Some basic tests
Vicent Marti [Wed, 23 Jan 2013 23:09:55 +0000 (00:09 +0100)]
opts: Some basic tests

11 years agoopts: Add getters too
Vicent Marti [Wed, 23 Jan 2013 22:44:34 +0000 (23:44 +0100)]
opts: Add getters too

11 years agoMerge pull request #1273 from sba1/example-diff-fix
Vicent Martí [Wed, 23 Jan 2013 07:03:53 +0000 (23:03 -0800)]
Merge pull request #1273 from sba1/example-diff-fix

Don't clear the opt instance in the diff example.

11 years agoDon't clear the opt instance in the diff example.
Sebastian Bauer [Wed, 23 Jan 2013 06:47:40 +0000 (07:47 +0100)]
Don't clear the opt instance in the diff example.

The version field is overwritten otherwise. The opt instance is
already initialized properly.

11 years agoMerge pull request #1271 from libgit2/global-settings
Vicent Martí [Wed, 23 Jan 2013 02:55:56 +0000 (18:55 -0800)]
Merge pull request #1271 from libgit2/global-settings

Global options setter

11 years agoGlobal options setter
Vicent Marti [Wed, 23 Jan 2013 01:58:58 +0000 (02:58 +0100)]
Global options setter

11 years agoMerge pull request #1270 from libgit2/packed-peeled-objects-fix
Russell Belfer [Wed, 23 Jan 2013 00:02:43 +0000 (16:02 -0800)]
Merge pull request #1270 from libgit2/packed-peeled-objects-fix

Allow peeled references without trailing newline at end of file

11 years agoSeperate out a new test that verifies packed-refs with no trailing newline
Scott J. Goldman [Wed, 23 Jan 2013 00:01:03 +0000 (16:01 -0800)]
Seperate out a new test that verifies packed-refs with no trailing newline

as per @vmg's request

11 years agoAllow peeled references without trailing newline at end of file
Scott J. Goldman [Tue, 22 Jan 2013 23:49:51 +0000 (15:49 -0800)]
Allow peeled references without trailing newline at end of file

Also ammends one of the tag tests to make sure it's working.

11 years agoMerge pull request #1269 from arrbee/tree-iterator-case-sensitivity-bug
Vicent Martí [Tue, 22 Jan 2013 23:31:44 +0000 (15:31 -0800)]
Merge pull request #1269 from arrbee/tree-iterator-case-sensitivity-bug

Fix case sensitivity bug with tree iterators

11 years agoFix case sensitivity bug with tree iterators
Russell Belfer [Tue, 22 Jan 2013 23:28:25 +0000 (15:28 -0800)]
Fix case sensitivity bug with tree iterators

With the new code to make tree iterators support ignore_case,
there is a bug in setting the start entry for range bounded
iterators where memcmp was being used instead of strncasecmp.
This fixes that and expands the tree iterator test to cover
the cases that were broken.

11 years agoRevert "Handle packed peeled objects without trailing newlines"
Scott J. Goldman [Tue, 22 Jan 2013 22:08:50 +0000 (14:08 -0800)]
Revert "Handle packed peeled objects without trailing newlines"

This reverts commit 28b1cdf3a1bdcd37cf9d550c92b8c19b1782ea6b.

//cc #1262 #1267

11 years agoMerge pull request #1268 from phkelley/development
Vicent Martí [Tue, 22 Jan 2013 17:20:09 +0000 (09:20 -0800)]
Merge pull request #1268 from phkelley/development

A simple perf optimization in pack-objects.c

11 years agoUpdate remote tips on push
Jameson Miller [Thu, 17 Jan 2013 15:20:33 +0000 (10:20 -0500)]
Update remote tips on push

11 years agoFix gen_pktline format specifier for Win32
Philip Kelley [Tue, 22 Jan 2013 14:25:15 +0000 (09:25 -0500)]
Fix gen_pktline format specifier for Win32

11 years agoA simple perf optimization in pack-objects.c
Philip Kelley [Tue, 22 Jan 2013 13:21:08 +0000 (08:21 -0500)]
A simple perf optimization in pack-objects.c

11 years agoMerge pull request #1267 from libgit2/no-newline
Vicent Martí [Mon, 21 Jan 2013 23:09:38 +0000 (15:09 -0800)]
Merge pull request #1267 from libgit2/no-newline

Handle packed peeled objects without trailing newlines

11 years agoHandle packed peeled objects without trailing newlines
Scott J. Goldman [Mon, 21 Jan 2013 22:45:43 +0000 (14:45 -0800)]
Handle packed peeled objects without trailing newlines

Fixes #1262

11 years agoMerge pull request #1266 from arrbee/update-clar
Vicent Martí [Mon, 21 Jan 2013 21:41:35 +0000 (13:41 -0800)]
Merge pull request #1266 from arrbee/update-clar

Update clar to a80e7f30

11 years agoUpdate clar to a80e7f30
Russell Belfer [Mon, 21 Jan 2013 21:39:53 +0000 (13:39 -0800)]
Update clar to a80e7f30

11 years agoMerge pull request #1265 from arrbee/parse-commit-time-as-uint64
Vicent Martí [Mon, 21 Jan 2013 21:23:13 +0000 (13:23 -0800)]
Merge pull request #1265 from arrbee/parse-commit-time-as-uint64

Parse commit time as uint64_t to avoid overflow

11 years agoParse commit time as uint64_t to avoid overflow
Russell Belfer [Mon, 21 Jan 2013 21:19:41 +0000 (13:19 -0800)]
Parse commit time as uint64_t to avoid overflow

The commit time is already stored as a git_time_t, but we were
parsing is as a uint32_t.  This just switches the parser to use
uint64_t which will handle dates further in the future (and adds
some tests of those future dates).

11 years agocommit: don't include the LF in the header field value
Carlos Martín Nieto [Sun, 20 Jan 2013 03:20:09 +0000 (04:20 +0100)]
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.

11 years agoFix compilation on OpenBSD
Carlos Martín Nieto [Sun, 20 Jan 2013 00:57:32 +0000 (01:57 +0100)]
Fix compilation on OpenBSD

11 years agoMerge pull request #1260 from phkelley/development
Philip Kelley [Fri, 18 Jan 2013 20:05:10 +0000 (12:05 -0800)]
Merge pull request #1260 from phkelley/development

Fix really bad error handling in git_smart__negotiate_fetch

11 years agoFix really bad error handling in git_smart__negotiate_fetch
Philip Kelley [Fri, 18 Jan 2013 19:51:46 +0000 (14:51 -0500)]
Fix really bad error handling in git_smart__negotiate_fetch

11 years agoMerge pull request #1258 from zcbenz/fix_index_remove_test
Vicent Martí [Fri, 18 Jan 2013 06:09:57 +0000 (22:09 -0800)]
Merge pull request #1258 from zcbenz/fix_index_remove_test

Fix linking error caused by ddcb28a41f3774e26fc6ae0a7174a5565e4749ce.

11 years agoFix linking error caused by ddcb28a41f3774e26fc6ae0a7174a5565e4749ce.
Zhao Cheng [Fri, 18 Jan 2013 05:22:55 +0000 (13:22 +0800)]
Fix linking error caused by ddcb28a41f3774e26fc6ae0a7174a5565e4749ce.

11 years agoMerge pull request #1239 from ethomson/index_remove
Vicent Martí [Fri, 18 Jan 2013 00:56:57 +0000 (16:56 -0800)]
Merge pull request #1239 from ethomson/index_remove

add an index_remove_bypath that removes conflicts

11 years agoMerge pull request #1256 from arrbee/asciify-test-data
Vicent Martí [Fri, 18 Jan 2013 00:33:40 +0000 (16:33 -0800)]
Merge pull request #1256 from arrbee/asciify-test-data

Move all non-ascii test data to raw hex

11 years agoMerge pull request #1257 from ethomson/crlf_test_fix
Vicent Martí [Fri, 18 Jan 2013 00:32:46 +0000 (16:32 -0800)]
Merge pull request #1257 from ethomson/crlf_test_fix

add a git config, don't run crlf tests on non-win32

11 years agoadd a git config, don't run crlf tests on non-win32
Edward Thomson [Fri, 18 Jan 2013 00:18:44 +0000 (18:18 -0600)]
add a git config, don't run crlf tests on non-win32

11 years agoMove all non-ascii test data to raw hex
Russell Belfer [Thu, 17 Jan 2013 23:47:10 +0000 (15:47 -0800)]
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.

11 years agoMerge pull request #1244 from carlosmn/pack-evict
Vicent Martí [Thu, 17 Jan 2013 21:45:52 +0000 (13:45 -0800)]
Merge pull request #1244 from carlosmn/pack-evict

A comparison of eviction algorithms for the delta base cache

11 years agoMerge pull request #1247 from sba1/dont-segfault-if-transport-doesnt-support-push
Ben Straub [Thu, 17 Jan 2013 21:37:32 +0000 (13:37 -0800)]
Merge pull request #1247 from sba1/dont-segfault-if-transport-doesnt-support-push

Don't segfault if transport doesn't support push.

11 years agoMerge pull request #1255 from arrbee/fix-signed-commit-header-parsing
Vicent Martí [Thu, 17 Jan 2013 21:36:33 +0000 (13:36 -0800)]
Merge pull request #1255 from arrbee/fix-signed-commit-header-parsing

Add skipping of unknown commit headers

11 years agoMerge pull request #1254 from ethomson/index_filtered_size
Vicent Martí [Thu, 17 Jan 2013 21:34:20 +0000 (13:34 -0800)]
Merge pull request #1254 from ethomson/index_filtered_size

cache should contain on-disk (filtered) file size

11 years agoTest that pushs properly fail for transports that don't provide a push implementation.
Sebastian Bauer [Thu, 17 Jan 2013 21:27:04 +0000 (22:27 +0100)]
Test that pushs properly fail for transports that don't provide a push implementation.

11 years agoAdd skipping of unknown commit headers
Russell Belfer [Thu, 17 Jan 2013 21:19:09 +0000 (13:19 -0800)]
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.

11 years agocache should contain on-disk (filtered) file size
Edward Thomson [Thu, 17 Jan 2013 19:11:57 +0000 (13:11 -0600)]
cache should contain on-disk (filtered) file size

11 years agoDon't segfault if transport doesn't support push.
Sebastian Bauer [Tue, 15 Jan 2013 20:39:37 +0000 (21:39 +0100)]
Don't segfault if transport doesn't support push.

Instead, set an more informative error message.

11 years agoMerge pull request #1211 from arrbee/fix-icase-status-file
Vicent Martí [Wed, 16 Jan 2013 23:52:58 +0000 (15:52 -0800)]
Merge pull request #1211 from arrbee/fix-icase-status-file

Fix case insensitivity issues in git_status_file

11 years agoMerge pull request #1248 from sba1/doc-fix
Vicent Martí [Wed, 16 Jan 2013 22:20:41 +0000 (14:20 -0800)]
Merge pull request #1248 from sba1/doc-fix

Some doc improvements in transport.h

11 years agoMerge pull request #1245 from nulltoken/topic/git_branch_tracking_name
Vicent Martí [Wed, 16 Jan 2013 22:17:48 +0000 (14:17 -0800)]
Merge pull request #1245 from nulltoken/topic/git_branch_tracking_name

Introduce git_branch_tracking_name()

11 years agobranch: Introduce git_branch_tracking_name()
nulltoken [Mon, 14 Jan 2013 13:22:11 +0000 (14:22 +0100)]
branch: Introduce git_branch_tracking_name()

11 years agoFix indentations
nulltoken [Mon, 14 Jan 2013 11:09:10 +0000 (12:09 +0100)]
Fix indentations

11 years agoSome doc improvements
Sebastian Bauer [Wed, 16 Jan 2013 11:25:28 +0000 (12:25 +0100)]
Some doc improvements

11 years agoShortcut spool and sort for empty iterator
Russell Belfer [Thu, 10 Jan 2013 19:11:42 +0000 (11:11 -0800)]
Shortcut spool and sort for empty iterator

11 years agoSupport case insensitive tree iterators and status
Russell Belfer [Thu, 10 Jan 2013 00:07:54 +0000 (16:07 -0800)]
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.

11 years agoAdd git_tree_entry_cmp and git_tree_entry_icmp
Russell Belfer [Thu, 10 Jan 2013 00:03:35 +0000 (16:03 -0800)]
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.

11 years agoAdd git_path_icmp to case-insensitive path cmp
Russell Belfer [Thu, 10 Jan 2013 00:02:42 +0000 (16:02 -0800)]
Add git_path_icmp to case-insensitive path cmp

This adds git_path_icmp to complement git_path_cmp.

11 years agoAdd payload "_r" versions of bsearch and tsort
Russell Belfer [Thu, 10 Jan 2013 00:00:16 +0000 (16:00 -0800)]
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.

11 years agoTest for ignore_case ranges on workdir iterator
Russell Belfer [Tue, 8 Jan 2013 23:56:11 +0000 (15:56 -0800)]
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.

11 years agoUpdate iterator API with flags for ignore_case
Russell Belfer [Tue, 8 Jan 2013 23:53:13 +0000 (15:53 -0800)]
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.

11 years agoFix err msg for ambiguous path in git_status_file
Russell Belfer [Tue, 8 Jan 2013 21:45:06 +0000 (13:45 -0800)]
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.

11 years agoMinor iterator API cleanups
Russell Belfer [Tue, 8 Jan 2013 21:39:15 +0000 (13:39 -0800)]
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

11 years agoSimplify git_diff__paired_foreach icase handling
Russell Belfer [Tue, 8 Jan 2013 21:27:25 +0000 (13:27 -0800)]
Simplify git_diff__paired_foreach icase handling

11 years agostatus: Enhance git_status_file() test coverage
nulltoken [Sat, 5 Jan 2013 19:58:25 +0000 (20:58 +0100)]
status: Enhance git_status_file() test coverage

11 years agoMerge pull request #1238 from nulltoken/fix/checkout-index
Russell Belfer [Tue, 15 Jan 2013 17:46:50 +0000 (09:46 -0800)]
Merge pull request #1238 from nulltoken/fix/checkout-index

checkout: Teach checkout to cope with orphaned Head

11 years agoMerge pull request #1242 from sba1/init-with-template-fix
Russell Belfer [Mon, 14 Jan 2013 18:05:35 +0000 (10:05 -0800)]
Merge pull request #1242 from sba1/init-with-template-fix

Some fixes for external template support

11 years agopack: evict all of the pages at once
Carlos Martín Nieto [Mon, 14 Jan 2013 16:42:12 +0000 (17:42 +0100)]
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.

11 years agopack: evict objects from the cache in groups of eight
Carlos Martín Nieto [Mon, 14 Jan 2013 15:39:22 +0000 (16:39 +0100)]
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.