- 02 Jun, 2010 38 commits
-
-
In particular, doxygen issues the following warning: .../src/git/revwalk.h:86: Warning: The following parameters of \ gitrp_sorting(git_revpool *pool, unsigned int sort_mode) are \ not documented: parameter 'pool' Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones committed -
In particular, sparse issues the following warnings: src/revobject.c:29:14: warning: symbol 'max_load_factor' was \ not declared. Should it be static? src/revobject.c:31:14: warning: symbol 'git_revpool_table__hash' was \ not declared. Should it be static? In order to suppress these warnings, we simply declare them as static, since they are not (currently) referenced outside of this file. In the case of max_load_factor, this is probably correct. However, this may not be appropriate for git_revpool_table__hash(), given how it is named. So, this should either be re-named to reflect it's non-external status, or a declaration needs to be added to the revobject.h header file. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones committed -
In order to suppress this warning, we could simply replace the constant 0 with NULL. However, in this case, replacing the comparison with 0 by !buffer is more idiomatic. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones committed -
For more recent versions of msvc, the time_t type, as returned by the time() function, is a 64-bit type. The srand() function, however, expects an 'unsigned int' input parameter, leading to the warning. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones committed -
In particular, the compiler issues the following warning: src/revwalk.c(61) : warning C4244: '=' : conversion from \ 'unsigned int' to 'unsigned char', possible loss of data In order to suppress the warning, we change the type of the sorting "enum" field of the git_revpool structure to be consistent with the sort_mode parameter of the gitrp_sorting() function. Note that if the size of the git_revpool structure is an issue, then we could change the type of the sort_mode parameter instead. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones committed -
In particular, the compiler issues the following warnings: src/revobject.c(29) : warning C4305: 'initializing' : truncation \ from 'double' to 'const float' src/revobject.c(56) : warning C4244: '=' : conversion from \ 'const float' to 'unsigned int', possible loss of data src/revobject.c(149) : warning C4244: '=' : conversion from \ 'const float' to 'unsigned int', possible loss of data In order to suppress the warnings we change the type of max_load_factor to double, rather than change the initialiser to 0.65f, and cast the result type of the expressions to 'unsigned int' as expected by the assignment operators. Note that double should be able to represent all unsigned int values without loss. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones committed -
These warnings are issued by both gcc (-Wextra) and msvc (-W3). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones committed -
On the msvc build, the tests t0401-parse and t0501-walk both crash with a runtime error (ACCESS_VIOLATION). This is caused by writing to un-allocated memory due to an under-allocation of a git_revpool_table data structure. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones committed -
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
sorting ('prev' pointers in the linked list are no longer lost). Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
The GIT_RPSORT_XXX flags have been moved to the external API, and a new method 'gitrp_sorting(...)' has been added to safely change the sorting method of a revision pool. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Add git_revpool_table_free() method. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
'git_commit_list_toposort()' and 'git_commit_list_timesort()' now sort a commit list by topological and time order respectively. Both sorts are stable and in place. 'git_commit_list_append' has been replaced by 'git_commit_list_push_back' and 'git_commit_list_push_front'. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Fixed issue when generating pending commits list during iteration. The 'git_commit_lookup' function will now check the pool's cache for commits which have been previously loaded/parsed; there can only be a single 'git_commit' structure for each commit on the same pool. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Fixed bug when parsing time headers from commits. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Properly initialize the pending commits list. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
All the objects which will will be eventually transversable from a revision pool (commits, trees, etc) now inherit from the 'git_revpool_object' structure which identifies them with their own OID. Furthermore, the 'git_revpool_table' and related functions have been added, which allow for constant time lookup (hash table) of the loaded revpool objects based on their OID. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Changed 'git_commit' to use bit fields instead of flags. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
The 'gitrp_next()' method now correctly does a revision walking of all the pushed revisions in arbritary ordering. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
git_commit_lookup() now creates commit references without loading them from the ODB. git_commit_parse() creates a commit reference, loads it and parses it from the ODB. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Basic support for iterating the revpool. The following functions of the revwalk API have been partially implemented: void gitrp_reset(git_revpool *pool); void gitrp_push(git_revpool *pool, git_commit *commit); void gitrp_prepare_walk(git_revpool *pool); git_commit *gitrp_next(git_revpool *pool); Parsed commits' parents are now also parsed and stored in a "git_commit_list" structure (linked list). Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
A few initial tests for commit parsing: "parse_buffer_test" tests git_commit__parse_buffer() with several malformed commit messages and a few corner cases which should pass. "parse_oid_test" tests git_commit__parse_oid() with several malformed commit lines containing broken SHA1 OIDs. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
The external API function "git_commit_parse" has been renamed to "git_commit_lookup" and has been partially implemented with support for loading commits straight from the ODB. It still lacks the functionality to lookup cached commits in the revpool and to resolve tags to commits. The following internal functions have been partially implemented: int git_commit__parse_buffer(...); int git_commit__parse_time(...); int git_commit__parse_oid(...); Commits are now fully parsed but the generated parent and tree references are not handled yet. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed -
Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Vicent Marti committed
-
- 04 May, 2010 1 commit
-
-
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Ramsay Jones committed
-
- 30 Apr, 2010 1 commit
-
-
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Ramsay Jones committed
-