|
9ac581bf
|
2011-10-01T19:56:04
|
|
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>
|
|
107e30e9
|
2011-09-30T16:25:03
|
|
core: One last `long long`
|
|
fafd4710
|
2011-09-30T16:08:06
|
|
config: Proper type declarations for 64 bit ints
|
|
40fe5fbe
|
2011-09-22T22:50:36
|
|
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>
|
|
59116392
|
2011-09-27T05:35:34
|
|
Merge pull request #427 from schu/fix-unused-parameters
t18-status.c: fix unused warnings
|
|
01d7fded
|
2011-09-22T20:44:30
|
|
Revert "Rewrite getenv to use Win32 version on Windows"
This reverts commit e1b86444676b70154bf8ab450d429bdef57a8276.
|
|
ddeaa7fb
|
2011-09-24T13:41:10
|
|
t18-status.c: fix unused warnings
Signed-off-by: schu <schu-github@schulog.org>
|
|
ad196c6a
|
2011-09-21T23:17:39
|
|
config: make git_config_[get|set]_long() able to properly deal with 8 bytes wide values
Should fix issue #419.
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
|
|
e1b86444
|
2011-09-21T11:17:30
|
|
Rewrite getenv to use Win32 version on Windows
|
|
b4ec3c64
|
2011-09-19T22:19:59
|
|
refs: add additional test for reference renaming
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
Signed-off-by: schu <schu-github@schulog.org>
|
|
c498701d
|
2011-09-19T10:38:44
|
|
Fix tests to use portable setenv
|
|
71a4c1f1
|
2011-09-18T20:07:59
|
|
Merge pull request #384 from kiryl/warnings
Add more -W flags to CFLAGS
|
|
6640266e
|
2011-09-18T19:58:22
|
|
Merge pull request #398 from carlosmn/config-autohome
git_repository_config: open global config file automatically
|
|
afdf8dcb
|
2011-09-17T16:28:18
|
|
Add some forgotten asserts in the status tests
|
|
8320001d
|
2011-09-17T16:07:28
|
|
Fix a off-by-one error in the git_status_foreach tests
Provided the tests fail (which they should not) and the callback is invoked too many times, this prevents the tests from segfaulting.
|
|
bcba8460
|
2011-09-16T05:44:21
|
|
Revert changes to t18
...Ops, I broke the old test when porting it to Clay.
|
|
11385c3c
|
2011-09-16T05:12:56
|
|
Add sample "Status" clay tests
|
|
d8b903da
|
2011-09-11T18:46:08
|
|
status: enhance determination of statuses for a whole directory
- Should increase performance through usage of a walker
- No callback invocation for unaltered entries
|
|
56453d34
|
2011-09-02T13:44:42
|
|
status: enhance determination of status for a single file
- fix retrieval of a file status when working against a newly initialized repository
- reduce memory pressure
- prevents a directory from being tested
|
|
a9daa9bc
|
2011-09-02T10:07:42
|
|
Mark the resources in the test folder as binary to prevent unexpected line-feed conversion
|
|
f9d4b0c3
|
2011-09-12T17:25:46
|
|
git_repository_config: open global config file automatically
If the global configuration file is missing, it is ignored.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
d568d585
|
2011-08-30T23:55:22
|
|
CMakefile: add -Wmissing-prototypes and fix warnings
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
51d00446
|
2011-08-30T23:33:59
|
|
CMakefile: add -Wstrict-prototypes and fix warnings
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
932669b8
|
2011-08-25T14:22:57
|
|
Drop STRLEN() macros
There is no need in STRLEN macros. Compilers can do this trivial
optimization on its own.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
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
|