Log

Author Commit Date CI Message
Russell Belfer e4eb94a2 2012-01-31T14:02:52 Fix issue with ignoring whole directories Now that is_dir is calculated correctly for attr/ignore paths, it is possible to use it so that ignoring "dir/" will properly match the directory name and ignore the entire directory.
Russell Belfer adc9bdb3 2012-01-31T13:59:32 Fix attr path is_dir check When building an attr path object, the code that checks if the file is a directory was evaluating the file as a relative path to the current working directory, instead of using the repo root. This lead to inconsistent behavior.
Russell Belfer 5d3cd4e3 2012-01-31T13:09:39 Convert status assert to skip file When status encounters a submodule, right now it is asserting. This changes it to just skip the file that it can't deal with.
Carlos Martín Nieto 279afd2a 2012-01-31T17:21:49 refspec: a ref name includes the refs/ prefix git_refspec_transform_r assumed that the reference name passed would be only a branch or tag name. This is not the case, and we need to take into consideration what's in the refspec's source to know how much of the prefix to ignore.
Vicent Martí f25cc58d 2012-01-27T18:29:03 clar: Remove pregenerated files Those were re-added on the move. Ops!
Vicent Martí e4b4da14 2012-01-27T18:28:02 cache: Simplify locking mechanics The object cache is mostly IO-bound, so it makes no sense to have a lock per node.
Vicent Martí 7a6f51de 2012-01-26T18:03:14 win32: Use the Windows Atomic API on MinGW too
Vicent Martí a53420e4 2012-01-26T17:53:46 msvc: Move `ssize_t` typedef to MSVC-only This is a MSVC-only issue. All other compilers we support work properly.
Vicent Martí 99a07f0f 2012-01-25T16:45:46 Merge pull request #541 from nulltoken/topic/repo-reinit Repository re-initialization
nulltoken 5663e61a 2012-01-25T16:44:21 repository: add minimal reinitialization of repository This currently only ensures that the version of the repository format isn't greater than zero.
nulltoken 9b84447a 2012-01-25T12:35:25 clay: migrate a test initializing a repository which path escapes the current working directory A non migrated yet test has been removed as well as it's mostly redundant.
Vicent Martí 911ff94e 2012-01-25T13:58:40 Merge pull request #540 from libgit2/clay-rename Rename the Clay test suite to Clar
Vicent Martí 32dc20b5 2012-01-25T13:57:31 gitignore: Add `clar` data
Vicent Martí 3fd1520c 2012-01-24T20:35:15 Rename the Clay test suite to Clar Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!
Carlos Martín Nieto a9fe8ae0 2012-01-23T22:14:04 config: don't use 'section "subsection"' internal form on config_set This had been left over from a time when I believed what the git documentation had to say about case-sensitivity. The rest of the code doesn't recognize this form and we hadn't noticed because most tests don't try to get a recently-set variable but free and reload the configuration, causing the right format to be used.
nulltoken 19313a76 2012-01-23T21:27:29 remote: add test which creates a basic remote entry in the repository configuration then loads the remote
Russell Belfer 63ab73be 2012-01-20T11:13:17 Merge branch 'fix-subdir-attr-paths' into development This resolves issue #535 and issue #533.
Carlos Martín Nieto 9269ccce 2012-01-19T23:44:52 diff-index: fix leak The buffer wasn't getting freed if the last difference was a deletion.
Carlos Martín Nieto 860de004 2012-01-19T23:26:20 http: use PRIuZ MSVC doesn't think %zd is a valid specifier.
Vicent Martí 881e3da0 2012-01-19T11:38:09 Merge pull request #538 from carlosmn/ref-noleak Don't leak when deleting or removing refs
Carlos Martín Nieto 20c50b9e 2012-01-19T19:09:47 refs: don't leak the packref when deleting/renaming When we remove the ref from the hashtable, we need to free the packref.
Carlos Martín Nieto 3f2bf4d6 2012-01-19T19:06:15 hashtable: add remove2 to retrieve the value that was removed
Carlos Martín Nieto d0ec3fb8 2012-01-19T17:07:49 indexer: save the pack index with the right name Truncate at the slash; otherwise we get ppack-*.idx filenames.
Carlos Martín Nieto 585a2eb7 2012-01-19T17:05:16 remote: don't try to free the ref on error On error, the pointer could be pointing anywhere.
Vicent Martí 43c6dd6f 2012-01-18T15:29:51 Merge pull request #537 from nulltoken/fix/download-segfault Fix download segfault
nulltoken c3ec2ec2 2012-01-19T00:09:47 transport: prevent git_remote_download() from segfaulting when being passed a lightweight remote built with git_remote_new()
Russell Belfer 1744fafe 2012-01-17T15:49:47 Move path related functions from fileops to path This takes all of the functions that look up simple data about paths (such as `git_futils_isdir`) and moves them over to path.h (becoming `git_path_isdir`). This leaves fileops.h just with functions that actually manipulate the filesystem or look at the file contents in some way. As part of this, the dir.h header which is really just for win32 support was moved into win32 (with some minor changes).
Vicent Martí d1317f1b 2012-01-17T11:01:04 Merge pull request #536 from nulltoken/fix/transport-segfault Fix transport segfault
nulltoken 0b44c065 2012-01-17T14:35:04 repository: add the invalid repository path to the error message
nulltoken 86360ffd 2012-01-17T14:33:26 transport: prevent the transport determination mechanism from segfaulting when being passed an url starting with an unknown prefix
nulltoken fdc8a7db 2012-01-17T14:06:35 Fix MSVC compilation warning
Russell Belfer 83bfbdf5 2012-01-16T18:00:18 Remove poor git__removechar function Going back over this, the git__removechar function was not needed (only invoked once) and is actually mislabeled. As implemented, it really only made sense for removing backslash characters, since two of the "removed" characters in a row would include the second one -- i.e. it really implements stripping backslash-escaped strings where a backslash allows internal whitespace in a word.
Russell Belfer a51cd8e6 2012-01-16T16:58:27 Fix handling of relative paths for attrs Per issue #533, the handling of relative paths in attribute and ignore files was not right. Fixed this by pre-joining the relative path of the attribute/ignore file onto the match string when a full path match is required. Unfortunately, fixing this required a bit more code than I would have liked because I had to juggle things around so that the fnmatch parser would have sufficient information to prepend the relative path when it was needed.
Russell Belfer 6e03b12f 2012-01-16T15:34:35 Merge pull request #531 from arrbee/gitignore Initial implementation of gitignore support git_status_foreach() and git_status_file() will now be gitignore aware.
Russell Belfer cfbc880d 2012-01-16T15:16:44 Patch cleanup for merge After reviewing the gitignore support with Vicent, we came up with a list of minor cleanups to prepare for merge, including: * checking git_repository_config error returns * renaming git_ignore_is_ignored and moving to status.h * fixing next_line skipping to include \r skips * commenting on where ignores are and are not included
Carlos Martín Nieto d9e5430e 2012-01-16T11:45:34 Windows: store all 64 bits of the size in the stat structure We force stat to be a stat64 structure, so we can and should put all 64 bits of the size in st_size.
Vicent Martí 1af56d7d 2012-01-15T15:48:36 Fix #534: 64-bit issues in Windows off_t is always 32 bits in Windows, which is beyond stupid, but we just don't care anymore because we're using `git_off_t` which is assured to be 64 bits on all platforms, regardless of compilation mode. Just ensure that no casts to `off_t` are performed. Also, the check for `off_t` overflows has been dropped, once again, because the size of our offsets is always 64 bits on all platforms. Fixes #534
Carlos Martín Nieto c1c399cf 2012-01-13T19:33:54 config: handle EOF properly In the main loop we peek to see what kind of line the next one is. If there are multiple newlines before the end of the file, the eof marker won't be set after we read the last line with data and we'll try to peek again. This peek will return LF (as it pretends that we have a newline at EOF so other function don't need any special handling). Fix cfg_getchar so it doesn't try to read past the last character in the file and config_parse so it considers LF as EOF on peek (as we're ignoring spaces) and sets the reader's EOF flag to exit the parsing loop.
Carlos Martín Nieto 2866c016 2012-01-13T18:20:13 examples: use git_repository_odb instead of _database
Russell Belfer 1dbcc9fc 2012-01-11T21:07:16 Fix several memory issues This contains fixes for several issues discovered by MSVC and by valgrind, including some bad data access, some memory leakage (in where certain files were not being successfully added to the cache), and some code simplification.
Russell Belfer 0cfcff5d 2012-01-11T20:41:55 Convert git_path_walk_up to regular function This gets rid of the crazy macro version of git_path_walk_up and makes it into a normal function that takes a callback parameter. This turned out not to be too messy.
Russell Belfer 15debaf5 2012-01-11T17:28:25 Fix bug in dir_for_path The last checkin accidentally broke dir_for_path by propogating the dirname return code even when there was no error.
Russell Belfer 6a67a812 2012-01-11T16:01:48 Allow ignores (and attribs) for nonexistent files This fixes issue 532 that attributes (and gitignores) could not be checked for files that don't exist. It should be possible to query such things regardless of the existence of the file.
Russell Belfer fdaa9240 2012-01-11T15:25:13 Fix up status tests
Russell Belfer df743c7d 2012-01-09T15:37:19 Initial implementation of gitignore support Adds support for .gitignore files to git_status_foreach() and git_status_file(). This includes refactoring the gitattributes code to share logic where possible. The GIT_STATUS_IGNORED flag will now be passed in for files that are ignored (provided they are not already in the index or the head of repo).
Russell Belfer 7e443f69 2012-01-09T15:46:06 Restore portability to git_path_prettify. It turns out that passing NULL for the second parameter of realpath(3) is not as portable as one might like. Notably, Mac OS 10.5 and earlier does not support it. So this moves us back to a large buffer to get the realpath info.
Vicent Martí 1d175074 2012-01-05T17:46:06 Merge pull request #528 from arrbee/valgrind-fixes-2 Valgrind fixes in smaller pieces
Carlos Martín Nieto 91d46f8d 2012-01-06T01:13:08 clay tests: free resources Trees, indices and repos need to be freed
Russell Belfer fa3cb0da 2012-01-05T15:15:43 Fix memory leak in git_index_remove. Missed freeing the entry.
Russell Belfer 2d840502 2012-01-05T15:03:42 Throw first error in chain, not rethrow. This is the first time this error is throw, so use git__throw instead of git__rethrow.
Russell Belfer 948431aa 2012-01-05T15:00:46 Remove repo open immediately after init in test Calling git_repository_open immediately after git_repository_init results in memory leaks.
Jeff King 671bbdd3 2012-01-05T17:31:13 reflog_write: don't access free()'d memory We get the oid of a reference, free the reference, then convert the oid to a string. We need to convert the oid before freeing the memory.
Vicent Martí f2114d0a 2012-01-04T22:40:59 Merge remote-tracking branch 'nulltoken/topix/path_fromurl' into development Conflicts: tests-clay/clay.h tests-clay/clay_main.c
Vicent Martí b0df89d9 2012-01-04T12:34:59 Merge pull request #526 from nulltoken/fix/attr Fix some "attributes" related issues
nulltoken f46e6226 2012-01-04T21:15:12 Fix Windows specific off-by-one error The value returned by MultiByteToWideChar includes the NULL termination character.
nulltoken acb159e1 2012-01-04T17:59:48 Fix MSVC compilation warnings
Russell Belfer 7d93f96a 2012-01-03T07:28:38 Merge pull request #525 from euler0/add-missing-semicolon Add missing semicolon
Vincent Lee c6a437ea 2012-01-03T19:44:13 Add missing semicolon
Vicent Martí 1d415455 2012-01-02T10:06:24 clay: Move `file_create` to the helpers file
Vicent Martí 7a704309 2012-01-02T09:58:39 Merge remote-tracking branch 'drizzd/diff-index-tests' into development Conflicts: tests-clay/clay.h tests-clay/clay_main.c
Vicent Martí 9191a6d2 2012-01-02T09:56:48 Merge remote-tracking branch 'arrbee/git-attributes' into development Conflicts: tests-clay/clay_main.c
Vicent Martí 9dd4c3e8 2011-12-31T05:56:39 config: Rename the `delete` callback name `delete` is a reserved keyword in C++.
Russell Belfer bd370b14 2011-12-30T15:00:14 Improved gitattributes macro implementation This updates to implementation of gitattribute macros to be much more similar to core git (albeit not 100%) and to handle expansion of macros within macros, etc. It also cleans up the refcounting usage with macros to be much cleaner. Also, this adds a new vector function `git_vector_insert_sorted()` which allows you to maintain a sorted list as you go. In order to write that function, this changes the function `git__bsearch()` to take a somewhat different set of parameters, although the core functionality is still the same.
Clemens Buchacher 0fb3fba1 2011-12-29T10:37:28 add diff-index tests
Clemens Buchacher 1f783edf 2011-12-29T15:03:38 do not use full path in diff-index Currently, diff_index passes the full relative path from the repository root to the callback. In case of an addition, it passes the tree entry instead of the index entry. This change fixes the path used for addition, and it passes only the basename of the path. This mimics the current behavior of git_tree_diff.
Clemens Buchacher ee3f96d4 2011-12-29T15:06:36 clay: reset expect_idx in diff_more test For the diff-index tests, the diff_more test will run multiple times. Reset the expect_idx counter after each test in order to allow this.
Clemens Buchacher e4592538 2011-12-29T13:12:51 allow opening index in bare repo The git.git implementation allows this, and there is no reason not to.
Clemens Buchacher 599f2849 2011-12-26T18:37:31 add git_index_read_tree
Clemens Buchacher a26a1563 2011-12-30T19:03:55 move entry_is_tree to tree.h
Russell Belfer c6d2a2c0 2011-12-29T21:31:30 Fixed up memory leaks
Clemens Buchacher e632f687 2011-12-29T13:04:17 cmake: generate tags
Clemens Buchacher 86a459a8 2011-12-29T12:16:01 cmake: generate clay main The clay test suite files clay.h and clay_main.c are generated by the clay python script. Teach CMake about this dependency and remove the generated files from the repository.
Russell Belfer 73b51450 2011-12-28T23:28:50 Add support for macros and cache flush API. Add support for git attribute macro definitions. Also, add support for cache flush API to clear the attribute file content cache when needed. Additionally, improved the handling of global and system files, making common utility functions in fileops and converting config and attr to both use the common functions. Adds a bunch more tests and fixed some memory leaks. Note that adding macros required me to use refcounted attribute assignment definitions, which complicated, but probably improved memory usage.
nulltoken e2580375 2011-12-28T11:36:18 transport: make local transport accept a file Uri containing percent-encoded characters This makes libgit2 compliant with the following scenario $ git ls-remote file:///d:/temp/dwm%20tinou 732d790b702db4b8985f5104fc44642654f6a6b6 HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/heads/master 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/master $ mv "/d/temp/dwm tinou" /d/temp/dwm+tinou $ git ls-remote file:///d:/temp/dwm%20tinou fatal: 'd:/temp/dwm tinou' does not appear to be a git repository fatal: The remote end hung up unexpectedly $ git ls-remote file:///d:/temp/dwm+tinou 732d790b702db4b8985f5104fc44642654f6a6b6 HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/heads/master 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/master
nulltoken 2017a15d 2011-12-27T16:03:28 path: add git_path_fromurl()
nulltoken 459e2dcd 2011-12-27T11:18:57 path: add git__percent_decode()
nulltoken eb8de747 2011-12-28T20:24:58 util: add git__fromhex()
Vicent Martí 06fcf057 2011-12-27T06:32:11 Merge pull request #520 from antono/patch-1 Added link to vala bindings
Antono Vasiljev 27f69e48 2011-12-27T17:10:12 Added link to vala bindings
Vicent Martí 9aeef392 2011-12-26T23:01:06 Merge pull request #519 from ingydotnet/development Add Perl to the list of bindings.
Ingy döt Net 20626db1 2011-12-26T21:58:17 Add Perl to the list of bindings.
Vicent Martí d16e4b2b 2011-12-25T00:25:04 remotes: Remove unused variables
Vicent Martí fa515656 2011-12-25T00:22:20 refs: Fix double free Includes relevant Clay test
Vicent Martí 1b8cbe8b 2011-12-22T13:29:03 Merge pull request #517 from nulltoken/fix/local-remote-ls Small enhancements to remote-ls when working against local repositories
nulltoken db1f7e59 2011-12-21T16:36:34 remote: add test to retrieve the advertised references from a local repository and fix related implementation
Russell Belfer ee1f0b1a 2011-12-16T10:56:43 Add APIs for git attributes This adds APIs for querying git attributes. In addition to the new API in include/git2/attr.h, most of the action is in src/attr_file.[hc] which contains utilities for dealing with a single attributes file, and src/attr.[hc] which contains the implementation of the APIs that merge all applicable attributes files.
Vicent Martí 1bdba338 2011-12-20T16:27:25 Merge pull request #514 from schu/fix-warning-uninitialized config_file: honor error
schu e95849c1 2011-12-16T11:39:21 config_file: honor error Return an error if we can't write an updated version of the config file after config_delete. Along with that, fix an uninitialized warning. Signed-off-by: schu <schu-github@schulog.org>
Russell Belfer be00b00d 2011-12-18T12:21:18 Add unit test for proper init of index entries
Russell Belfer 86e356ee 2011-12-18T12:08:50 Restore missing lstat in index_entry_init In an effort to remove duplicate code, I accidentally left the stat structure uninitialized in this function. This patch restores that data gathering.
Vicent Martí 3e72809b 2011-12-16T01:06:01 Merge pull request #513 from carlosmn/development Really delete variables
Carlos Martín Nieto 80a665aa 2011-12-16T02:28:39 config: really delete variables Instead of just setting the value to NULL, which gives unwanted results when asking for that variable after deleting it, delete the variable from the list and re-write the file.
Carlos Martín Nieto 7b2b4adf 2011-12-16T01:39:28 Revert "config: Return ENOTFOUND when a variable was deleted" This would make us think that config variables like [core] something is missing.
Vicent Marti 2ea14da6 2011-12-15T18:14:41 config: Return ENOTFOUND when a variable was deleted
Vicent Marti bc57b80b 2011-12-15T02:08:03 Update to Clay 0.10.0 Comes with support for global events; this fixes #496.
Russell Belfer b5daae68 2011-12-14T12:34:43 Allow git_buf_joinpath to accept self-joins It was not safe for git_buf_joinpath to be used with a pointer into the buf itself because a reallocation could invalidate the input parameter that pointed into the buffer. This patch makes it safe to self join, at least for the leading input to the join, which is the common "append" case for self joins. Also added unit tests to explicitly cover this case. This should actually fix #511
Russell Belfer d6cceddd 2011-12-14T10:52:28 Check error on path manipulations. This commit fixes #511.
Vicent Martí 52d552e9 2011-12-14T13:55:41 Merge pull request #510 from nulltoken/topic/commit-oid-generation commit: add test to ensure predictability of generation of commit, tree and blob object ids
Paul Betts dcb7447c 2011-12-14T11:15:19 Merge pull request #512 from nulltoken/fix/mktemp-segfault Prevent segfaulting on Windows when building a temporary filename
nulltoken 489c3666 2011-12-14T20:00:34 posix_w32: prevent segfaulting on Windows when building a temporary filename