Commit Graph

1149 Commits

Author SHA1 Message Date
Vicent Marti
4007044553 config: Typorrrrl 2011-06-18 00:55:03 +02:00
Vicent Martí
deee4766a8 Merge pull request #267 from Jopie64/development
Fix compilation error in MSVC when compiling for c++
2011-06-17 15:44:26 -07:00
Vicent Marti
07ff881750 config: Cleanup external API
Do not mess with environment variables anymore. The new external API has
more helper methods, and everything is explicit.
2011-06-18 00:39:39 +02:00
Johan 't Hart
f061988667 Fix compilation error in MSVC when compiling for c++ 2011-06-17 23:58:34 +02:00
Carlos Martín Nieto
f3dad3acd7 Add fall-back support to the configuration
If a config has several files, we need to check all of them before we
can say that a variable doesn't exist.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:30 +02:00
Carlos Martín Nieto
3de5df7d8e Add a test for overriding config
The repo's configuration should take precedence over the global one.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:29 +02:00
Carlos Martín Nieto
9ba9e513bc Parse the repo's configuration when we load it
It's not enough to load the config, we also need to explicitely parse
it after we create it.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:29 +02:00
Carlos Martín Nieto
b22d147986 Add git_repository_config API
This function puts the global and repository configurations in one
git_config object and gives it to the user.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:29 +02:00
Carlos Martín Nieto
b76934de6c Remove double-space
Noticed by txdv

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:29 +02:00
Vicent Marti
c716b1878e config: Fix unitialized variable warning 2011-06-17 19:47:58 +02:00
Vicent Marti
f0890fccf9 cmake: Build shared library by default 2011-06-17 19:40:51 +02:00
Vicent Marti
e01f7f642c windows: Disable Runtime checks
Runtime checks are asserting on the embedded ZLib code because of
truncation (see zlib/trees.c:218). This is not good or pretty, but I'm
wary about patching the ZLib code even more.

There are two ways to fix this:

	- Patch the ZLib code, and start storing a diff/patchset on
	how does our version of ZLib differ from the original one, so we can
	be more or less on sync when new version of ZLib.

	- Go back to ZLib as an external dependency, which is np for *NIX
	users but annoying as dicks for Windows users.

THINK HARD
2011-06-17 19:40:06 +02:00
Vicent Martí
f252d479e7 Merge pull request #264 from nulltoken/patch-2
Fix misleading comment in CMake build script
2011-06-17 10:32:42 -07:00
Vicent Martí
2414d000a1 Merge pull request #266 from carlosmn/valgrind
Plug memory leaks
2011-06-17 10:32:22 -07:00
Vicent Marti
02285482f1 fileops: Cast the GetProcAddress value 2011-06-17 19:19:30 +02:00
Vicent Marti
9c11bd0a06 fileops: Fix 'GetFinalPathNameByHandleA' in old platforms 2011-06-17 19:09:18 +02:00
Carlos Martín Nieto
3d5a02b653 Plug an index leak
The test wasn't updated when repos lost ownership of indices

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-16 20:30:40 +02:00
Carlos Martín Nieto
038d2fc343 Plug leaks in the repo discovery tests
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-16 20:24:51 +02:00
Carlos Martín Nieto
b2e361cc5e Plug two leaks in config writing
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-16 20:22:05 +02:00
3d96996da6 Fix misleading comment in CMake build script 2011-06-16 08:10:25 -07:00
Vicent Martí
cb75ffea80 Merge pull request #263 from carlosmn/refs-writing
Simplify loose ref writing
2011-06-16 08:01:47 -07:00
Carlos Martín Nieto
e7e0e20fc5 Simplify loose ref writing
There is no need to store the format outselves, as the library
provides git_filebuf_printf which takes care of the formatting itself.

Also get rid of an use of strcat + strcpy which is always a nice
thing.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-16 16:39:20 +02:00
Vicent Marti
d144c569f3 Update documentation
Fix all the missmatched arguments in the docs
2011-06-16 03:06:22 +02:00
Vicent Marti
f1d018513a oid: Uniformize ncmp methods
Drop redundant methods. The ncmp method is now public
2011-06-16 02:50:08 +02:00
Vicent Marti
fa48608ec3 oid: Rename methods
Yeah. Finally. Fuck the old names, this ain't POSIX
and they don't make any sense at all.
2011-06-16 02:36:21 +02:00
Vicent Marti
43521d0688 refs: Rename git_referece_listcb to _foreach
Same name as `git_config_foreach`
2011-06-16 02:27:43 +02:00
Vicent Martí
607d164380 Merge pull request #248 from carlosmn/config
Implement config writing
2011-06-15 17:24:04 -07:00
Vicent Marti
536955f9d7 Add method to get the compiled version of the lib 2011-06-16 02:21:33 +02:00
Vicent Martí
ef9a6f4cbc Merge pull request #261 from Romain-Geissler/discovery-path-v2
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
2011-06-15 13:47:41 -07:00
Romain Geissler
0657e46dee Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
GIT_PATH_LIST_SEPARATOR and GIT_PATH_MAX are made public so
that it's can be used by a client.
2011-06-15 22:11:18 +02:00
Vicent Martí
f2bb894e64 Merge pull request #251 from nulltoken/fix/msvc-warnings
Fix compilation warnings in MSVC
2011-06-15 12:15:11 -07:00
Vicent Martí
1aa1b09e73 Merge pull request #260 from nulltoken/fix/git_index_add
Fix git_index_add()
2011-06-15 12:11:59 -07:00
nulltoken
8e11e707f3 git_index_add: enforce test coverage 2011-06-15 21:10:16 +02:00
nulltoken
a64bf21bbb blob: Fix git_blob_create_fromfile() 2011-06-15 21:10:10 +02:00
nulltoken
63fadf99dc Add mode_t definition in MSVC compat layer 2011-06-15 19:45:33 +02:00
Vicent Martí
61438604b2 Merge pull request #259 from schu/nitpicky-markdown
README.md: do not break syntax highlighting
2011-06-15 10:39:20 -07:00
Scott Chacon
96da90ae1f update examples content to be compilable and up to date 2011-06-15 09:40:06 -07:00
schu
8087bb937e README.md: do not break syntax highlighting
Signed-off-by: schu <schu-github@schulog.org>
2011-06-15 14:08:43 +02:00
Scott Chacon
2e6d8ec436 fix the example urls 2011-06-14 16:02:23 -07:00
Scott Chacon
388f37b37b add examples for docs 2011-06-14 14:18:13 -07:00
Scott Chacon
742e3fc92e replace stupid doxygen 2011-06-14 14:18:13 -07:00
Vicent Marti
f64586fab6 Add CTest support for CI 2011-06-14 20:00:06 +02:00
Scott Chacon
737406b7ab fix gid_ misspelling 2011-06-14 09:31:19 -07:00
Em
904125075e Port MSVC specific Waf compilation flags to CMake and remove dynamic dependence to msvcr100.dll on Windows
The '/MT' and '/MTd' flags replace the dynamic link to 'msvcr100.dll' with a static link to 'libcmt.lib'. This has the nice effect to ease the deployment of libgit2 by removing the dependence on 'msvcr100.dll' which is not deployed by default on Windows.
2011-06-14 17:40:18 +02:00
Vicent Marti
7548b8afa3 Update README.md 2011-06-14 17:40:18 +02:00
Vicent Marti
953e1f9366 build: Cleanup CMake 2011-06-14 17:40:18 +02:00
Vicent Marti
1a7b52dcc9 build: Drop waf support
Goodbye Waf. It's been a long ride.
2011-06-14 17:40:17 +02:00
Vicent Marti
b023321669 Remove custom backends
All the custom backend code will be moved to a separate project,
	together with the new MySQL backend.
2011-06-14 17:40:17 +02:00
Vicent Martí
0f49a58901 Merge pull request #258 from carlosmn/no-arpa
Remove uneeded arpa/inet.h include
2011-06-14 08:28:03 -07:00
Carlos Martín Nieto
2e18e29b57 Remove uneeded arpa/inet.h include
This header isn't needed at all and it shows a lot of warnings on
OpenBSD.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-14 17:03:25 +02:00