<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/test_helpers.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>Moved testing resources to clar, and removed old tests directory.</title>
<updated>2012-03-31T23:10:01+00:00</updated>
<author>
<name>Ben Straub</name>
<email>ben@straubnet.net</email>
</author>
<published>2012-03-31T23:10:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=fd29cd13b70b9a3a90ca605e2d1a633a08f1daf7'/>
<id>fd29cd13b70b9a3a90ca605e2d1a633a08f1daf7</id>
<content type='text'>
Removed the BUILD_CLAR CMake flag, and updated the readme.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed the BUILD_CLAR CMake flag, and updated the readme.
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: Unify `git_fbuffer` and `git_buf`</title>
<updated>2012-02-27T04:30:07+00:00</updated>
<author>
<name>Vicent Martí</name>
<email>tanoku@gmail.com</email>
</author>
<published>2012-02-27T03:28:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=13224ea4aad9a1b3c9cc4c992ceaea9af623e047'/>
<id>13224ea4aad9a1b3c9cc4c992ceaea9af623e047</id>
<content type='text'>
This makes so much sense that I can't believe it hasn't been done
before. Kill the old `git_fbuffer` and read files straight into
`git_buf` objects.

Also: In order to fully support 4GB files in 32-bit systems, the
`git_buf` implementation has been changed from using `ssize_t` for
storage and storing negative values on allocation failure, to using
`size_t` and changing the buffer pointer to a magical pointer on
allocation failure.

Hopefully this won't break anything.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes so much sense that I can't believe it hasn't been done
before. Kill the old `git_fbuffer` and read files straight into
`git_buf` objects.

Also: In order to fully support 4GB files in 32-bit systems, the
`git_buf` implementation has been changed from using `ssize_t` for
storage and storing negative values on allocation failure, to using
`size_t` and changing the buffer pointer to a magical pointer on
allocation failure.

Hopefully this won't break anything.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move path related functions from fileops to path</title>
<updated>2012-01-17T23:49:47+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>arrbee@arrbee.com</email>
</author>
<published>2012-01-17T23:49:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=1744fafec05d8fa3036a43f5e390c790810b05a5'/>
<id>1744fafec05d8fa3036a43f5e390c790810b05a5</id>
<content type='text'>
This takes all of the functions that look up simple data about
paths (such as `git_futils_isdir`) and moves them over to path.h
(becoming `git_path_isdir`).  This leaves fileops.h just with
functions that actually manipulate the filesystem or look at
the file contents in some way.

As part of this, the dir.h header which is really just for win32
support was moved into win32 (with some minor changes).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This takes all of the functions that look up simple data about
paths (such as `git_futils_isdir`) and moves them over to path.h
(becoming `git_path_isdir`).  This leaves fileops.h just with
functions that actually manipulate the filesystem or look at
the file contents in some way.

As part of this, the dir.h header which is really just for win32
support was moved into win32 (with some minor changes).
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow git_buf_joinpath to accept self-joins</title>
<updated>2011-12-14T22:31:06+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>arrbee@arrbee.com</email>
</author>
<published>2011-12-14T20:34:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=b5daae68a4ae859653141fb097e7b7c81b25530b'/>
<id>b5daae68a4ae859653141fb097e7b7c81b25530b</id>
<content type='text'>
It was not safe for git_buf_joinpath to be used with a pointer
into the buf itself because a reallocation could invalidate
the input parameter that pointed into the buffer.  This patch
makes it safe to self join, at least for the leading input to
the join, which is the common "append" case for self joins.

Also added unit tests to explicitly cover this case.

This should actually fix #511
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was not safe for git_buf_joinpath to be used with a pointer
into the buf itself because a reallocation could invalidate
the input parameter that pointed into the buffer.  This patch
makes it safe to self join, at least for the leading input to
the join, which is the common "append" case for self joins.

Also added unit tests to explicitly cover this case.

This should actually fix #511
</pre>
</div>
</content>
</entry>
<entry>
<title>Use git_buf for path storage instead of stack-based buffers</title>
<updated>2011-12-08T07:08:15+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>arrbee@arrbee.com</email>
</author>
<published>2011-11-30T19:27:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=97769280ba9938ae27f6e06cbd0d5e8a768a86b9'/>
<id>97769280ba9938ae27f6e06cbd0d5e8a768a86b9</id>
<content type='text'>
This converts virtually all of the places that allocate GIT_PATH_MAX
buffers on the stack for manipulating paths to use git_buf objects
instead.  The patch is pretty careful not to touch the public API
for libgit2, so there are a few places that still use GIT_PATH_MAX.

This extends and changes some details of the git_buf implementation
to add a couple of extra functions and to make error handling easier.

This includes serious alterations to all the path.c functions, and
several of the fileops.c ones, too.  Also, there are a number of new
functions that parallel existing ones except that use a git_buf
instead of a stack-based buffer (such as git_config_find_global_r
that exists alongsize git_config_find_global).

This also modifies the win32 version of p_realpath to allocate whatever
buffer size is needed to accommodate the realpath instead of hardcoding
a GIT_PATH_MAX limit, but that change needs to be tested still.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts virtually all of the places that allocate GIT_PATH_MAX
buffers on the stack for manipulating paths to use git_buf objects
instead.  The patch is pretty careful not to touch the public API
for libgit2, so there are a few places that still use GIT_PATH_MAX.

This extends and changes some details of the git_buf implementation
to add a couple of extra functions and to make error handling easier.

This includes serious alterations to all the path.c functions, and
several of the fileops.c ones, too.  Also, there are a number of new
functions that parallel existing ones except that use a git_buf
instead of a stack-based buffer (such as git_config_find_global_r
that exists alongsize git_config_find_global).

This also modifies the win32 version of p_realpath to allocate whatever
buffer size is needed to accommodate the realpath instead of hardcoding
a GIT_PATH_MAX limit, but that change needs to be tested still.
</pre>
</div>
</content>
</entry>
<entry>
<title>test_helpers: do not rely on assert</title>
<updated>2011-10-30T12:48:00+00:00</updated>
<author>
<name>schu</name>
<email>schu-github@schulog.org</email>
</author>
<published>2011-10-30T12:48:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ec9079443c874fe1711acefb22b3fc606484c786'/>
<id>ec9079443c874fe1711acefb22b3fc606484c786</id>
<content type='text'>
The functions loose_object_mode and loose_object_dir_mode call stat
inside an assert statement which isn't evaluated when compiling in
Release mode (NDEBUG) and leads to failing tests. Replace it.

Signed-off-by: schu &lt;schu-github@schulog.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The functions loose_object_mode and loose_object_dir_mode call stat
inside an assert statement which isn't evaluated when compiling in
Release mode (NDEBUG) and leads to failing tests. Replace it.

Signed-off-by: schu &lt;schu-github@schulog.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #456 from brodie/perm-fixes</title>
<updated>2011-10-29T02:04:23+00:00</updated>
<author>
<name>Vicent Martí</name>
<email>tanoku@gmail.com</email>
</author>
<published>2011-10-29T02:04:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=89fb8f025a1f72b90f1f9563c85bf43b7f66ba60'/>
<id>89fb8f025a1f72b90f1f9563c85bf43b7f66ba60</id>
<content type='text'>
Create objects, indexes, and directories with the right file permissions</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create objects, indexes, and directories with the right file permissions</pre>
</div>
</content>
</entry>
<entry>
<title>global: Properly use `git__` memory wrappers</title>
<updated>2011-10-29T02:02:36+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2011-10-28T21:51:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=3286c408eccb18c525ca123383f3ebf5097441bc'/>
<id>3286c408eccb18c525ca123383f3ebf5097441bc</id>
<content type='text'>
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: propagate errors from open_temp_repo() instead of exiting</title>
<updated>2011-10-14T23:20:23+00:00</updated>
<author>
<name>Brodie Rao</name>
<email>brodie@bitheap.org</email>
</author>
<published>2011-08-11T22:18:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=252840a59f09a62bd358c90593724af36a703161'/>
<id>252840a59f09a62bd358c90593724af36a703161</id>
<content type='text'>
This makes it slightly easier to debug test failures when one test
opens a repo, has a failure, and doesn't get a chance to close it for
the next test. Now, instead of getting no feedback, we at least see
test failure information.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it slightly easier to debug test failures when one test
opens a repo, has a failure, and doesn't get a chance to close it for
the next test. Now, instead of getting no feedback, we at least see
test failure information.
</pre>
</div>
</content>
</entry>
<entry>
<title>*: correct and codify various file permissions</title>
<updated>2011-10-14T23:07:47+00:00</updated>
<author>
<name>Brodie Rao</name>
<email>brodie@bitheap.org</email>
</author>
<published>2011-09-06T22:48:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=01ad7b3a9ec8f5e465f94c2704e1e96b84f941c7'/>
<id>01ad7b3a9ec8f5e465f94c2704e1e96b84f941c7</id>
<content type='text'>
The following files now have 0444 permissions:

- loose objects
- pack indexes
- pack files
- packs downloaded by fetch
- packs downloaded by the HTTP transport

And the following files now have 0666 permissions:

- config files
- repository indexes
- reflogs
- refs

This brings libgit2 more in line with Git.

Note that git_filebuf_commit() and git_filebuf_commit_at() have both
gained a new mode parameter.

The latter change fixes an important issue where filebufs created with
GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3)
usage). Now we chmod() the file before renaming it into place.

Tests have been added to confirm that new commit, tag, and tree
objects are created with the right permissions. I don't have access to
Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following files now have 0444 permissions:

- loose objects
- pack indexes
- pack files
- packs downloaded by fetch
- packs downloaded by the HTTP transport

And the following files now have 0666 permissions:

- config files
- repository indexes
- reflogs
- refs

This brings libgit2 more in line with Git.

Note that git_filebuf_commit() and git_filebuf_commit_at() have both
gained a new mode parameter.

The latter change fixes an important issue where filebufs created with
GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3)
usage). Now we chmod() the file before renaming it into place.

Tests have been added to confirm that new commit, tag, and tree
objects are created with the right permissions. I don't have access to
Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
</pre>
</div>
</content>
</entry>
</feed>
