Commit Graph

3727 Commits

Author SHA1 Message Date
Carlos Martín Nieto
f56f8585c0 indexer: use the packfile streaming API
The new API allows us to read the object bit by bit from the packfile,
instead of needing it all at once in the packfile. This also allows us
to hash the object as it comes in from the network instead of having
to try to read it all and failing repeatedly for larger objects.

This is only the first step, but it already shows huge improvements
when dealing with objects over a few megabytes in size. It reduces the
memory needs in some cases, but delta objects still need to be
completely in memory and the old inefficent method is still used for
that.
2012-11-30 15:55:23 +01:00
Carlos Martín Nieto
46635339e9 pack: introduce a streaming API for raw objects
This allows us to take objects from the packfile as a stream instead
of having to keep it all in memory.
2012-11-30 15:55:23 +01:00
Carlos Martín Nieto
da82043736 graph: plug leak 2012-11-30 15:26:45 +01:00
Carlos Martín Nieto
2d6aedbf29 valgrind: ignore leaks from OpenSSL 2012-11-30 15:23:20 +01:00
Carlos Martín Nieto
9ff07c24f5 buf test: make sure we always set the bom variable 2012-11-30 15:17:05 +01:00
Russell Belfer
f684970a10 Merge pull request #1108 from libgit2/ahead-behind-count
Add API to calculate ahead/behind count
2012-11-29 22:53:34 -08:00
Scott J. Goldman
1a0c5a34e0 Fixup ahead/behind tests
Fix a typo that caused a failing test, and use cl_assert_equal
instead of cl_assert.
2012-11-29 18:11:30 -08:00
Scott J. Goldman
bdf3e6df83 Fix error condition typo 2012-11-29 17:34:41 -08:00
Russell Belfer
d5e44d8498 Fix function name and add real error check
`revwalk.h:commit_lookup()` -> `git_revwalk__commit_lookup()`
and make `git_commit_list_parse()` do real error checking that
the item in the list is an actual commit object.  Also fixed an
apparent typo in a test name.
2012-11-29 17:02:27 -08:00
Vicent Martí
f1e5c506b2 Merge pull request #1110 from libgit2/features/push_rebased
Push! By schu, phkelley, and congyiwu
2012-11-29 12:18:05 -08:00
Philip Kelley
36c730daa0 Remove more sample hooks from test repo for push 2012-11-29 10:34:16 -05:00
Philip Kelley
3238ee3e07 Remove sample hooks from test repo for push 2012-11-29 08:37:32 -05:00
Philip Kelley
4a6621fdf7 Leverage the min macro from util.h 2012-11-29 08:35:21 -05:00
Philip Kelley
6762fe087b Remove casts of return values of type void * 2012-11-29 08:29:26 -05:00
Philip Kelley
ac22d08f2f Remove git_object_oid2type 2012-11-29 08:22:15 -05:00
Vicent Martí
e2934db2c7 Merge pull request #1090 from arrbee/ignore-invalid-by-default
Ignore invalid entries by default
2012-11-29 02:05:46 -08:00
Vicent Martí
ee06fec507 Merge pull request #1083 from nulltoken/fix/tracking
Fix git_branch_tracking() for branches with empty merge and/or remote config entries
2012-11-29 01:29:50 -08:00
Vicent Martí
2775d1cb8f Merge pull request #1102 from nulltoken/topic/fetch-test-coverage
fetch: enhance test coverage
2012-11-29 01:02:08 -08:00
Vicent Martí
3ae550e36c Merge pull request #1107 from nulltoken/fix/diff-null-tree-against-workdir
Enhance diff test coverage between a null Tree and the Workdir
2012-11-29 01:01:44 -08:00
Vicent Martí
e7da560af4 Merge pull request #1088 from arrbee/consolidate-text-functions
Consolidate text buffer functions
2012-11-29 00:00:32 -08:00
Scott J. Goldman
b994bfe339 graph.c: prune includes 2012-11-28 18:59:13 -08:00
Scott J. Goldman
0984c8768d Rename git_count_ahead_behind -> git_graph_ahead_behind
Moved it into graph.{c,h} which i created for the new "graph"
functions namespace. Also adjusted the function prototype
to use `size_t` and `const git_oid *`.
2012-11-28 18:54:57 -08:00
Scott J. Goldman
c6d03c958f fix coding style: while( -> while ( 2012-11-28 18:54:57 -08:00
Scott J. Goldman
0d9e0323a5 Add the ahead/behind test that Carlos suggested
Adds a repo with a more complex topology to test the ahead-behind
count.
2012-11-28 18:54:57 -08:00
Scott J. Goldman
eddde61846 Add tests for ahead-behind count 2012-11-28 18:54:57 -08:00
Scott J. Goldman
bff53e5405 Add initial implementation of ahead-behind count 2012-11-28 18:54:56 -08:00
nulltoken
046a1573ff fetch: enhance test coverage 2012-11-29 00:05:16 +01:00
nulltoken
59a0d772f8 diff: enhance test coverage against the workdir 2012-11-28 20:04:34 +01:00
nulltoken
37849a8ec3 tracking: fix retrieval of the tracking ref of branch with empty merge and/or remote entry 2012-11-28 20:00:07 +01:00
nulltoken
f1bd50d61d tracking: remove code duplication in test 2012-11-28 20:00:06 +01:00
nulltoken
35108a216e Fix MSVC compilation warning 2012-11-28 19:37:31 +01:00
Russell Belfer
7bf87ab698 Consolidate text buffer functions
There are many scattered functions that look into the contents of
buffers to do various text manipulations (such as escaping or
unescaping data, calculating text stats, guessing if content is
binary, etc).  This groups all those functions together into a
new file and converts the code to use that.

This has two enhancements to existing functionality.  The old
text stats function is significantly rewritten and the BOM
detection code was extended (although largely we can't deal with
anything other than a UTF8 BOM).
2012-11-28 09:58:48 -08:00
Philip Kelley
613d5eb939 Push! By schu, phkelley, and congyiwu, et al 2012-11-28 11:42:37 -05:00
Vicent Martí
693021262b Merge pull request #1109 from scunz/uninitialized
Fix uninitialized variable
2012-11-28 04:14:24 -08:00
Sascha Cunz
7cdad6c774 Fix uninitialized variable
clang-SVN HEAD kindly provided my the info, that sm_repo maybe
uninitialized when we want to free it (If the expression in line 358 or
359/360 evaluate to true, we jump to "cleanup", where we'd use sm_repo
uninitialized).
2012-11-28 12:43:12 +01:00
Vicent Marti
ae20189170 object: Raise proper code on invalid object type 2012-11-28 11:47:38 +01:00
Vicent Marti
9507a434c6 odb: Add git_odb_add_disk_alternate
Loads a disk alternate by path to the ODB. Mimics the
`GIT_ALTERNATE_OBJECT_DIRECTORIES` shell var.
2012-11-28 10:47:10 +01:00
Ben Straub
64c5112188 Merge pull request #1087 from libgit2/great-renaming
The Great Renaming of 2012
2012-11-27 18:59:22 -08:00
Russell Belfer
ca94e031fa Various minor commenting fixes 2012-11-27 15:28:48 -08:00
Russell Belfer
c3fb7d04ed Make git_odb_foreach_cb take const param
This makes the first OID param of the ODB callback a const pointer
and also propogates that change all the way to the backends.
2012-11-27 15:00:49 -08:00
Russell Belfer
f984d97b22 Clarify git_message_prettify comments 2012-11-27 15:00:28 -08:00
Russell Belfer
2bd5998c9c Remove git_note_data structure 2012-11-27 14:47:39 -08:00
Ben Straub
336d1275ca API updates for transport.h 2012-11-27 14:18:51 -08:00
Ben Straub
f4a62c306d Typedef enums. 2012-11-27 14:13:03 -08:00
Ben Straub
1d8ec670be API updates for stash.h 2012-11-27 14:06:56 -08:00
Ben Straub
ff6b5ac97d API updates for signature.h 2012-11-27 14:03:53 -08:00
Ben Straub
44d9f2cb60 API updates for revwalk.h 2012-11-27 14:01:24 -08:00
Ben Straub
c9fc4a6ff9 API updates for repository.h 2012-11-27 13:44:49 -08:00
Ben Straub
cb7ac81c4d Fix warning 2012-11-27 13:30:04 -08:00
Ben Straub
df705148ec API updates for remote.h
Includes typedef for git_direction, and renames for
GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
2012-11-27 13:19:49 -08:00