Martin Woodward [Thu, 3 Jan 2013 22:28:59 +0000 (22:28 +0000)]
Give proper license notice to code from Android
The usage of the Android derrived code contains a full notice
which must be provided with the source code as per the terms
given at:
https://android.googlesource.com/platform/bionic/+/android-4.0.3_r1.1/libc/bionic/dirname_r.c
Martin Woodward [Thu, 3 Jan 2013 22:24:10 +0000 (22:24 +0000)]
Add full license notice to bsearch code
The original BSD glibc code contains the notice as given at
http://opensource.apple.com/source/gcc/gcc-5666.3/libiberty/bsearch.c
and should be given in full along with the code.
Martin Woodward [Thu, 3 Jan 2013 22:16:37 +0000 (22:16 +0000)]
Add Apache license header back to libpqueue files
The original libpqueue file were licensed under Apache 2.0 so
therefore should retain their copyrights and header as per the
license terms at http://www.apache.org/licenses/LICENSE-2.0
Russell Belfer [Sat, 29 Dec 2012 06:00:24 +0000 (22:00 -0800)]
Update showindex example
I find the showindex example to be pretty useful on occasion, but
there were are couple of output tweaks I wanted, plus I wanted the
ability to specify a path to an actual index file instead of having
to open the whole repository. This makes those changes and expands
the example slightly.
Russell Belfer [Fri, 28 Dec 2012 07:23:12 +0000 (23:23 -0800)]
Invalid ref name normalization leaked memory
When normalizing a reference name, if there is an error because
the name is invalid, then the memory allocated for storing the
name could be leaked if the caller was not careful and assumed
that the error return code meant that no allocation had occurred.
This fixes that by explicitly deallocating the reference name
buffer if there is an error in normalizing the name.
Russell Belfer [Fri, 28 Dec 2012 06:25:52 +0000 (22:25 -0800)]
Make spoolandsort a pushable iterator behavior
An earlier change to `git_diff_from_iterators` introduced a
memory leak where the allocated spoolandsort iterator was not
returned to the caller and thus not freed.
One proposal changes all iterator APIs to use git_iterator** so
we can reallocate the iterator at will, but that seems unexpected.
This commit makes it so that an iterator can be changed in place.
The callbacks are isolated in a separate structure and a pointer
to that structure can be reassigned by the spoolandsort extension.
This means that spoolandsort doesn't create a new iterator; it
just allocates a new block of callbacks (along with space for its
own extra data) and swaps that into the iterator.
Additionally, since spoolandsort is only needed to switch the
case sensitivity of an iterator, this simplifies the API to only
take the ignore_case boolean and to be a no-op if the iterator
already matches the requested case sensitivity.
Sascha Cunz [Tue, 18 Dec 2012 18:03:29 +0000 (19:03 +0100)]
Search for zlib unconditional
Up to now, on windows we don't even bother to look if the user has a zlib
available somwhere.
In almost all larger commercial projects i've participated in, it was not
at all uncommon to have such a dependency somewhere in the source tree and
use it whereever required.
Searching for it, even if it's unlikely to be present, allows for such a
scenario (i.e. by prefilling the CMake-Cache).
Russell Belfer [Mon, 17 Dec 2012 19:00:53 +0000 (11:00 -0800)]
Fix diff constructor name order confusion
The diff constructor functions had some confusing names, where the
"old" side of the diff was coming after the "new" side. This
reverses the order in the function name to make it less confusing.
Michael Schubert [Mon, 17 Dec 2012 18:35:40 +0000 (19:35 +0100)]
netops: on SSL teardown only send shutdown alert
According to man 3 SSL_shutdown / TLS, "If a unidirectional shutdown is
enough (the underlying connection shall be closed anyway), this first
call to SSL_shutdown() is sufficient."
Currently, an unidirectional shutdown is enough, since
gitno_ssl_teardown is called by gitno_close only. Do so to avoid further
errors (by misbehaving peers for example).