Vicent Martí
f12aa9dc5e
Merge pull request #300 from carlosmn/gsoc2011/master
...
A bit of networking
2011-07-05 04:31:37 -07:00
Carlos Martín Nieto
7d69f78897
Add variable writing tests
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-07-05 02:32:18 +02:00
Carlos Martín Nieto
156af801e6
Add test for section header at end of file
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-07-05 02:32:18 +02:00
Carlos Martín Nieto
2601fcfc1e
Add tests for deleting a config var
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-07-05 02:32:17 +02:00
nulltoken
a01acc47bb
signature: straighten the creation of a signature
...
- Fails on empty name and/or email
- Trims leading and trailing spaces of name and email
2011-07-05 02:21:26 +02:00
nulltoken
42a1b5e1ad
signature: enhance relaxed parsing of bogus signatures
...
Final fix for issue #278
2011-07-05 02:21:26 +02:00
schu
60caf02465
t04-commit: add tests for git_signature__parse
...
git_signature__parse used to be very strict about what's a well-formed
signature. Add tests checking git_signature__parse can stick with
"unexpected" signatures (IOW no author name and / or no email, etc).
Signed-off-by: schu <schu-github@schulog.org>
2011-07-05 02:21:26 +02:00
Vicent Marti
eec3fe394a
fileutils: Finish dropping the old prettify_path
2011-07-05 02:09:05 +02:00
Vicent Marti
5ad739e832
fileops: Drop git_fileops_prettify_path
...
The old `git_fileops_prettify_path` has been replaced with
`git_path_prettify`. This is a much simpler method that uses the OS's
`realpath` call to obtain the full path for directories and resolve
symlinks.
The `realpath` syscall is the original POSIX call in Unix system and
an emulated version under Windows using the Windows API.
2011-07-05 02:06:26 +02:00
Vicent Marti
f79026b491
fileops: Cleanup
...
Cleaned up the structure of the whole OS-abstraction layer.
fileops.c now contains a set of utility methods for file management used
by the library. These are abstractions on top of the original POSIX
calls.
There's a new file called `posix.c` that contains
emulations/reimplementations of all the POSIX calls the library uses.
These are prefixed with `p_`. There's a specific posix file for each
platform (win32 and unix).
All the path-related methods have been moved from `utils.c` to `path.c`
and have their own prefix.
2011-07-05 02:04:03 +02:00
Kirill A. Shutemov
932d1baf29
cleanup: remove trailing spaces
...
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-07-01 18:02:56 +02:00
Kirill A. Shutemov
fe5babacd6
filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZE
...
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-06-30 16:19:19 +03:00
nulltoken
6ac91dfe52
Hide ".git" directory on Windows upon creation of a non bare repository
...
Directory which name starts with a dot are hidden on Linux platforms. This patch makes libgit2 behaves similarly on Windows.
2011-06-29 19:22:24 +02:00
Vicent Marti
7376ad9927
refs: Remove duplicate rename method
...
`git_reference_rename` now takes a `force` flag
2011-06-29 11:01:35 +02:00
Vicent Marti
ab7941b5d9
test: Properly show error messages
2011-06-28 21:10:51 +02:00
Vicent Marti
5cf1f909e4
test: Print last error message properly
2011-06-28 21:10:49 +02:00
Vicent Marti
c682886e8e
repo: Rename HEAD-related methods
2011-06-28 21:10:44 +02:00
Vicent Martí
ccd59372d4
Merge pull request #279 from carlosmn/detached-orphan
...
Add detached and orphan convenience functions
2011-06-28 10:44:19 -07:00
Vicent Marti
d5afc0390c
Remove redundant methods from the API
...
A bunch of redundant methods have been removed from the external API.
- All the reference/tag creation methods with `_f` are gone. The force
flag is now passed as an argument to the normal create methods.
- All the different commit creation methods are gone; commit creation
now always requires a `git_commit` pointer for parents and a `git_tree`
pointer for tree, to ensure that corrupted commits cannot be generated.
- All the different tag creation methods are gone; tag creation now
always requires a `git_object` pointer to ensure that tags are not
created to inexisting objects.
2011-06-28 19:36:27 +02:00
Carlos Martín Nieto
f5e09d6080
Add tests for detached and orphan
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-28 16:59:51 +02:00
Carlos Martín Nieto
c5b2622d68
Add git_refspec_transform test
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 18:18:11 +02:00
Carlos Martín Nieto
fa9dcb7ede
Add refspec match test
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 18:18:11 +02:00
Carlos Martín Nieto
73fdf706cc
Add refspec0 test
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 18:18:11 +02:00
Carlos Martín Nieto
a030ae5020
Add a test for remote parsing
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 18:18:10 +02:00
Vicent Marti
3101a3e5b8
refs: Do not overflow when normalizing refnames
2011-06-23 02:29:11 +02:00
schu
24bd5e556b
Add test case checking GIT_FILEBUF_APPEND
...
Signed-off-by: schu <schu-github@schulog.org>
2011-06-20 15:58:56 +02:00
Vicent Marti
2a406ab51c
config: Fix sorting of repository config files
2011-06-18 02:08:56 +02:00
Vicent Marti
dbe70bd5c3
config: Fix compilation in MSVC
2011-06-18 01:12:58 +02: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
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
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
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 Martí
607d164380
Merge pull request #248 from carlosmn/config
...
Implement config writing
2011-06-15 17:24:04 -07: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
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
Carlos Martín Nieto
a98b0d80dc
Test replacing a value
...
Add a test to check that value replacement works.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-14 14:26:08 +02:00
nulltoken
95818ff73a
Fix filebuf0 test which was failing on Windows
2011-06-12 07:37:56 +02:00
nulltoken
9e3aa94764
Fix compilation warnings in MSVC
2011-06-12 07:37:50 +02:00
Brian Lopez
a51201cc73
use proper in-memory database for sqlite3 tests
2011-06-11 22:06:02 -07:00
Carlos Martín Nieto
8102a961b8
Add test for git_filebuf_open error code
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-07 17:02:33 +02:00
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