<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/revobject.c, branch cmn/https-cap-no-hardcode</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/'/>
<entry>
<title>Redesigned the walking/object lookup interface</title>
<updated>2010-08-12T16:48:55+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2010-08-08T12:12:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=3315782cb4f2b683c66a53c93aa81de501c5a4ab'/>
<id>3315782cb4f2b683c66a53c93aa81de501c5a4ab</id>
<content type='text'>
The old 'git_revpool' object has been removed and
split into two distinct objects with separate
functionality, in order to have separate methods for
object management and object walking.

*	A new object 'git_repository' does the high-level
	management of a repository's objects (commits, trees,
	tags, etc) on top of a 'git_odb'.

	Eventually, it will also manage other repository
	attributes (e.g. tag resolution, references, etc).

	See: src/git/repository.h

*	A new external method
		'git_repository_lookup(repo, oid, type)'
	has been added to the 'git_repository' API.

	All object lookups (git_XXX_lookup()) are now
	wrappers to this method, and duplicated code
	has been removed. The method does automatic type
	checking and returns a generic 'git_revpool_object'
	that can be cast to any specific object.

	See: src/git/repository.h

*	The external methods for object parsing of repository
	objects (git_XXX_parse()) have been removed.

	Loading objects from the repository is now managed
	through the 'lookup' functions. These objects are
	loaded with minimal information, and the relevant
	parsing is done automatically when the user requests
	any of the parsed attributes through accessor methods.

	An attribute has been added to 'git_repository' in
	order to force the parsing of all the repository objects
	immediately after lookup.

	See: src/git/commit.h
	See: src/git/tag.h
	See: src/git/tree.h

*	The previous walking functionality of the revpool
	is now found in 'git_revwalk', which does the actual
	revision walking on a repository; the attributes
	when walking through commits in a database have been
	decoupled from the actual commit objects.
	This increases performance when accessing commits
	during the walk and allows to have several
	'git_revwalk' instances working at the same time on
	top of the same repository, without having to load
	commits in memory several times.

	See: src/git/revwalk.h

*	The old 'git_revpool_table' has been renamed to
	'git_hashtable' and now works as a generic hashtable
	with support for any kind of object and custom hash
	functions.

	See: src/hashtable.h

*	All the relevant unit tests have been updated, renamed
	and grouped accordingly.

Signed-off-by: Vicent Marti &lt;tanoku@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old 'git_revpool' object has been removed and
split into two distinct objects with separate
functionality, in order to have separate methods for
object management and object walking.

*	A new object 'git_repository' does the high-level
	management of a repository's objects (commits, trees,
	tags, etc) on top of a 'git_odb'.

	Eventually, it will also manage other repository
	attributes (e.g. tag resolution, references, etc).

	See: src/git/repository.h

*	A new external method
		'git_repository_lookup(repo, oid, type)'
	has been added to the 'git_repository' API.

	All object lookups (git_XXX_lookup()) are now
	wrappers to this method, and duplicated code
	has been removed. The method does automatic type
	checking and returns a generic 'git_revpool_object'
	that can be cast to any specific object.

	See: src/git/repository.h

*	The external methods for object parsing of repository
	objects (git_XXX_parse()) have been removed.

	Loading objects from the repository is now managed
	through the 'lookup' functions. These objects are
	loaded with minimal information, and the relevant
	parsing is done automatically when the user requests
	any of the parsed attributes through accessor methods.

	An attribute has been added to 'git_repository' in
	order to force the parsing of all the repository objects
	immediately after lookup.

	See: src/git/commit.h
	See: src/git/tag.h
	See: src/git/tree.h

*	The previous walking functionality of the revpool
	is now found in 'git_revwalk', which does the actual
	revision walking on a repository; the attributes
	when walking through commits in a database have been
	decoupled from the actual commit objects.
	This increases performance when accessing commits
	during the walk and allows to have several
	'git_revwalk' instances working at the same time on
	top of the same repository, without having to load
	commits in memory several times.

	See: src/git/revwalk.h

*	The old 'git_revpool_table' has been renamed to
	'git_hashtable' and now works as a generic hashtable
	with support for any kind of object and custom hash
	functions.

	See: src/hashtable.h

*	All the relevant unit tests have been updated, renamed
	and grouped accordingly.

Signed-off-by: Vicent Marti &lt;tanoku@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Changed revpool's object table to support arbitrary objects</title>
<updated>2010-07-15T21:39:22+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2010-07-10T18:50:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=40721f6b1297f2a48aeb5c9a3ac095767b1153bf'/>
<id>40721f6b1297f2a48aeb5c9a3ac095767b1153bf</id>
<content type='text'>
git_revpool_object now has a type identifier for each object
type in a revpool (commits, trees, blobs, etc).

Trees can now be stored in the revision pool.

git_revpool_tableit now supports filtering objects by their
type when iterating through the object table.

Signed-off-by: Vicent Marti &lt;tanoku@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git_revpool_object now has a type identifier for each object
type in a revpool (commits, trees, blobs, etc).

Trees can now be stored in the revision pool.

git_revpool_tableit now supports filtering objects by their
type when iterating through the object table.

Signed-off-by: Vicent Marti &lt;tanoku@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Style: Do not use (C99) // comments</title>
<updated>2010-06-02T09:18:56+00:00</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2010-06-01T18:41:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=f29249340c11b069e46b70fc145c1d7fbe213b94'/>
<id>f29249340c11b069e46b70fc145c1d7fbe213b94</id>
<content type='text'>
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a memory leak shown by valgrind</title>
<updated>2010-06-02T09:18:56+00:00</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2010-06-01T18:39:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=702bd70595a7b19afc48a1f784a6505be68469d4'/>
<id>702bd70595a7b19afc48a1f784a6505be68469d4</id>
<content type='text'>
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a "dereference of type-punned pointer" compiler warning</title>
<updated>2010-06-02T09:18:56+00:00</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2010-06-01T18:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=c1b62b2eded035d22584c427487503335f519d4c'/>
<id>c1b62b2eded035d22584c427487503335f519d4c</id>
<content type='text'>
gcc (4.4.0) issues the following warning:

    src/revobject.c:33: warning: dereferencing type-punned pointer \
        will break strict-aliasing rules

We suppress the warning by copying the first 4 bytes from the oid
structure into an 'unsigned int' using memcpy(). This will also
fix any potential alignment issues on certain platforms.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc (4.4.0) issues the following warning:

    src/revobject.c:33: warning: dereferencing type-punned pointer \
        will break strict-aliasing rules

We suppress the warning by copying the first 4 bytes from the oid
structure into an 'unsigned int' using memcpy(). This will also
fix any potential alignment issues on certain platforms.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix sparse warnings: "symbol not declared. Should it be static?"</title>
<updated>2010-06-02T09:18:55+00:00</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2010-06-01T18:33:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=84b9cec72cc98dea3353325e42ef78b3f7e7c79e'/>
<id>84b9cec72cc98dea3353325e42ef78b3f7e7c79e</id>
<content type='text'>
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 &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>msvc: Fix some compiler warnings</title>
<updated>2010-06-02T09:18:55+00:00</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2010-06-01T18:29:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=5440906feb5e41241a699ee413475b7911284c41'/>
<id>5440906feb5e41241a699ee413475b7911284c41</id>
<content type='text'>
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 &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some "signed/unsigned comparison" compilation warnings</title>
<updated>2010-06-02T09:18:55+00:00</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2010-06-01T18:28:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8a7d625f53726fc7703dc0a413686d1ec15488e0'/>
<id>8a7d625f53726fc7703dc0a413686d1ec15488e0</id>
<content type='text'>
These warnings are issued by both gcc (-Wextra) and msvc (-W3).

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These warnings are issued by both gcc (-Wextra) and msvc (-W3).

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a memory corruption runtime error</title>
<updated>2010-06-02T09:18:55+00:00</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2010-06-01T18:26:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=5b7487bee63e7f5cb6ea1d9090d52ae631296cd8'/>
<id>5b7487bee63e7f5cb6ea1d9090d52ae631296cd8</id>
<content type='text'>
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 &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Improved error handling on auxilirary functions.</title>
<updated>2010-06-02T08:32:07+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2010-05-28T00:02:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=de141d4bb983dad861835e181e7ecd5692a58aba'/>
<id>de141d4bb983dad861835e181e7ecd5692a58aba</id>
<content type='text'>
Signed-off-by: Vicent Marti &lt;tanoku@gmail.com&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Vicent Marti &lt;tanoku@gmail.com&gt;
Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
</pre>
</div>
</content>
</entry>
</feed>
