Log

Author Commit Date CI Message
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.
Russell Belfer c6d2a2c0 2011-12-29T21:31:30 Fixed up memory leaks
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.
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.
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
nulltoken 8fae76c5 2011-12-14T09:38:05 commit: add test to ensure predictability of generation of commit, tree and blob object ids
Vicent Marti 16a9f32a 2011-12-14T03:32:49 Merge remote-tracking branch 'nulltoken/topic/oid-generation' into development Conflicts: tests-clay/clay.h tests-clay/clay_main.c
Vicent Marti bf6d2717 2011-12-14T03:27:53 buffer: inline `git_buf_cstr`
Vicent Marti 7af26f8f 2011-12-14T03:24:16 Fix tree-diff with the new path API
Vicent Marti 40e73d6f 2011-12-09T01:38:46 Merge remote-tracking branch 'arrbee/git-buf-for-paths' into development Conflicts: tests-clay/clay_main.c
Russell Belfer 97769280 2011-11-30T11:27:15 Use git_buf for path storage instead of stack-based buffers This converts virtually all of the places that allocate GIT_PATH_MAX buffers on the stack for manipulating paths to use git_buf objects instead. The patch is pretty careful not to touch the public API for libgit2, so there are a few places that still use GIT_PATH_MAX. This extends and changes some details of the git_buf implementation to add a couple of extra functions and to make error handling easier. This includes serious alterations to all the path.c functions, and several of the fileops.c ones, too. Also, there are a number of new functions that parallel existing ones except that use a git_buf instead of a stack-based buffer (such as git_config_find_global_r that exists alongsize git_config_find_global). This also modifies the win32 version of p_realpath to allocate whatever buffer size is needed to accommodate the realpath instead of hardcoding a GIT_PATH_MAX limit, but that change needs to be tested still.
nulltoken a7954d2a 2011-12-04T17:55:35 tree: add test to ensure predictability of generation of object ids
Vicent Marti e9238687 2011-12-03T18:05:44 tree: recursive diff-index Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk> Signed-off-by: Vicent Marti <tanoku@gmail.com> # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Carlos Martín Nieto <carlos@cmartin.tk> # # On branch development # Your branch is ahead of 'origin/development' by 11 commits. # # Changes to be committed: # (use "git reset HEAD^1 <file>..." to unstage) # # modified: include/git2/tree.h # modified: src/tree.c # modified: tests-clay/clay_main.c # modified: tests-clay/object/tree/diff.c # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # 0001-remote-Cleanup-the-remotes-code.patch # 466.patch # 466.patch.1 # 488.patch # Makefile # libgit2.0.15.0.dylib # libgit2.0.dylib # libgit2.dylib # libgit2_clay # libgit2_test # tests-clay/object/tree/
Carlos Martín Nieto b4d757c0 2011-10-26T15:19:49 clay: add tests for tree diff'ing Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk> Signed-off-by: Vicent Marti <tanoku@gmail.com>
Carlos Martín Nieto a1fdea28 2011-10-24T16:48:12 tree: implement tree diffing For each difference in the trees, the callback gets called with the relevant information so the user can fill in their own data structures. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Martí a22b14d3 2011-11-30T23:04:23 Merge pull request #506 from nulltoken/fix/warnings Fix compilation warnings
nulltoken 8e80decf 2011-12-01T07:48:20 Fix compilation warnings
Vicent Martí 8a4e3181 2011-11-30T13:33:30 Merge pull request #504 from arrbee/git-buf-fast-join Optimized implementation of git_buf_join
Russell Belfer 969d588d 2011-11-30T13:10:47 Optimized of git_buf_join. This streamlines git_buf_join and removes the join-append behavior, opting instead for a very compact join-replace of the git_buf contents. The unit tests had to be updated to remove the join-append tests and have a bunch more exhaustive tests added.
Vicent Martí f5f04826 2011-11-30T11:02:34 Merge pull request #503 from arrbee/git-buf-always-cstr Make git_buf functions always maintain a valid cstr
Russell Belfer 309113c9 2011-11-29T23:45:17 Make initial value of git_buf ptr always be a valid empty string. Taking a page from core git's strbuf, this introduces git_buf_initbuf which is an empty string that is used to initialize the git_buf ptr value even for new buffers. Now the git_buf ptr will always point to a valid NUL-terminated string. This change required jumping through a few hoops for git_buf_grow and git_buf_free to distinguish between a actual allocated buffer and the global initial value. Also, this moves the allocation related functions to be next to each other near the top of buffer.c.
Russell Belfer 7df41387 2011-11-29T21:44:54 Adding unit tests for git_buf_copy_cstr
Russell Belfer c63728cd 2011-11-29T16:39:49 Make git_buf functions always maintain a valid cstr. At a tiny cost of 1 extra byte per allocation, this makes git_buf_cstr into basically a noop, which simplifies error checking when trying to convert things to use dynamic allocation. This patch also adds a new function (git_buf_copy_cstr) for copying the cstr data directly into an external buffer.
Vicent Martí fc88a8d3 2011-11-29T02:37:39 Merge pull request #500 from schu/minor-fixups Minor fixups
Vicent Marti 8e46168c 2011-11-29T11:36:18 clay: Add buffer tests
schu 91a9a070 2011-11-29T11:03:06 tests-clay: mix the tests Actually add the tests introduced with 8c74d22. Signed-off-by: schu <schu-github@schulog.org>
schu fe9a0e09 2011-11-29T11:02:42 transports: fix -Wunused-but-set-variable warning Signed-off-by: schu <schu-github@schulog.org>
Vicent Martí 798dd36c 2011-11-29T01:39:52 Merge pull request #499 from arrbee/extend-git-buf Extend git_buf with new utility functions and unit tests.
Russell Belfer 679b69c4 2011-11-28T13:05:25 Resolve remaining feedback * replace some ints with size_ts * update NULL checks in various places
Carlos Martín Nieto 89886d0b 2011-11-28T21:08:29 Plug a bunch of leaks
Vicent Marti a5123ea8 2011-11-28T20:00:42 repository: Do not double-increment refcounts
Russell Belfer 3aa294fd 2011-11-28T10:42:57 Add two string git_buf_join and tweak input error checking. This commit addresses two of the comments: * renamed existing n-input git_buf_join to git_buf_join_n * added new git_buf_join that always takes two inputs * moved some parameter error checking to asserts * extended unit tests to cover new version of git_buf_join
Vicent Marti b2337143 2011-11-28T18:46:25 remote: Fix connected test
Vicent Marti bb34a936 2011-11-28T18:44:47 Merge branch 'repo-ownership' into development
Vicent Marti d88d4311 2011-11-28T08:40:40 remote: Cleanup the remotes code - Hide the remaining transports code - Drop `git_headarray`, switch to using a callback to list refs. Makes the code cleaner.
Russell Belfer 8c74d22e 2011-11-27T21:47:58 Extend git_buf with new utility functions and unit tests. Add new functions to git_buf for: * initializing a buffer from a string * joining one or more strings onto a buffer with separators * swapping two buffers in place * extracting data from a git_buf (leaving it empty) Also, make git_buf_free leave a git_buf back in its initted state, and slightly tweak buffer allocation sizes and thresholds. Finally, port unit tests to clay and extend with lots of new tests for the various git_buf functions.
Vicent Marti c94785a9 2011-11-26T08:35:56 repository: Use `git_config` when initializing Thanks @carlosmn!
Vicent Marti b028a898 2011-11-26T08:31:57 util: Remove unused macro
Vicent Marti 03da4480 2011-11-26T08:31:15 refcount: Fix off-by one error
Vicent Marti 6632c155 2011-11-26T08:30:14 Document all of the things
Vicent Marti b54b88c4 2011-11-26T06:20:14 tests: Add `refs` folder to the `bad_tag.git` repo
Vicent Marti 45e79e37 2011-11-26T04:59:21 Rename all `_close` methods There's no difference between `_free` and `_close` semantics: keep everything with the same name to avoid confusions.
Vicent Marti 9462c471 2011-11-25T08:16:26 repository: Change ownership semantics The ownership semantics have been changed all over the library to be consistent. There are no more "borrowed" or duplicated references. Main changes: - `git_repository_open2` and `3` have been dropped. - Added setters and getters to hotswap all the repository owned objects: `git_repository_index` `git_repository_set_index` `git_repository_odb` `git_repository_set_odb` `git_repository_config` `git_repository_set_config` `git_repository_workdir` `git_repository_set_workdir` Now working directories/index files/ODBs and so on can be hot-swapped after creating a repository and between operations. - All these objects now have proper ownership semantics with refcounting: they all require freeing after they are no longer needed (the repository always keeps its internal reference). - Repository open and initialization has been updated to keep in mind the configuration files. Bare repositories are now always detected, and a default config file is created on init. - All the tests affected by these changes have been dropped from the old test suite and ported to the new one.
Vicent Martí 880b6f0c 2011-11-25T21:31:35 Merge pull request #497 from carlosmn/config Don't fail when opening a new config file
Vicent Martí e42ea1f4 2011-11-25T21:30:08 Merge pull request #491 from schu/refs-cleanup reference_rename() cleanup
Carlos Martín Nieto 533fda3b 2011-11-26T02:00:18 config: test saving config to new file
Carlos Martín Nieto 4e90a0a4 2011-11-26T01:54:12 config: allow to open and write to a new file
Vicent Marti 2869f404 2011-11-22T15:48:37 transport: Add `git_transport_valid_url`
Carlos Martín Nieto 6616e207 2011-11-22T11:17:03 Add a note not to free the result from git_remote_ls
Carlos Martín Nieto 39157563 2011-11-22T11:16:44 Free the created refs in git_remote_update_tips
Carlos Martín Nieto a3147114 2011-11-22T10:30:30 Set transport to NULL after freeing it
Brandon Casey b026b00d 2011-11-21T22:47:59 tests-clay: remove extra semi-colon in clay_libgit2.h, add one to index/rename.c
Vicent Martí f8026322 2011-11-21T22:36:19 Merge pull request #493 from euler0/fix-typos-readme Fix typos in the README file
Vincent Lee 9d163937 2011-11-22T15:12:57 Fix to follow the Qt trademark policy Never use the Qt trade mark with both letters capitalized, in the form "QT". (http://qt-project.org/trademarkpolicy.html)
Vincent Lee 5689a8d5 2011-11-22T15:04:33 Fix a typo in the README file
Vicent Marti 4bef3565 2011-11-22T02:16:20 remote: Assert things that should be asserted
Vicent Martí bec92f78 2011-11-21T17:12:23 Merge pull request #492 from carlosmn/networking Networking improvements
Vicent Marti 2744806f 2011-11-22T02:10:41 tree: Fix documentation
Vicent Marti bf038dab 2011-11-22T02:06:24 clay: Properly initialize filebuf
Russell Belfer b762e576 2011-11-17T15:10:27 filebuf: add GIT_FILEBUF_INIT and protect multiple opens and cleanups Update all stack allocations of git_filebuf to use GIT_FILEBUF_INIT and make git_filebuf_open and git_filebuf_cleanup safe to be called multiple times on the same buffer. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 1d09a1c8 2011-11-22T01:41:22 clay: Merge manually @leto's tests from #485 This uses the new Clay code. As you can see, the diff is minimal... It works!
Vicent Martí 967617cc 2011-11-21T16:37:44 Merge pull request #489 from lht/fix-doc-bare-repo Fix typo in repository documentation
Carlos Martín Nieto 6ac3b707 2011-11-21T20:48:59 Add git_remote_connected Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 4cf01e9a 2011-11-21T20:44:03 Add git_remote_disconnect It can be useful to separate disconnecting from actually destroying the object. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
schu a5cd086d 2011-11-21T11:56:00 reference_rename: don't delete the reflog reference_rename used to delete an old reflog file when renaming a reference to not confuse git.git. Don't do this anymore but let the user take care of writing a reflog entry. Signed-off-by: schu <schu-github@schulog.org>
schu b7c93a66 2011-11-21T13:01:40 Add git_reflog_rename() and git_reflog_delete() Signed-off-by: schu <schu-github@schulog.org>
schu 64093ce5 2011-11-21T11:30:14 reference_rename: make sure to rollback Actually rollback when we can't create the new reference. Mark the rolled back reference as loose. Signed-off-by: schu <schu-github@schulog.org>
schu bdbdefac 2011-11-21T13:06:07 fileops.h: remove git_futils_mv_atomic prototype 0c49ec2 replaced git_futils_mv_atomic with p_rename without removing its prototype. Signed-off-by: schu <schu-github@schulog.org>
Carlos Martín Nieto 0ca7ca3e 2011-10-09T03:07:53 refspec: allow a simple branchname A simple branchname as refspec is valid and we shouldn't throw an error when encountering one. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto dc9e960f 2011-10-09T02:59:01 refspec: make the structure more complete Add a next pointer to make it a linked list and add the 'pattern' and 'matching' flags. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 617bfdf4 2011-11-18T21:28:07 Add a name to a remote created from the API Make it a bit more resilient. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 95057b85 2011-11-18T21:18:39 remote: get rid of git_remote_negotiate There is no good reason to expose the negotiation as a different step to downloading the packfile. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 40a40e8e 2011-10-26T18:06:36 net: move the reference storage to common code
Haitao Li 28ba94ce 2011-11-18T17:43:43 Fix typo in repository documentation
Carlos Martín Nieto e4c93a39 2011-11-18T02:26:10 Update clay instructions to use -vtap
Carlos Martín Nieto c515b5bf 2011-11-18T02:16:24 Add test for renaming a file and adding it to the index Thanks to Emeric.
Carlos Martín Nieto 472d4d85 2011-11-17T20:32:04 Don't overwrite existing objects It's redundant to do this (git doesn't) and Windows doesn't allow us to overwrite a read-only file (which objects are). Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Marti 2cbca8b0 2011-11-18T01:43:27 include: Unify internal include strategies Do not add the `git2` path to internal includes, or that will cause an extra path dependency.
Vicent Marti d1a721c5 2011-11-17T06:01:09 clay: Bump to 0.9.0, add TAP support Comes with schu's stress tests for config files. Hopefully the diffs will stay minimal from now on.
Vicent Marti 2ba14f23 2011-11-17T02:13:46 tree: Add payload to `git_tree_walk`
Vicent Marti 9432af36 2011-11-17T01:23:19 Rename `git_tree_frompath` to `git_tree_get_subtree` That makes more sense to me.
Vicent Martí 010879d9 2011-11-16T20:35:29 Merge pull request #486 from petdance/development Quoted the asterisk to avoid markdown highlighter confusion
Andy Lester a07d8994 2011-11-16T17:33:02 Quoted the asterisk to avoid markdown highlighter confusion
Vicent Martí 68240811 2011-11-16T11:45:37 Merge pull request #484 from brodie/packed-refs-perms refs: permissions-related fixes/improvements
Brodie Rao 9788e72a 2011-11-16T11:39:03 refs: move GIT_PACKED_REFS_FILE_MODE to refs.h as GIT_PACKEDREFS_FILE_MODE This groups the #define with the other ref-related file modes, and it makes the name consistent with the other packed-refs definitions.
Brodie Rao 7096d0f9 2011-11-16T11:36:13 refs: use 0666 permissions when writing packed-refs, not 0644 This matches stock Git's behavior.
Vicent Martí b2ae96fd 2011-11-16T11:34:10 Merge pull request #482 from leto/patch-1 Fix docs about the command to mix the clay tests
Jonathan "Duke" Leto 7b615610 2011-11-16T10:22:13 Fix docs about the command to mix the clay tests
Vicent Marti a15c550d 2011-11-16T14:09:44 threads: Fix the shared global state with TLS See `global.c` for a description of what we're doing. When libgit2 is built with GIT_THREADS support, the threading system must be explicitly initialized with `git_threads_init()`.