|
e7be57a9
|
2011-08-15T18:56:27
|
|
reflog: assimilate reflog API to return git_oid's
Rather than returning the OIDs out of the reflog as string return them
as git_oid.
Signed-off-by: schu <schu-github@schulog.org>
|
|
5ae2f0c0
|
2011-08-12T16:24:19
|
|
commit: Add support for Encoding header
|
|
befae28f
|
2011-08-10T21:19:21
|
|
t12-repo.c: fix failing test discover0
discover0 tried to stat a non existing directory. Create it beforehand.
Signed-off-by: schu <schu-github@schulog.org>
|
|
ccd122fd
|
2011-07-22T12:31:51
|
|
discover: Make test run in temporary folder instead of altering the test resources folder
|
|
f6867e63
|
2011-08-08T16:56:28
|
|
Fix compilation in Windows
|
|
6e6ec54b
|
2011-08-06T11:26:59
|
|
Force the test's main function to use cdecl under Windows
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
9d76b934
|
2011-08-04T22:49:39
|
|
Fix wrong test in t04-commit
Replace all must_pass(strcmp()) by must_be_true(strcmp()==0)
|
|
63396a39
|
2011-08-03T15:57:33
|
|
signature: adjust API to return error codes
git_signature_new() and git_signature_now() currently don't return error
codes. Change the API to return error codes and not pointers to let the
user handle errors properly.
Signed-off-by: schu <schu-github@schulog.org>
|
|
5274c31a
|
2011-08-03T01:17:31
|
|
signature.c: fix off-by-one error
Signed-off-by: schu <schu-github@schulog.org>
|
|
7d3ec3ca
|
2011-08-02T19:23:00
|
|
Fix memory leak when wrong object type is looked up from cache
Update unit test accordingly : no need to close
|
|
eed2714b
|
2011-08-01T17:00:31
|
|
reflog: avoid users writing a wrong ancestor OID
Disallow NULL as ancestor OID when writing a reflog entry for an
existing reference.
Signed-off-by: schu <schu-github@schulog.org>
|
|
20a7e820
|
2011-07-26T15:53:52
|
|
Remove extra git_index_read from the tests
When you open an index with git_index_open, the file is read before
the function returns. Thus, calling git_index_read after that is
useless.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
84ef7f36
|
2011-07-15T18:34:20
|
|
tests: fix cast warnings
/home/kas/git/public/libgit2/tests/t00-core.c: In function ‘test_cmp’:
/home/kas/git/public/libgit2/tests/t00-core.c:78:10: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t00-core.c:78:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t07-hashtable.c: In function ‘hash_func’:
/home/kas/git/public/libgit2/tests/t07-hashtable.c:42:7: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t08-tag.c: In function ‘_gittest__write0’:
/home/kas/git/public/libgit2/tests/t08-tag.c:141:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t08-tag.c: In function ‘_gittest__write2’:
/home/kas/git/public/libgit2/tests/t08-tag.c:192:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t08-tag.c: In function ‘_gittest__write3’:
/home/kas/git/public/libgit2/tests/t08-tag.c:227:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t04-commit.c: In function ‘_gittest__write0’:
/home/kas/git/public/libgit2/tests/t04-commit.c:650:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t04-commit.c:651:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t04-commit.c: In function ‘_gittest__root0’:
/home/kas/git/public/libgit2/tests/t04-commit.c:723:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t04-commit.c:724:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t12-repo.c: In function ‘write_file’:
/home/kas/git/public/libgit2/tests/t12-repo.c:360:24: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
324f0eec
|
2011-07-13T18:03:12
|
|
Merge pull request #325 from carlosmn/valgrind
More memory leaks
|
|
f4ad64c1
|
2011-07-13T07:58:17
|
|
tree: fix insertion of entries with invalid filenames
|
|
cd0fe1ac
|
2011-07-12T20:46:07
|
|
Free sig in reflog test
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
d4760a42
|
2011-07-12T11:29:36
|
|
status: refactor the tests to remove some code duplication
|
|
55e1609b
|
2011-07-12T18:10:31
|
|
Don't leak the buf when testing it
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
b08683ff
|
2011-07-12T02:38:20
|
|
config: Rename `del` to `delete
|
|
bfbb5562
|
2011-07-11T16:30:46
|
|
tag: Add creation of lightweight tag
|
|
eb1fd1d0
|
2011-07-11T19:28:07
|
|
What the fuck was this doing in `src`?
|
|
7757be33
|
2011-07-10T07:48:52
|
|
reflog: Fix reflog writer/reader
- Use a space to separate oids and signature
- Enforce test coverage
- Make test run in a temporary folder in order not to alter the test repository
|
|
c52736fa
|
2011-07-09T15:05:14
|
|
status: Cleanup
The `hashfile` function has been moved to ODB, next to `git_odb_hash`.
Global state has been removed from the dirent call in `status.c`,
because global state is killing the rainforest and causing global
warming.
|
|
3b2a423c
|
2011-07-09T00:08:52
|
|
status: nonexistent file with git_status_file()
Throws GIT_ENOTFOUND error if given a filename that is not in
HEAD, index, nor the work tree.
|
|
2b90cc26
|
2011-07-08T23:51:05
|
|
status: consolidate some test code
Refactored copy of test repo to a function.
|
|
34dfea27
|
2011-06-24T20:36:53
|
|
status: handle subdirs for git_status_file
|
|
6b251490
|
2011-06-24T18:35:06
|
|
status: add subdir to test repo
|
|
20361b2f
|
2011-06-23T18:51:22
|
|
status: get status for single file
Add git_status_file to be able to retrieve status of single file by
supplying a path.
|
|
3af6b34a
|
2011-06-22T18:31:20
|
|
status: get file statuses and run callback
Add git_status_foreach() to run a callback on each file passing the path
and a status value.
|
|
210940da
|
2011-06-22T18:23:57
|
|
status: new test repo
|
|
205166d2
|
2011-06-22T18:19:46
|
|
status: get blob object id of file on disk
Add git_status_hashfile() to get blob's object id for a file without adding
it to the object database or needing a repository at all.
This functionality is similar to `git hash-object` without '-w'.
|
|
7361857c
|
2011-07-08T22:44:15
|
|
Update tests/NAMING
|
|
06c43821
|
2011-07-09T02:37:16
|
|
Remove unused methods
The direct-writes commit left some (slow) internals methods that
were no longer needed. These have been removed.
Also, the Reflog code was using the old `git_signature__write`, so
it has been rewritten to use a normal buffer and the new `writebuf`
signature writer. It's now slightly simpler and faster.
|
|
afeecf4f
|
2011-07-09T02:10:46
|
|
odb: Direct writes are back
DIRECT WRITES ARE BACK AND FASTER THAN EVER. The streaming writer to the
ODB was an overkill for the smaller objects like Commit and Tags; most
of the streaming logic was taking too long.
This commit makes Commits, Tags and Trees to be built-up in memory, and
then written to disk in 2 pushes (header + data), instead of streaming
everything.
This is *always* faster, even for big files (since the git_filebuf class
still does streaming writes when the memory cache overflows). This is
also a gazillion lines of code smaller, because we don't have to
precompute the final size of the object before starting the stream (this
was kind of defeating the point of streaming, anyway).
Blobs are still written with full streaming instead of loading them in
memory, since this is still the fastest way.
A new `git_buf` class has been added. It's missing some features, but
it'll get there.
|
|
27df4275
|
2011-06-28T14:13:12
|
|
reflog: add API to read or write a reference log
So far libgit2 didn't support reference logs (reflog). Add a new
git_reflog_* API for basic reading and writing of reflogs:
* git_reflog_read
* git_reflog_write
* git_reflog_free
Signed-off-by: schu <schu-github@schulog.org>
|
|
6d4f090d
|
2011-07-07T17:49:55
|
|
reference_renaming: add additional tests
Add some more test checking forced reference renaming.
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
Acked-by: schu <schu-github@schulog.org>
|
|
2b5af615
|
2011-07-07T13:47:45
|
|
tag: add pattern based retrieval of list of tag names
|
|
c1e85748
|
2011-07-07T12:23:47
|
|
test-core: Fix warning in uniq test
|
|
bdcc4611
|
2011-07-07T10:11:00
|
|
Fix MSVC compilation warnings
|
|
de18f276
|
2011-07-07T01:46:20
|
|
vector: Timsort all of the things
Drop the GLibc implementation of Merge Sort and replace it with Timsort.
The algorithm has been tuned to work on arrays of pointers (void **),
so there's no longer a need to abstract the byte-width of each element
in the array.
All the comparison callbacks now take pointers-to-elements, not
pointers-to-pointers, so there's now one less level of dereferencing.
E.g.
int index_cmp(const void *a, const void *b)
{
- const git_index_entry *entry_a = *(const git_index_entry **)(a);
+ const git_index_entry *entry_a = (const git_index_entry *)(a);
The result is up to a 40% speed-up when sorting vectors. Memory usage
remains lineal.
A new `bsearch` implementation has been added, whose callback also
supplies pointer-to-elements, to uniform the Vector API again.
|
|
c63aa494
|
2011-07-07T01:04:14
|
|
test: Abort when the temp workdir cannot be created
|
|
26911cbd
|
2011-07-06T12:27:51
|
|
Fix MSVC compilation warnings
|
|
bf9a2e98
|
2011-07-06T10:55:06
|
|
Merge pull request #296 from kiryl/index-optimization
Index optimization
|
|
858dba58
|
2011-07-06T18:08:13
|
|
refs: Cleanup reference renaming
`git_futils_rmdir_r`: rename, clean up.
`git_reference_rename`: cleanup. Do not use 3x4096 buffers on the stack
or things will get ugly very fast. We can reuse the same buffer.
|
|
1b938a58
|
2011-07-03T22:27:05
|
|
Remove duplicated recursive directory removal related code
|
|
1ee5fd90
|
2011-07-03T14:42:32
|
|
Fix windows specific issues
- msvc compilation warnings
- not released file handle that prevents file removal
|
|
0ffcf78a
|
2011-06-14T15:16:43
|
|
reference_rename: git compliant reference renaming
So far libgit2 didn't handle the following scenarios:
* Rename of reference m -> m/m
* Rename of reference n/n -> n
Fixed.
Since we don't write reflogs, we have to delete any old reflog for the
renamed reference. Otherwise git.git will possibly fail when it finds
invalid logs.
Reported-by: nulltoken <emeric.fermas@gmail.com>
Signed-off-by: schu <schu-github@schulog.org>
|
|
7ea50f60
|
2011-06-09T19:56:42
|
|
Add tests for git_futils_rmdir_resurs()
Signed-off-by: schu <schu-github@schulog.org>
|
|
a6e0f315
|
2011-05-29T16:46:24
|
|
Add test case checking renaming of a branch to a new name prefixed with
the old name succeeds, e.g. refs/heads/foo -> refs/heads/foo/bar
Reported-by: nulltoken <emeric.fermas@gmail.com>
Signed-off-by: schu <schu-github@schulog.org>
|
|
7a7ef2dc
|
2011-07-05T17:44:51
|
|
Restore config10 test file
Removing a section variable doesn't remove its section
header. Overwrite the config10 file so there are no changes after the
test is run.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
476c42ac
|
2011-07-02T00:41:49
|
|
vector: implement git_vector_uniq()
The routine remove duplictes from the vector. Only the last added element
of elements with equal keys remains in the vector.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
f12aa9dc
|
2011-07-05T04:31:37
|
|
Merge pull request #300 from carlosmn/gsoc2011/master
A bit of networking
|
|
7d69f788
|
2011-06-28T16:48:04
|
|
Add variable writing tests
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
156af801
|
2011-06-28T16:27:16
|
|
Add test for section header at end of file
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
2601fcfc
|
2011-06-28T15:21:44
|
|
Add tests for deleting a config var
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
a01acc47
|
2011-07-03T14:03:43
|
|
signature: straighten the creation of a signature
- Fails on empty name and/or email
- Trims leading and trailing spaces of name and email
|
|
42a1b5e1
|
2011-07-01T17:59:10
|
|
signature: enhance relaxed parsing of bogus signatures
Final fix for issue #278
|
|
60caf024
|
2011-06-28T17:06:06
|
|
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>
|
|
eec3fe39
|
2011-07-05T01:11:33
|
|
fileutils: Finish dropping the old `prettify_path`
|
|
5ad739e8
|
2011-07-04T20:05:11
|
|
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.
|
|
f79026b4
|
2011-07-04T11:43:34
|
|
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.
|
|
932d1baf
|
2011-06-30T19:52:34
|
|
cleanup: remove trailing spaces
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
fe5babac
|
2011-06-30T00:16:23
|
|
filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZE
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
6ac91dfe
|
2011-06-29T14:06:18
|
|
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.
|
|
7376ad99
|
2011-06-29T11:01:35
|
|
refs: Remove duplicate rename method
`git_reference_rename` now takes a `force` flag
|
|
ab7941b5
|
2011-06-28T21:04:59
|
|
test: Properly show error messages
|
|
5cf1f909
|
2011-06-28T20:27:38
|
|
test: Print last error message properly
|
|
c682886e
|
2011-06-28T21:09:22
|
|
repo: Rename HEAD-related methods
|
|
ccd59372
|
2011-06-28T10:44:19
|
|
Merge pull request #279 from carlosmn/detached-orphan
Add detached and orphan convenience functions
|
|
d5afc039
|
2011-06-28T19:15:48
|
|
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.
|
|
f5e09d60
|
2011-06-28T14:11:24
|
|
Add tests for detached and orphan
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
c5b2622d
|
2011-06-23T16:32:06
|
|
Add git_refspec_transform test
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
fa9dcb7e
|
2011-06-22T14:17:29
|
|
Add refspec match test
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
73fdf706
|
2011-06-21T10:55:16
|
|
Add refspec0 test
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
a030ae50
|
2011-06-20T20:21:20
|
|
Add a test for remote parsing
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
3101a3e5
|
2011-06-23T02:28:29
|
|
refs: Do not overflow when normalizing refnames
|
|
24bd5e55
|
2011-06-20T10:40:21
|
|
Add test case checking GIT_FILEBUF_APPEND
Signed-off-by: schu <schu-github@schulog.org>
|
|
2a406ab5
|
2011-06-18T02:08:56
|
|
config: Fix sorting of repository config files
|
|
dbe70bd5
|
2011-06-18T01:12:58
|
|
config: Fix compilation in MSVC
|
|
07ff8817
|
2011-06-18T00:39:39
|
|
config: Cleanup external API
Do not mess with environment variables anymore. The new external API has
more helper methods, and everything is explicit.
|
|
f3dad3ac
|
2011-06-16T20:06:36
|
|
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>
|
|
3de5df7d
|
2011-06-16T19:56:48
|
|
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>
|
|
3d5a02b6
|
2011-06-16T20:30:40
|
|
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>
|
|
038d2fc3
|
2011-06-16T20:24:51
|
|
Plug leaks in the repo discovery tests
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
fa48608e
|
2011-06-16T02:36:21
|
|
oid: Rename methods
Yeah. Finally. Fuck the old names, this ain't POSIX
and they don't make any sense at all.
|
|
607d1643
|
2011-06-15T17:24:04
|
|
Merge pull request #248 from carlosmn/config
Implement config writing
|
|
ef9a6f4c
|
2011-06-15T13:47:41
|
|
Merge pull request #261 from Romain-Geissler/discovery-path-v2
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
|
|
0657e46d
|
2011-06-15T12:36:08
|
|
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.
|
|
f2bb894e
|
2011-06-15T12:15:11
|
|
Merge pull request #251 from nulltoken/fix/msvc-warnings
Fix compilation warnings in MSVC
|
|
1aa1b09e
|
2011-06-15T12:11:59
|
|
Merge pull request #260 from nulltoken/fix/git_index_add
Fix git_index_add()
|
|
8e11e707
|
2011-06-15T16:06:20
|
|
git_index_add: enforce test coverage
|
|
b0233216
|
2011-06-12T11:40:14
|
|
Remove custom backends
All the custom backend code will be moved to a separate project,
together with the new MySQL backend.
|
|
a98b0d80
|
2011-06-14T14:26:08
|
|
Test replacing a value
Add a test to check that value replacement works.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
95818ff7
|
2011-06-08T22:15:49
|
|
Fix filebuf0 test which was failing on Windows
|
|
9e3aa947
|
2011-06-08T20:39:38
|
|
Fix compilation warnings in MSVC
|
|
a51201cc
|
2011-06-11T22:05:26
|
|
use proper in-memory database for sqlite3 tests
|
|
8102a961
|
2011-06-07T16:51:31
|
|
Add test for git_filebuf_open error code
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
9d77d83a
|
2011-06-07T03:38:09
|
|
Revert "threads: Fix TLS declarations"
This commit uploaded an old broken test. Oops!
|
|
2c9e7fa3
|
2011-06-06T18:24:37
|
|
Merge pull request #232 from schu/ref-available-cb
reference_rename: respect all references v2
|
|
64fe8c62
|
2011-06-07T03:22:32
|
|
threads: Fix TLS declarations
Cleanup the thread-utils file. Do not define TLS if libgit2 is not
threadsafe.
|