- 14 Jul, 2011 1 commit
-
-
typo: one git_remote_fetchspec should be pushspec
Vicent Martí committed
-
- 13 Jul, 2011 13 commits
-
-
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto committed -
tree: fix insertion of entries with invalid filenames
Vicent Martí committed -
nulltoken committed
-
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
Vicent Marti committed -
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.
Vicent Marti committed -
Vicent Marti committed
-
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>
Kirill A. Shutemov committed -
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>
Kirill A. Shutemov committed -
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov committed -
index_initialize() calls assert() for arguments on its own. No need to call it twice. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov committed -
Remove dummy wrapper around git_vector_sort(). Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov committed -
git_vector_bsearch2() calls git_vector_sort(). No need to call it directly. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov committed -
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>
Kirill A. Shutemov committed
-
- 12 Jul, 2011 9 commits
-
-
nulltoken committed
-
Add parrot-libgit2 to the list of language bindings in the readme
Vicent Martí committed -
Fix more memory leaks
Vicent Martí committed -
reference_rename: make sure old_name gets freed
Vicent Martí committed -
Jonathan "Duke" Leto committed
-
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Vicent Marti committed
-
- 11 Jul, 2011 8 commits
-
-
nulltoken committed
-
Vicent Marti committed
-
Finish to hide git_pkt from external API.
Vicent Martí committed -
Lambert CLARA committed
-
reflog: Fix reflog writer/reader
Vicent Martí committed -
Lambert CLARA committed
-
Some of the WIP API calls have been hidden in preparation for the next minor release.
Vicent Marti committed -
Vicent Marti committed
-
- 10 Jul, 2011 1 commit
-
-
- 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
nulltoken committed
-
- 09 Jul, 2011 8 commits
-
-
Fix MSVC compilation warning
Vicent Martí committed -
nulltoken committed
-
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.
Vicent Marti committed -
Throws GIT_ENOTFOUND error if given a filename that is not in HEAD, index, nor the work tree.
Jason Penny committed -
Refactored copy of test repo to a function.
Jason Penny committed -
Jason Penny committed
-
Jason Penny committed
-
Add git_status_file to be able to retrieve status of single file by supplying a path.
Jason Penny committed
-