]> git.proxmox.com Git - libgit2.git/log
libgit2.git
12 years agotree: Add git_tree_frompath() which, given a relative path to a tree entry, retrieves...
nulltoken [Thu, 13 Oct 2011 21:17:19 +0000 (23:17 +0200)]
tree: Add git_tree_frompath() which, given a relative path to a tree entry, retrieves the tree object containing this tree entry

12 years agooid: Add git_oid_streq() which checks if an oid and an hex formatted string are equal
nulltoken [Wed, 12 Oct 2011 12:06:23 +0000 (14:06 +0200)]
oid: Add git_oid_streq() which checks if an oid and an hex formatted string are equal

12 years agoFix minor indentation issues
nulltoken [Tue, 11 Oct 2011 12:42:48 +0000 (14:42 +0200)]
Fix minor indentation issues

12 years agoAdd test commit containing subtrees and files
nulltoken [Sun, 9 Oct 2011 11:13:49 +0000 (13:13 +0200)]
Add test commit containing subtrees and files

12 years agoFix compilation error on Windows
nulltoken [Thu, 13 Oct 2011 20:48:07 +0000 (22:48 +0200)]
Fix compilation error on Windows

12 years agoMerge pull request #454 from brodie/parsing-fixes
Vicent Martí [Thu, 13 Oct 2011 19:16:07 +0000 (12:16 -0700)]
Merge pull request #454 from brodie/parsing-fixes

Improvements to tag, commit, and signature parsing

12 years agoMerge pull request #455 from brodie/pack-fixes
Vicent Martí [Thu, 13 Oct 2011 19:01:06 +0000 (12:01 -0700)]
Merge pull request #455 from brodie/pack-fixes

odb_pack: don't do ambiguity checks for fully qualified SHA1 hashes

12 years agoodb_pack: don't do ambiguity checks for fully qualified SHA1 hashes
Brodie Rao [Wed, 12 Oct 2011 05:05:12 +0000 (22:05 -0700)]
odb_pack: don't do ambiguity checks for fully qualified SHA1 hashes

This makes libgit2 more closely match Git, which only checks for
ambiguous pack entries when given short hashes.

Note that the only time this is ever relevant is when a pack has the
same object more than once (it's happened in the wild, I promise).

12 years agosignature: don't blow up trying to parse names containing '>'
Brodie Rao [Wed, 5 Oct 2011 22:17:37 +0000 (15:17 -0700)]
signature: don't blow up trying to parse names containing '>'

When trying to find the end of an email, instead of starting at the
beginning of the signature, we start at the end of the name (after the
first '<').

This brings libgit2 more in line with Git's behavior when reading out
existing signatures.

However, note that Git does not allow names like these through the
usual porcelain; instead, it silently strips any '>' characters it
sees.

12 years agotag: allow the tagger field to be missing when parsing tags
Brodie Rao [Thu, 11 Aug 2011 23:12:29 +0000 (16:12 -0700)]
tag: allow the tagger field to be missing when parsing tags

Instead of bailing out with an error, this sets tagger to NULL when
the field is missing from the object.

This makes it possible to inspect tags like this one:

http://git.kernel.org/?p=git/git.git;a=tag;h=f25a265a342aed6041ab0cc484224d9ca54b6f41

12 years agotag: avoid a double-free when parsing tags without a tagger field
Brodie Rao [Thu, 11 Aug 2011 21:05:55 +0000 (14:05 -0700)]
tag: avoid a double-free when parsing tags without a tagger field

The v0.99 tag in the Git repo triggers this behavior:

http://git.kernel.org/?p=git/git.git;a=tag;h=d6602ec5194c87b0fc87103ca4d67251c76f233a

Ideally, we'd allow the tag to be instantiated even though the tagger
field is missing, but this at the very least prevents libgit2 from
crashing.

To test this bug, a new repository has been added based on the test
branch in testrepo.git. It contains a "e90810b" tag that looks like
this:

    object e90810b8df3e80c413d903f631643c716887138d
    type commit
    tag e90810b

    This is a very simple tag.

12 years agocommit: properly parse empty commit messages
Brodie Rao [Wed, 10 Aug 2011 03:49:12 +0000 (20:49 -0700)]
commit: properly parse empty commit messages

This ensures commit->message is always non-NULL, even if the commit
message is empty or consists of only a newline.

One such commit can be found in the wild in the jQuery repository:

https://github.com/jquery/jquery/commit/25b424134f9927a5bf0bab5cba836a0aa6c3cfc1

12 years agopkt: move the protocol strings to the top of the file
Carlos Martín Nieto [Sat, 8 Oct 2011 00:44:31 +0000 (02:44 +0200)]
pkt: move the protocol strings to the top of the file

Put them all together so we know where to find them.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agoMove the transports to their own directory
Carlos Martín Nieto [Thu, 6 Oct 2011 22:44:41 +0000 (00:44 +0200)]
Move the transports to their own directory

12 years agonet: plug a few memory leaks
Carlos Martín Nieto [Wed, 5 Oct 2011 22:51:32 +0000 (00:51 +0200)]
net: plug a few memory leaks

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agohttp: download pack when fetching
Carlos Martín Nieto [Wed, 5 Oct 2011 22:10:11 +0000 (00:10 +0200)]
http: download pack when fetching

Unfortunately, we can't use the function in fetch.c due to chunked
encoding and keep-alive connections.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agoremote: bitfield should be unsigned
Carlos Martín Nieto [Wed, 5 Oct 2011 18:17:21 +0000 (20:17 +0200)]
remote: bitfield should be unsigned

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agogit transport: don't loose received data
Carlos Martín Nieto [Wed, 5 Oct 2011 18:12:12 +0000 (20:12 +0200)]
git transport: don't loose received data

Using a different buffer in each function means that some data might
get lost. Store all the data in a buffer in the transport object.

Take this opportunity to use the generic download-pack function.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agofetch: add a generic pack-download function
Carlos Martín Nieto [Wed, 5 Oct 2011 18:09:49 +0000 (20:09 +0200)]
fetch: add a generic pack-download function

Taken mostly from the git transport's version, this can be used by any
transport that takes its pack data from the network.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agopkt: get rid of the chunked support
Carlos Martín Nieto [Wed, 5 Oct 2011 16:11:22 +0000 (18:11 +0200)]
pkt: get rid of the chunked support

It was a bad idea.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agohttp: simple negotiation
Carlos Martín Nieto [Wed, 5 Oct 2011 14:57:34 +0000 (16:57 +0200)]
http: simple negotiation

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agoIntroduce the git_pkt_buffer_ family of functions
Carlos Martín Nieto [Tue, 4 Oct 2011 23:28:16 +0000 (01:28 +0200)]
Introduce the git_pkt_buffer_ family of functions

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agohttp: parse the response from the server
Carlos Martín Nieto [Tue, 4 Oct 2011 22:42:27 +0000 (00:42 +0200)]
http: parse the response from the server

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agohttp: add a set of common refs
Carlos Martín Nieto [Mon, 26 Sep 2011 22:34:52 +0000 (00:34 +0200)]
http: add a set of common refs

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agohttp: move stuff out of negotiate_fetch
Carlos Martín Nieto [Sun, 18 Sep 2011 19:11:45 +0000 (21:11 +0200)]
http: move stuff out of negotiate_fetch

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agotransport: don't have an extra send-wants step
Carlos Martín Nieto [Sun, 18 Sep 2011 18:07:49 +0000 (20:07 +0200)]
transport: don't have an extra send-wants step

It's a bit awkward to run it as an extra step, and HTTP may need to
send the wants list several times.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agohttp: Start negotiate_fetch
Carlos Martín Nieto [Tue, 13 Sep 2011 21:28:42 +0000 (23:28 +0200)]
http: Start negotiate_fetch

12 years agonet,pkt: add chunked support
Carlos Martín Nieto [Tue, 13 Sep 2011 22:54:45 +0000 (00:54 +0200)]
net,pkt: add chunked support

As we don't know the length of the message we want to send to the
other end, we send a chunk size before each message. In later
versions, sending the wants might benefit from batching the lines
together.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agohttp: add more modularity to the code
Carlos Martín Nieto [Mon, 12 Sep 2011 13:25:45 +0000 (15:25 +0200)]
http: add more modularity to the code

Not every request needs a new connection if we're using a keep-alive
connection. Store the HTTP parser, host and port in the transport in
order to have it available in later calls.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agomsvc: Fix resourc embedding
Vicent Marti [Wed, 12 Oct 2011 19:09:56 +0000 (12:09 -0700)]
msvc: Fix resourc embedding

12 years agoMerge pull request #449 from csware/include-win-version-information
Vicent Martí [Wed, 12 Oct 2011 18:03:58 +0000 (11:03 -0700)]
Merge pull request #449 from csware/include-win-version-information

Include windows version information in git2.dll

12 years agoMerge pull request #452 from carlosmn/cmake-respect-user
Vicent Martí [Tue, 11 Oct 2011 22:11:23 +0000 (15:11 -0700)]
Merge pull request #452 from carlosmn/cmake-respect-user

Assorted CMake fixes

12 years agoExplain how to build universal OSX binaries
Carlos Martín Nieto [Tue, 11 Oct 2011 16:12:36 +0000 (18:12 +0200)]
Explain how to build universal OSX binaries

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agoCMake: don't overwrite the user's CFLAGS
Carlos Martín Nieto [Tue, 11 Oct 2011 16:08:54 +0000 (18:08 +0200)]
CMake: don't overwrite the user's CFLAGS

If either CFLAGS is defined or the user passes -DCMAKE_C_FLAGS to
cmake, the variable already contains flags. Don't overwrite them, but
append them to our settings.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agoCMake: Only add the STDCALL option when using MSVC
Carlos Martín Nieto [Tue, 11 Oct 2011 14:11:40 +0000 (16:11 +0200)]
CMake: Only add the STDCALL option when using MSVC

This option is only ever used with MSVC.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agofetch: move 'head' so it's visible to the whole function
Carlos Martín Nieto [Sun, 9 Oct 2011 19:49:10 +0000 (21:49 +0200)]
fetch: move 'head' so it's visible to the whole function

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agoMerge pull request #444 from carlosmn/fetch-fixes
Vicent Martí [Sun, 9 Oct 2011 19:09:57 +0000 (12:09 -0700)]
Merge pull request #444 from carlosmn/fetch-fixes

A couple of fetch fixes

12 years agoinclude version information in git2.dll on Windows
Sven Strickroth [Sun, 9 Oct 2011 16:45:23 +0000 (18:45 +0200)]
include version information in git2.dll on Windows

Signed-off-by: Sven Strickroth <email@cs-ware.de>
12 years agoput version information in separate file
Sven Strickroth [Sun, 9 Oct 2011 16:37:41 +0000 (18:37 +0200)]
put version information in separate file

Signed-off-by: Sven Strickroth <email@cs-ware.de>
12 years agolibgit2 doesn't use -LIB define
Sven Strickroth [Sun, 9 Oct 2011 16:35:42 +0000 (18:35 +0200)]
libgit2 doesn't use -LIB define

Signed-off-by: Sven Strickroth <email@cs-ware.de>
12 years agoMerge pull request #447 from csware/fix-win64-build
Vicent Martí [Sun, 9 Oct 2011 04:18:09 +0000 (21:18 -0700)]
Merge pull request #447 from csware/fix-win64-build

fix build for x64

12 years agofix build for x64
Sven Strickroth [Sun, 9 Oct 2011 03:29:57 +0000 (05:29 +0200)]
fix build for x64

Signed-off-by: Sven Strickroth <email@cs-ware.de>
12 years agofetch: store FETCH_HEAD
Carlos Martín Nieto [Mon, 3 Oct 2011 22:30:01 +0000 (00:30 +0200)]
fetch: store FETCH_HEAD

We should always save the remote's HEAD as FETCH_HEAD locally.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agoA missing refspec is not an error
Carlos Martín Nieto [Mon, 3 Oct 2011 20:26:06 +0000 (22:26 +0200)]
A missing refspec is not an error

It's rare for a configured remote, but for one given as an URL on the
command line, it's more often than not the case.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
12 years agoMerge pull request #439 from carlosmn/network-examples
Vicent Martí [Fri, 7 Oct 2011 21:20:53 +0000 (14:20 -0700)]
Merge pull request #439 from carlosmn/network-examples

Add network examples

12 years agoMerge pull request #446 from schu/tests-clay-update
Vicent Martí [Fri, 7 Oct 2011 21:20:25 +0000 (14:20 -0700)]
Merge pull request #446 from schu/tests-clay-update

tests-clay: update

12 years agotests-clay: add a readme file
schu [Fri, 7 Oct 2011 20:57:44 +0000 (22:57 +0200)]
tests-clay: add a readme file

Signed-off-by: schu <schu-github@schulog.org>
12 years agotests-clay: update clay
schu [Fri, 7 Oct 2011 20:31:08 +0000 (22:31 +0200)]
tests-clay: update clay

The clay script didn't match the latest version from upstream.
Additionaly, add core/strtol.c to complete porting the core tests to
clay.

Signed-off-by: schu <schu-github@schulog.org>
12 years agolibgit2 v0.15.0 "Das Wunderbar Release"
Vicent Marti [Wed, 5 Oct 2011 20:48:36 +0000 (16:48 -0400)]
libgit2 v0.15.0 "Das Wunderbar Release"

I am aware the codename is not gramatically correct in any language.

Check the COPYING file for the detailed terms on libgit2's license. Check
the AUTHORS file for the full list of guilty parties.

As we slowly stabilize the API, we've dropped 1 function from the library,
and changed the signature of only 5 of them. There's of course a good
chunk of new functionality, and a thousand bug fixes.

In this release of libgit2:

- Changed `git_blob_rawsize`: Now returns `size_t` instead of int, allowing
files >4GB in 64 bit systems.

- Removed `git_commit_message_short`: Please use `git_commit_message`
to get the full message and decide which is the "short view" according
to your needs (first line, first 80 chars...)

- Added `git_commit_message_encoding`: Returns the encoding field of a commit
message, if it exists.

- Changed `git_commit_create`, `git_commit_create_v`: New argument `encoding`, which
adds a encoding field to the generated commit object.

- Added `git_config_find_system`: Returns the path to the system's global config
file (according to the Core Git standards).

- Changed `git_config_get_XX`, `git_config_set_XX`: the `long` and `int` types have
been replaced by `int64` and `int32` respectively, to make their meaning more
obvious.

- Added `git_indexer`: An interface to index Git Packfiles has been added in the
`git2/indexer.h` header.

- Changed `git_reflog_entry_XX`: Reflog entries are now returned as `git_oid *` objects
instead of hexadecimal OIDs.

- Added `git_remote`: More fetch functionality has been added to the `git2/remote.h`
functionality. Local, Smart HTTP and Git protocols are now supported.

- Added `git_repository_head`: Returns the HEAD of the repository.

- Added `git_repository_config_autoload`: Opens the configuration file of a repository,
including the user's and the system's global config files, if they can be found.

- Changed `git_signature_now`: Now returns an error code; the signature is stored by
reference.

12 years agocmake: Set the old test suite as default for the release
Vicent Marti [Wed, 5 Oct 2011 20:46:34 +0000 (16:46 -0400)]
cmake: Set the old test suite as default for the release

12 years agomsvc: Remove superfluous includes
Vicent Marti [Wed, 5 Oct 2011 20:44:27 +0000 (13:44 -0700)]
msvc: Remove superfluous includes

12 years agomsvc: Properly handle inttypes.h/stdint.h
Vicent Marti [Tue, 4 Oct 2011 19:11:51 +0000 (21:11 +0200)]
msvc: Properly handle inttypes.h/stdint.h

12 years agoindexer: NUL-terminate the filename
Carlos Martín Nieto [Wed, 5 Oct 2011 17:59:34 +0000 (19:59 +0200)]
indexer: NUL-terminate the filename

As we no longer use the STRLEN macro, the NUL-terminator in the string
was not copied over. Fix this.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agoMerge pull request #441 from csware/ignore-missing-pack-file
Vicent Martí [Mon, 3 Oct 2011 21:42:52 +0000 (14:42 -0700)]
Merge pull request #441 from csware/ignore-missing-pack-file

ignore missing pack file

13 years agoMerge pull request #438 from jdavid/development
Vicent Martí [Mon, 3 Oct 2011 21:40:06 +0000 (14:40 -0700)]
Merge pull request #438 from jdavid/development

Make git_oid_fromstrn support hex strings of odd length

13 years agoignore missing pack file as git does
Sven Strickroth [Mon, 3 Oct 2011 21:12:43 +0000 (23:12 +0200)]
ignore missing pack file as git does

See http://code.google.com/p/tortoisegit/issues/detail?id=862

Signed-off-by: Sven Strickroth <email@cs-ware.de>
13 years agoexamples: add ls-remote, fetch and index-pack examples
Carlos Martín Nieto [Sun, 2 Oct 2011 22:33:13 +0000 (00:33 +0200)]
examples: add ls-remote, fetch and index-pack examples

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agooid: add missing check to git_oid_fromstrn
J. David Ibáñez [Sun, 2 Oct 2011 19:40:57 +0000 (21:40 +0200)]
oid: add missing check to git_oid_fromstrn

Signed-off-by: J. David Ibáñez <jdavid.ibp@gmail.com>
13 years agoSquelch a couple of warnings
Carlos Martín Nieto [Sat, 1 Oct 2011 18:16:13 +0000 (20:16 +0200)]
Squelch a couple of warnings

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agoconfig: behave like git with [section.subsection]
Carlos Martín Nieto [Sat, 1 Oct 2011 17:56:04 +0000 (19:56 +0200)]
config: behave like git with [section.subsection]

The documentation is a bit misleading. The subsection name is always
case-sensitive, but with a [section.subsection] header, the subsection
is transformed to lowercase when the configuration is parsed.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agoindexer: return immediately if passed a NULL value
Carlos Martín Nieto [Sat, 1 Oct 2011 12:46:30 +0000 (14:46 +0200)]
indexer: return immediately if passed a NULL value

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agopkt: send all of the wants in the negotiation
Carlos Martín Nieto [Sat, 1 Oct 2011 12:34:51 +0000 (14:34 +0200)]
pkt: send all of the wants in the negotiation

A missing if caused the function to return after the first want line
without capabilities.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agotransport-git: fix git request length calculation
Carlos Martín Nieto [Sat, 1 Oct 2011 11:41:16 +0000 (13:41 +0200)]
transport-git: fix git request length calculation

There was an off-by-one error that was uncovered when we used the
right length from git_buf.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agoclay: Fix compilation under MSVC
Vicent Marti [Sat, 1 Oct 2011 11:25:24 +0000 (13:25 +0200)]
clay: Fix compilation under MSVC

13 years agotransport-git: Encapsulation ist gut
Vicent Marti [Sat, 1 Oct 2011 11:10:29 +0000 (13:10 +0200)]
transport-git: Encapsulation ist gut

13 years agohttp-transport: Properly cleanup the WSA context
Vicent Marti [Sat, 1 Oct 2011 10:58:55 +0000 (12:58 +0200)]
http-transport: Properly cleanup the WSA context

13 years agohttp-transport: Update copyright
Vicent Marti [Sat, 1 Oct 2011 10:58:17 +0000 (12:58 +0200)]
http-transport: Update copyright

13 years agoMerge pull request #437 from carlosmn/networking-windows
Vicent Martí [Sat, 1 Oct 2011 10:56:19 +0000 (03:56 -0700)]
Merge pull request #437 from carlosmn/networking-windows

Fix networking on Windows

13 years agoInclude stdint.h in git2/config.h
Carlos Martín Nieto [Sat, 1 Oct 2011 00:09:35 +0000 (02:09 +0200)]
Include stdint.h in git2/config.h

Otherwise MSVC doesn't know what we're talking about when we say
int32_t or int64_t.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agonetops: abstract away socket closing
Carlos Martín Nieto [Fri, 30 Sep 2011 21:48:27 +0000 (23:48 +0200)]
netops: abstract away socket closing

Winsock wants us to use closesocket() instead of close(), so introduce
the gitno_close function, which does the right thing.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agolocal transport: don't segfault on wrong URL
Carlos Martín Nieto [Fri, 30 Sep 2011 16:35:33 +0000 (18:35 +0200)]
local transport: don't segfault on wrong URL

memset the structure on initialisation and don't try to dereference
the vector with the heads if we didn't find a repository.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agoInitialise the winsock DLL
Carlos Martín Nieto [Fri, 30 Sep 2011 15:21:30 +0000 (17:21 +0200)]
Initialise the winsock DLL

Windows wants us to initialise the networking DLL before we're allowed
to send data through a socket. Call WSASetup and WSACleanup if
GIT_WIN32 is defined.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agoUse git_buf in the git request
Carlos Martín Nieto [Fri, 30 Sep 2011 14:55:05 +0000 (16:55 +0200)]
Use git_buf in the git request

This is clearer and sidesteps the issue of what the return value of
snprintf is on the particular OS we're running on.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agoMerge pull request #436 from libgit2/config-int-types
Vicent Martí [Fri, 30 Sep 2011 20:52:01 +0000 (13:52 -0700)]
Merge pull request #436 from libgit2/config-int-types

config: Proper type declarations for 64 bit ints

13 years agooid: now git_oid_fromstrn checks whether the given string is too short
J. David Ibáñez [Fri, 30 Sep 2011 17:50:13 +0000 (19:50 +0200)]
oid: now git_oid_fromstrn checks whether the given string is too short

Signed-off-by: J. David Ibáñez <jdavid.ibp@gmail.com>
13 years agooid: optimize git_oid_fromstrn by using memset
J. David Ibáñez [Fri, 30 Sep 2011 17:41:29 +0000 (19:41 +0200)]
oid: optimize git_oid_fromstrn by using memset

Signed-off-by: J. David Ibáñez <jdavid.ibp@gmail.com>
13 years agooid: make git_oid_fromstrn support hex strings of odd length
J. David Ibáñez [Fri, 30 Sep 2011 17:08:48 +0000 (19:08 +0200)]
oid: make git_oid_fromstrn support hex strings of odd length

This fixes issue #433.

Signed-off-by: J. David Ibáñez <jdavid.ibp@gmail.com>
13 years agocore: One last `long long`
Vicent Marti [Fri, 30 Sep 2011 14:25:03 +0000 (16:25 +0200)]
core: One last `long long`

13 years agoconfig: Proper type declarations for 64 bit ints
Vicent Marti [Fri, 30 Sep 2011 14:08:06 +0000 (16:08 +0200)]
config: Proper type declarations for 64 bit ints

13 years agoconfig: fix check for environment string expansion
Carlos Martín Nieto [Fri, 30 Sep 2011 13:43:58 +0000 (15:43 +0200)]
config: fix check for environment string expansion

If ExpandEnvironmentStringsW is successful, it returns the amount of
characters written, including the NUL terminator.

Thanks to Emeric for reading the MSDN documentation correctly.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agoMerge pull request #434 from schu/fix-ref-regression
Vicent Martí [Fri, 30 Sep 2011 12:14:04 +0000 (05:14 -0700)]
Merge pull request #434 from schu/fix-ref-regression

refs.c: fix reference_rename

13 years agorefs.c: fix reference_rename
schu [Fri, 30 Sep 2011 08:31:41 +0000 (10:31 +0200)]
refs.c: fix reference_rename

6c8b458 removed an "unused" variable needed for git_hashtable_insert2(),
causing a segfault in reference_rename(). Instead, use
git_hashtable_insert().

Signed-off-by: schu <schu-github@schulog.org>
13 years agorepository: export git_repository_config_autoload
Carlos Martín Nieto [Fri, 30 Sep 2011 04:26:29 +0000 (06:26 +0200)]
repository: export git_repository_config_autoload

Take the opportunity to finish the comment about this function.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agomingw: Fix compilation warnings
Vicent Marti [Thu, 29 Sep 2011 15:04:45 +0000 (17:04 +0200)]
mingw: Fix compilation warnings

13 years agonetops: Use pragmas only in MSVC
Vicent Marti [Thu, 29 Sep 2011 14:30:38 +0000 (16:30 +0200)]
netops: Use pragmas only in MSVC

13 years agoindex: Silence type-punned warning
Vicent Marti [Thu, 29 Sep 2011 14:28:00 +0000 (16:28 +0200)]
index: Silence type-punned warning

13 years agomingw: Fix printf identifiers
Vicent Marti [Thu, 29 Sep 2011 14:23:24 +0000 (16:23 +0200)]
mingw: Fix printf identifiers

13 years agoodb: Pass compression settings to filebuf
Vicent Marti [Thu, 29 Sep 2011 13:49:28 +0000 (15:49 +0200)]
odb: Pass compression settings to filebuf

13 years agoodb: Let users decide compression level for the loose ODB
Vicent Marti [Thu, 29 Sep 2011 13:34:17 +0000 (15:34 +0200)]
odb: Let users decide compression level for the loose ODB

13 years agohttp-parser: Disable MSVC warnings locally
Vicent Marti [Thu, 29 Sep 2011 13:24:41 +0000 (15:24 +0200)]
http-parser: Disable MSVC warnings locally

13 years agoResync with upstream http-parser
Carlos Martín Nieto [Wed, 28 Sep 2011 21:54:09 +0000 (23:54 +0200)]
Resync with upstream http-parser

13 years agomsvc: Disable warnings in header file
Vicent Marti [Wed, 28 Sep 2011 21:42:38 +0000 (23:42 +0200)]
msvc: Disable warnings in header file

Remove clutter from the CMakeLists file by disabling the warnings
programatically.

13 years agohttp-parser: More type changes
Vicent Marti [Wed, 28 Sep 2011 18:21:48 +0000 (20:21 +0200)]
http-parser: More type changes

13 years agoChange types in http-parser
Vicent Marti [Wed, 28 Sep 2011 17:27:58 +0000 (19:27 +0200)]
Change types in http-parser

13 years agoUpdate Clay
Vicent Marti [Wed, 28 Sep 2011 16:57:32 +0000 (18:57 +0200)]
Update Clay

13 years agoMerge pull request #432 from carlosmn/msvc
Vicent Martí [Tue, 27 Sep 2011 18:14:23 +0000 (11:14 -0700)]
Merge pull request #432 from carlosmn/msvc

Really fix MSVC

13 years agoReally fix MSVC
Carlos Martín Nieto [Tue, 27 Sep 2011 18:08:13 +0000 (20:08 +0200)]
Really fix MSVC

These was left over from the previous PRs.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agoFix dev branch under MSVC
Carlos Martín Nieto [Fri, 23 Sep 2011 15:36:37 +0000 (17:36 +0200)]
Fix dev branch under MSVC

In libgit2: Move an enum out of an int bitfield in the HTTP transport.

In the parser: Use int bitfields and change some variable sizes to
better fit thir use. Variables that count the size of the data chunk
can only ever be as large as off_t. Warning 4127 can be ignored, as
nobody takes it seriously anyway.

From Emeric: change some variable declarations to keep MSVC happy.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
13 years agohttp-parser: Do not use bitfields
Vicent Marti [Tue, 27 Sep 2011 12:53:57 +0000 (14:53 +0200)]
http-parser: Do not use bitfields

Bitfields suck. And if you make them with non-int types, they suck
in a non-standards compliant way. Like sucking sideways or something.

This commit removes all bitfields in the `http_parser` struct, and
replaces them with the minimal type needed to contain their values. Note
that the fields in the struct have been reordered so they can be packed
with 4-byte alignment.

This saves both memory on the parser (because non-int bitfields get expanded to
4byte in most compilers anyway) and time (because the fields are now
properly aligned and the compiler doesn't need to generate bit-level ops
to access them).

13 years agoMake repo config loading automatic or completely explicit
Carlos Martín Nieto [Thu, 22 Sep 2011 20:50:36 +0000 (22:50 +0200)]
Make repo config loading automatic or completely explicit

git_repository_config wants to take the global and system paths again
so that one can be explicit if needed.

The git_repository_config_autoload function is provided for the cases
when it's good enough for the library to guess where those files are
located.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>