|
cf7dc39b
|
2011-07-24T15:58:10
|
|
repository.c: remove obsolete TODO marker
Signed-off-by: schu <schu-github@schulog.org>
|
|
f630366f
|
2011-07-22T04:24:07
|
|
readme: Add hgit2 to the list of bindings
|
|
f08a084b
|
2011-07-21T19:21:19
|
|
Merge pull request #334 from schu/typos
tag.c: fix tiny typo
|
|
1c8a4aaf
|
2011-07-21T19:20:52
|
|
Merge pull request #332 from kiryl/leaks
Fix two memory leaks pointed by valgrind
|
|
46a78f79
|
2011-07-20T11:36:05
|
|
tag.c: fix tiny typo
Signed-off-by: schu <schu-github@schulog.org>
|
|
26b1b157
|
2011-07-18T02:05:23
|
|
index: fix memory leak
We need really free vectors on index freeing, not only clear.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
5c6ae009
|
2011-07-18T01:54:40
|
|
refs: fix memory leak on rename
Current implementation of git_reference_rename() removes 'ref' from
loose cache, but not frees it. In result 'ref' is not reachable any more
and we have got memory leak.
Let's re-add 'ref' with corrected name to loose cache instead of
'new_ref' and free 'new_ref' properly.
'rollback' path seems leak too. git_reference_rename() need to be rewritten
for proper resource management.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
89fb9d04
|
2011-07-17T12:01:22
|
|
Merge pull request #327 from carlosmn/solaris
net: link necessary libraries in Solaris
|
|
e944cfa9
|
2011-07-14T17:05:22
|
|
net: link necessary libraries in Solaris
Solaris needs programs to link to socket and nsl in order to use BSD
sockets. Tell CMake to do so, this time for real.
Thanks to boyski for bearing with me through the various iterations of
this patch.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
33afca47
|
2011-07-14T06:35:36
|
|
Merge pull request #326 from nulltoken/ntk/fix/extern-tag-lightweight
tag: Make git_tag_create_lightweight() accessible to bindings
|
|
e5f36505
|
2011-07-14T15:11:31
|
|
tag: Make git_tag_create_lightweight() accessible to bindings
|
|
52e50c1a
|
2011-07-14T00:01:48
|
|
libgit2 v0.14.0, "watermelon wheat"
This a very packed minor release. The usual guilty parties have been
working harder than usual during the holidays -- thanks to everyone
involved!
As always, the updated API docs can be found at:
http://libgit2.github.com/libgit2/
NEW FEATURES:
- New OS abstraction layer. This should make all POSIX calls much
more reliable under Windows.
- Much faster writes of simple objects (commits, tags, trees) to the
ODB via in-memory buffering and direct writes, instead of streaming.
- Unified & simplified API for object creation. All the `create`
methods now take Objects instead of OIDs to ensure that corrupted
(dangling) objects cannot be created on the repository.
- Fully Git-compilant reference renaming (finally!), with
the already existing `git_reference_rename`.
- Deletion of config keys with `git_config_delete`
- Greatly improved index performance when adding new entries
- Reflog support with the `git_reflog` API
- Remotes support with the `git_remote` API
- First parts of the Networking API, including refspecs and
the transport abstraction layer. (Note that there are no actual
transports implemented yet)
- Status support with the `git_status_foreach` and `git_status_file`
functions.
- Tons of bugfixes, including the outstanding bug #127 (wrong sort
ordering when querying tree entries).
KNOWN ISSUES:
- The reference renaming code leaks memory. This is being worked on
as part of a reference handling overhaul.
- The tree-from-index builder has abysmal performance because it
doesn't handle the Treecache extension yet. This is also being
worked on.
FULL API CHANGELOG:
- removed, * modified, + added
- git_commit_create_o
- git_commit_create_ov
- git_reference_create_oid_f
- git_reference_create_symbolic_f
- git_reference_rename_f
- git_tag_create_f
- git_tag_create_fo
- git_tag_create_o
* git_commit_create
* git_commit_create_v
* git_config_foreach
* git_reference_create_oid
* git_reference_create_symbolic
* git_reference_rename
* git_tag_create
* git_tag_create_frombuffer
+ git_clearerror
+ git_config_delete
+ git_index_uniq
+ git_odb_hashfile
+ git_oid_fromstrn
+ git_reflog_entry_byindex
+ git_reflog_entry_committer
+ git_reflog_entry_msg
+ git_reflog_entry_oidnew
+ git_reflog_entry_oidold
+ git_reflog_entrycount
+ git_reflog_free
+ git_reflog_read
+ git_reflog_write
+ git_refspec_src_match
+ git_refspec_transform
+ git_remote_connect
+ git_remote_fetchspec
+ git_remote_free
+ git_remote_get
+ git_remote_ls
+ git_remote_name
+ git_remote_url
+ git_repository_head_detached
+ git_repository_head_orphan
+ git_status_file
+ git_status_foreach
+ git_tag_create_lightweight
+ git_tag_list_match
+ git_transport_new
|
|
324f0eec
|
2011-07-13T18:03:12
|
|
Merge pull request #325 from carlosmn/valgrind
More memory leaks
|
|
18bdba0e
|
2011-07-13T18:02:59
|
|
Merge pull request #324 from carlosmn/development
typo: one git_remote_fetchspec should be pushspec
|
|
1a8167af
|
2011-07-14T00:04:24
|
|
status: don't hide tree closing
It's not obvious that recurse_tree_entries or recurse_tree_entry
should free a resource that wasn't allocated by them. Do this
explicitely and plug a leak while we're at it.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
91d8a4c0
|
2011-07-09T17:29:42
|
|
typo: one git_remote_fetchspec should be pushspec
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
8dc91e31
|
2011-07-13T04:38:31
|
|
Merge pull request #323 from nulltoken/ntk/fix/treebuilder-insert
tree: fix insertion of entries with invalid filenames
|
|
f4ad64c1
|
2011-07-13T07:58:17
|
|
tree: fix insertion of entries with invalid filenames
|
|
e6629d83
|
2011-07-13T03:36:03
|
|
tree: More accurate matching on entries
The old matcher was returning fake matches when given stupid entry
names. E.g.
`git2` could be matched by `git2 /`, `git2/foobar`, git2/////`
and other stupid stuff
|
|
761aa2aa
|
2011-07-13T02:49:47
|
|
tree: Fix wrong sort order when querying entries
Fixes #127 (that was quite an outstanding issue).
Rationale:
The tree objects on Git are stored and read following a very specific
sorting algorithm that places folders before files. That original sort
was the sort we were storing on memory, but this sort was being queried
with a binary search that used a simple `strcmp` for comparison, so
there were many instances where the search was failing.
Obviously, the most straightforward way to fix this is changing the
binary search CB to use the same comparison method as the sorting CB.
The problem with this is that the binary search callback compares a path
and an entry, so there is no way to know if the given path is a folder
or a standard file.
How do we work around this? Instead of splitting the `entry_byname`
method in two (one for searching directories and one for searching
normal files), we just assume that the path we are searching for is of
the same kind as the path it's being compared at the moment.
return git_futils_cmp_path(
ksearch->filename, ksearch->filename_len, entry->attr & 040000,
entry->filename, entry->filename_len, entry->attr & 040000);
Since there cannot be a folder and a regular file with the same name on
the same tree, the most basic equality check will always fail
for all comparsions, until our path is compared with the actual entry we
are looking for; in this case, the matching will succeed with the file
type of the entry -- whatever it was initially.
I hope that makes sense.
PS: While I was at it, I switched the cmp methods to use cached values
for the length of each filename. That makes searches and sorts
retardedly fast -- I was wondering the reason of the performance hiccups
on massive trees; it's because of 2*strlen for each comparsion call.
|
|
3dd26d1e
|
2011-07-13T02:15:31
|
|
index: Yes, we have to truncate
|
|
b16692fa
|
2011-07-12T20:29:12
|
|
index: fix potential overflow
mode field of git_index_entry_unmerged is array of unsigned ints. It's
unsafe to cast pointer to an element of the array to long int *. It may
cause overflow in git_strtol32().
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
ae9f771c
|
2011-07-12T19:53:51
|
|
index: drop useless type casting
Type casting usually points to some trick or bug. It's better not hide
it between useless type castings.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
e1fca014
|
2011-07-12T19:33:30
|
|
vector: mark internal functions as static
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
046dfea3
|
2011-07-12T19:01:09
|
|
vector: avoid double asserting
index_initialize() calls assert() for arguments on its own. No need to
call it twice.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
fad6607a
|
2011-07-12T18:56:40
|
|
index: drop sort_index()
Remove dummy wrapper around git_vector_sort().
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
07d34877
|
2011-07-12T18:37:27
|
|
index: do not sort index before git_vector_bsearch2()
git_vector_bsearch2() calls git_vector_sort(). No need to call it
directly.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
212b379a
|
2011-07-12T18:30:34
|
|
index: do not free vectors twice in git_index_free()
git_index_clear() frees index->entries and index->unmerged. No need to
free it once again.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
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
|
|
467545d0
|
2011-07-12T11:26:25
|
|
Merge pull request #321 from letolabs/readme
Add parrot-libgit2 to the list of language bindings in the readme
|
|
dd498274
|
2011-07-12T11:23:12
|
|
Merge pull request #319 from carlosmn/valgrind
Fix more memory leaks
|
|
5903aa2b
|
2011-07-12T11:22:11
|
|
Merge pull request #318 from schu/ref-fix-leak
reference_rename: make sure old_name gets freed
|
|
d2b96cf4
|
2011-07-12T11:19:42
|
|
Add parrot-libgit2 to the list of language bindings in the readme
|
|
75c2002f
|
2011-07-12T18:08:46
|
|
status: plug some leaks
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
55e1609b
|
2011-07-12T18:10:31
|
|
Don't leak the buf when testing it
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
ca6f203c
|
2011-07-12T17:53:22
|
|
reference_rename: make sure old_name gets freed
Signed-off-by: schu <schu-github@schulog.org>
|
|
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`?
|
|
9b6fccc9
|
2011-07-11T04:19:46
|
|
Merge pull request #315 from belkiss/development
Finish to hide git_pkt from external API.
|
|
f6e4a98a
|
2011-07-11T13:04:36
|
|
Finish to hide git_pkt from external API.
|
|
283eeefb
|
2011-07-10T18:02:33
|
|
Merge pull request #314 from nulltoken/ntk/fix-reflog
reflog: Fix reflog writer/reader
|
|
5f35d0ce
|
2011-07-09T14:53:00
|
|
Remove the last reference of git_net_direction enum
|
|
bdd18829
|
2011-07-11T02:58:00
|
|
Cleanup external API
Some of the WIP API calls have been hidden in preparation for the next
minor release.
|
|
f27f29b1
|
2011-07-09T15:13:32
|
|
include: Fix unmatched params in documentation
|
|
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
|
|
d37ba672
|
2011-07-09T06:45:30
|
|
Merge pull request #312 from nulltoken/patch-2
Fix MSVC compilation warning
|
|
b21fb849
|
2011-07-09T06:36:18
|
|
Fix MSVC compilation warning
|
|
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
|
|
c2db984b
|
2011-07-09T13:27:08
|
|
tsort: Remove unused CLZ methods
|
|
0448310f
|
2011-07-09T04:24:23
|
|
Merge pull request #311 from nulltoken/ntk/fix-win32-specs
Ntk/fix win32 specs
|
|
ae2e4c6a
|
2011-07-09T08:41:02
|
|
win32: replace usage of _MSV_VER with _MSC_VER
|
|
38ce60f0
|
2011-07-09T08:36:37
|
|
Fix MSVC compilation warning
|
|
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.
|
|
2fc78e70
|
2011-07-08T23:01:37
|
|
posix: Portable `vsnprintf`
Our good, lovely folks at Microsoft decided that there was no good
reason to make `vsnprintf` compilant with the C standard, so that
function in Windows returns -1 on overflow, instead of returning the
actual byte count needed to write the full string.
We now handle this situation more gracefully with the POSIX
compatibility layer, by returning the needed byte size using an
auxiliary method instead of blindly resizing the target buffer until it
fits.
This means we can now support `printf`s of any size by allocating a
temporary buffer. That's good.
|
|
d483a911
|
2011-07-08T18:31:05
|
|
signature: Fix optional header
|
|
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>
|
|
6727e300
|
2011-06-19T23:06:53
|
|
git_signature__write: make header optionally
Signed-off-by: schu <schu-github@schulog.org>
|
|
f0ab9fda
|
2011-07-08T18:22:44
|
|
index: Return `GIT_ENOTFOUND` when an entry cannot be opened
|
|
d102bbba
|
2011-07-08T09:21:30
|
|
Merge pull request #309 from schu/rr-flaw
reference_rename: fix flaw in force-renaming
|
|
44b75a13
|
2011-07-08T09:21:13
|
|
Merge pull request #308 from schu/unused-but-set-var
tsort: remove unused but set variable
|
|
73294339
|
2011-07-07T21:24:12
|
|
reference_rename: fix flaw in force-renaming
reference_rename didn't respect the force flag. Fixed.
Reported-by: nulltoken <emeric.fermas@gmail.com>
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>
|
|
d4cb0ee8
|
2011-07-07T18:14:53
|
|
tsort: remove unused but set variable
Signed-off-by: schu <schu-github@schulog.org>
|
|
da5b1e1c
|
2011-07-07T17:56:10
|
|
index: Fix memory leak on OOM
|
|
2b5af615
|
2011-07-07T13:47:45
|
|
tag: add pattern based retrieval of list of tag names
|
|
417a581d
|
2011-07-07T13:38:47
|
|
tsort: fix wrong header inclusion
|
|
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
|
|
dbede305
|
2011-07-06T16:58:06
|
|
Merge pull request #306 from carlosmn/development
Fix network MSYS compilation
|
|
1af935a3
|
2011-07-06T12:29:22
|
|
Merge pull request #307 from nulltoken/patch-1
Fix MSVC compilation warnings
|
|
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
|
|
c68dee2a
|
2011-07-06T19:46:41
|
|
revwalk: Properly mark uninteresting commits
|
|
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.
|
|
b8e2db5f
|
2011-07-06T06:54:11
|
|
Merge pull request #303 from schu/ref-rename
reference_rename: git compliant reference renaming v2
|
|
39cdf272
|
2011-07-06T09:11:03
|
|
Fix network MSYS compilation
MSYS/MinGW uses winsock but obviously doesn't set _MSC_VER. Use _WIN32
to decide whether to use winsock or BSD headers. Also remove these
headers from src/transport_git.c altogether, as they are not needed.
MSYS is very conservative, so we have to tell it that we don't care
about versions of Windows lower than WindowsXP. We also need to tell
CMake to add ws2_32 to the libraries list and we shouldn't add the
-fPIC option, to MSYS because it complains that it does it anyway.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
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>
|
|
42b3a460
|
2011-06-09T19:51:33
|
|
fileops: add git_futils_rmdir_recurs()
git_futils_rmdir_recurs() shall remove the given directory and all
subdirectories. This happens only if the directories are empty.
Signed-off-by: schu <schu-github@schulog.org>
|
|
e190da78
|
2011-06-09T18:11:11
|
|
fileops: add convenience function is_dot_or_dotdot()
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>
|
|
e1bf24c8
|
2011-07-06T02:14:30
|
|
build: Add simple Makefile for embedding the library
Run `make -f Makefile.embed` to get a `libgit2.a` with no dependencies
and no configuration on any Unix-like system.
The generated library can be linked with any piece of software without
licensing issues.
Have fun.
|
|
1e3300d8
|
2011-07-06T01:44:15
|
|
fnmatch: Fix compilation under Windows
|
|
e9c6571d
|
2011-07-06T01:04:04
|
|
fnmatch: Use native on Unix, emulate on Win32
|