Commit Graph

28 Commits

Author SHA1 Message Date
Russell Belfer
98eaf39a87 Fix warnings 2013-11-13 11:12:31 -08:00
nulltoken
8d22773f4b Plug git_merge() related leaks 2013-11-05 17:30:11 +01:00
Edward Thomson
039db728f3 merge branch into current, updating workdir 2013-11-05 10:00:39 -05:00
Edward Thomson
1d3a8aeb4b move mode_t to filebuf_open instead of _commit 2013-11-04 22:33:05 -05:00
Carlos Martín Nieto
1d37da3392 merge: any non-zero return from the user is an error
This fixes #1703.
2013-10-30 16:25:49 +01:00
Carlos Martín Nieto
07fb67f90e merge: reverse array and length parameter order
Make it pair up with the one for commits. This fixes #1691.
2013-09-22 05:59:35 +02:00
Rémi Duraffort
c6451624c4 Fix some more memory leaks in error path 2013-07-15 16:29:18 +02:00
Russell Belfer
114f5a6c41 Reorganize diff and add basic diff driver
This is a significant reorganization of the diff code to break it
into a set of more clearly distinct files and to document the new
organization.  Hopefully this will make the diff code easier to
understand and to extend.

This adds a new `git_diff_driver` object that looks of diff driver
information from the attributes and the config so that things like
function content in diff headers can be provided.  The full driver
spec is not implemented in the commit - this is focused on the
reorganization of the code and putting the driver hooks in place.

This also removes a few #includes from src/repository.h that were
overbroad, but as a result required extra #includes in a variety
of places since including src/repository.h no longer results in
pulling in the whole world.
2013-06-10 10:10:39 -07:00
Russell Belfer
cee695ae6b Make iterators use GIT_ITEROVER & smart advance
1. internal iterators now return GIT_ITEROVER when you go past the
   last item in the iteration.
2. git_iterator_advance will "advance" to the first item in the
   iteration if it is called immediately after creating the
   iterator, which allows a simpler idiom for basic iteration.
3. if git_iterator_advance encounters an error reading data (e.g.
   a missing tree or an unreadable file), it returns the error
   but also attempts to advance past the invalid data to prevent
   an infinite loop.

Updated all tests and internal usage of iterators to account for
these new behaviors.
2013-05-31 12:18:43 -07:00
Edward Thomson
9c06b25054 merge setup 2013-05-17 08:26:24 -05:00
nulltoken
1fed6b07f0 Fix trailing whitespaces 2013-05-15 22:41:30 +02:00
Vicent Martí
03c28d92d0 Merge pull request #1526 from arrbee/cleanup-error-return-without-msg
Make sure error messages are set for most error returns
2013-05-06 06:45:53 -07:00
Edward Thomson
4e7c15608f puns are not funny; type punning especially so 2013-05-02 14:58:40 -05:00
Russell Belfer
de19c4a958 Set error when no merge base is found 2013-05-01 14:00:20 -07:00
Vicent Marti
e1807113c4 merge: Warning noise 2013-05-01 15:31:23 +02:00
Edward Thomson
75d1c8c664 move NAME and REUC extensions to sys/ 2013-04-30 17:33:11 -05:00
Edward Thomson
0462fba538 renames! 2013-04-30 16:01:11 -05:00
Edward Thomson
bec65a5e99 merge! 2013-04-30 15:31:31 -05:00
Edward Thomson
359fc2d241 update copyrights 2013-01-08 17:31:27 -06:00
Edward Thomson
c31ae146b4 merge cleanup should actually cleanup and the test should actually test 2013-01-06 18:38:29 -06:00
Edward Thomson
42e50b5ed1 MERGE_HEAD contents iterator 2013-01-03 16:35:59 -06:00
Edward Thomson
ad2bc32fa3 expose merge metadata cleanup 2013-01-03 15:53:50 -06: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
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
bff53e5405 Add initial implementation of ahead-behind count 2012-11-28 18:54:56 -08:00
Ben Straub
4ff192d3f2 Move merge functions to merge.c
In so doing, promote commit_list to git_commit_list,
with its own internal API header.
2012-11-27 13:18:29 -08:00
Edward Thomson
632d8b230b reset changes for merge 2012-10-24 20:24:37 -05:00