Vicent Marti
9d77d83a81
Revert "threads: Fix TLS declarations"
...
This commit uploaded an old broken test. Oops!
2011-06-07 03:38:09 +02:00
Vicent Martí
2c9e7fa35e
Merge pull request #232 from schu/ref-available-cb
...
reference_rename: respect all references v2
2011-06-06 18:24:37 -07:00
Vicent Marti
64fe8c62f9
threads: Fix TLS declarations
...
Cleanup the thread-utils file. Do not define TLS if libgit2 is not
threadsafe.
2011-06-07 03:22:32 +02:00
Vicent Martí
7d170a4b50
Merge pull request #231 from Romain-Geissler/discovery-path-v2
...
[Discovery path] Fix and tests
2011-06-06 18:11:15 -07:00
Romain Geissler
efcc87c9d9
Repository: A little fix in error code. GIT_ENOTFOUND is returned when a gitfile is malformed and GIT_ENOTAREPO when the pointed dir is not a repo.
...
Fixed tests so that it check the right error code.
2011-06-06 10:02:07 +02:00
schu
fd21c6f67f
Add test case checking we do not corrupt the repository when renaming
...
Signed-off-by: schu <schu-github@schulog.org>
2011-06-05 19:20:57 +02:00
Romain Geissler
76e9e3b763
Tests: Added tests for git_repository_discover.
...
Unfortunately, the across_fs flag can't be tested automaticly, as we can't
create a temporary new filesystem.
2011-06-05 00:23:24 +02:00
Vicent Marti
602ee38b6e
repository: Export all internal paths
2011-06-04 20:45:09 +02:00
unknown
26a98ec8a2
Fileops: Added a fourth argument to the path prettifying functions to use an alternate basepath.
...
Fixed a Windows TO-DO in the prettifying functions.
2011-06-03 21:04:02 +02:00
Vicent Martí
dd8a2070ce
Merge pull request #215 from schu/typos
...
Fix typos
2011-06-01 12:54:15 -07:00
Vicent Martí
46d359d1c3
Merge pull request #218 from schu/tests-fflush
...
test_lib.c: flush stdout after every test-run
2011-06-01 12:53:46 -07:00
Vicent Martí
9db04160a5
Merge pull request #222 from carlosmn/config-bugfix
...
Config bugfix
2011-06-01 12:52:50 -07:00
Vicent Martí
50b7334e51
Merge pull request #206 from nulltoken/topic/is-bare
...
Add git_repository_is_bare() accessor
2011-06-01 09:58:21 -07:00
Vicent Marti
f7e59c4dcf
index: Change the memory management for repo indexes
...
The `git_repository_index` call now returns a brand new index that must
be manually free'd.
2011-06-01 18:54:47 +02:00
Carlos Martín Nieto
fc0ee5bdd3
Add test for empty config file
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-31 17:57:18 +02:00
Carlos Martín Nieto
30d0550da8
Add test for invalid ext header
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-31 17:57:17 +02:00
Carlos Martín Nieto
38d0bc1e81
Add config test for empty line
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-31 17:57:17 +02:00
schu
a7ed162538
test_lib.c: flush stdout after every test-run
...
Make sure the user immediately sees the feedback, '.' or 'F', for a
test. If it's only in the buffer, it may gets "lost" in case of error.
Signed-off-by: schu <schu-github@schulog.org>
2011-05-30 21:13:11 +02:00
schu
286349c6ec
Fix tiny typo
...
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
Signed-off-by: schu <schu-github@schulog.org>
2011-05-29 20:15:27 +02:00
nulltoken
fa9bcd81f5
Add git_repository_is_bare() accessor
2011-05-24 21:50:02 +02:00
Vicent Marti
b0b527e0ad
config: Cleanup & renaming of the external API
...
"git_config_backend" have been renamed to "git_config_file", which
implements a generic interface to access a configuration file -- be it
either on disk, from a DB or whatever mumbojumbo.
I think this makes more sense.
2011-05-20 03:20:12 +03:00
schu
6628c2560c
test_lib: add return value to git_test
...
Save the return value of functions not passing must_pass() and report
the returned error.
Signed-off-by: schu <schu-github@schulog.org>
2011-05-18 12:36:41 +02:00
Vicent Marti
c9662061f2
t15: Remove unused variable
2011-05-17 15:12:25 +03:00
Vicent Marti
124fbb3d74
tests: Update NAMING file
2011-05-17 15:11:43 +03:00
Vicent Martí
62845c903e
Merge pull request #116 from carlosmn/test-naming
...
tests: update NAMING file
2011-05-17 05:11:06 -07:00
Carlos Martín Nieto
94711cad3b
Merge upstream/development
2011-05-17 12:12:59 +02:00
Carlos Martín Nieto
c033500549
Move config to a backend structure
...
Configuration options can come from different sources. Currently,
there is only support for reading them from a flat file, but it might
make sense to read it from a database at some point.
Move the parsing code into src/config_file.c and create an include
file include/git2/config_backend.h to allow for other backends to be
developed.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-10 14:47:20 +02:00
Carlos Martín Nieto
ca8d2dfc0c
Merge remote-tracking branch 'upstream/development' into config
2011-05-05 16:22:06 +02:00
Carlos Martín Nieto
bbd68c6768
ref test: update a forgotten repo -> repo2
...
Commit 34e5d87e05
left one of these unchanged we're trying
to read from a free'd repository.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-05 11:40:39 +02:00
Vicent Martí
cc3b82e376
Merge pull request #151 from carlosmn/root-commit.
...
Support root commits
2011-05-02 15:29:50 -07:00
Vicent Martí
fde97669ec
Merge pull request #146 from nordsturm/fix_subtrees.
...
Fix tree-entry attribute convertion (fix corrupted trees)
2011-05-02 15:26:16 -07:00
Vicent Martí
d4ad0771e4
Merge pull request #145 from schu/fix-unused-warnings.
...
Fix -Wunused-but-set-variable warnings
2011-05-01 14:59:50 -07:00
nulltoken
34e5d87e05
Change implementation of refs tests that alter the current repository to make them run against a temporary clone of the test repository
2011-05-01 21:35:32 +02:00
Carlos Martín Nieto
79b6155736
Add root commit test
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-04-29 12:08:24 +02:00
Sergey Nikishin
555ce56819
Fix tree-entry attribute convertion (fix corrupted trees)
...
Magic constant replaced by direct to-string covertion because of:
1) with value length 6 (040000 - subtree) final tree will be corrupted;
2) for wrong values length <6 final tree will be corrupted too.
2011-04-26 15:32:11 +04:00
schu
402a47a7fa
Fix -Wunused-but-set-variable warnings
...
As of gcc 4.6 -Wall includes -Wunused-but-set-variable. Use GIT_UNUSED
or remove actually unused variables to prevent those warnings.
2011-04-26 11:29:05 +02:00
Vicent Martí
5a74d16048
Merged pull request #135 from carlosmn/valgrind.
...
Fix memory leaks in the tests
2011-04-23 14:37:56 -07:00
Carlos Martín Nieto
a99264bff6
config: allow uppercase number suffixes
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-04-19 16:34:22 +02:00
Carlos Martín Nieto
7c1c15a7fb
tests: free the test suite name
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-04-13 21:55:43 +02:00
Carlos Martín Nieto
2fe3692c23
tests: don't leak objects
...
If we don't create any leaks in the tests, we can use them to search
for leaks in the implementation.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-04-13 21:50:11 +02:00
Vicent Marti
def3fef197
Add git_tag_list
...
Lists all the tag references in a repository using a custom callback.
Includes unit tests courtesy of Emeric Fermas <3
2011-04-12 15:55:51 -07:00
Carlos Martín Nieto
53345e1f1f
config: add tests for number suffix
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-04-11 18:01:01 +02:00
Carlos Martín Nieto
55c197cdd3
Merge upstream/development
2011-04-11 17:43:56 +02:00
Vicent Marti
fdd0cc9e89
Fix path normalization tests
...
They were backtracking too deep into the filesystem on Linux, where the
tests were running directly on `tmp/`.
2011-04-10 15:25:41 -07:00
Vicent Marti
a6359408a5
Use Z_BEST_SPEED for filebuf deflating
...
This is what Git uses by default for all deflating.
2011-04-10 12:23:55 -07:00
nulltoken
4a34b3a9ff
Add two new accessors to the repository
...
git_repository_path() and git_repository_workdir() respectively return the path to the git repository and the working directory. Those paths are absolute and normalized.
2011-04-09 15:25:24 -07:00
Vicent Marti
b918ae40d1
Do not declare variables in the middle of a func
2011-04-08 15:35:25 -07:00
Vicent Marti
41233c40c0
Add new method git_repository_is_empty
2011-04-08 12:42:18 -07:00
Vicent Marti
cef75d7430
Remove unused variables from test files
2011-04-08 12:41:17 -07:00
Vicent Marti
d79f1da65a
refs: Fix issue when packing weak tags
...
Weak tags (e.g. tags that point directly to a normal object instead of a
tag object) were failing to be packed.
2011-04-08 12:14:33 -07:00