|
8a4e3181
|
2011-11-30T13:33:30
|
|
Merge pull request #504 from arrbee/git-buf-fast-join
Optimized implementation of git_buf_join
|
|
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.
|
|
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
|
|
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.
|
|
7df41387
|
2011-11-29T21:44:54
|
|
Adding unit tests for git_buf_copy_cstr
|
|
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.
|
|
fc88a8d3
|
2011-11-29T02:37:39
|
|
Merge pull request #500 from schu/minor-fixups
Minor fixups
|
|
8e46168c
|
2011-11-29T11:36:18
|
|
clay: Add buffer tests
|
|
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>
|
|
fe9a0e09
|
2011-11-29T11:02:42
|
|
transports: fix -Wunused-but-set-variable warning
Signed-off-by: schu <schu-github@schulog.org>
|
|
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.
|
|
679b69c4
|
2011-11-28T13:05:25
|
|
Resolve remaining feedback
* replace some ints with size_ts
* update NULL checks in various places
|
|
89886d0b
|
2011-11-28T21:08:29
|
|
Plug a bunch of leaks
|
|
a5123ea8
|
2011-11-28T20:00:42
|
|
repository: Do not double-increment refcounts
|
|
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
|
|
b2337143
|
2011-11-28T18:46:25
|
|
remote: Fix connected test
|
|
bb34a936
|
2011-11-28T18:44:47
|
|
Merge branch 'repo-ownership' into development
|
|
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.
|
|
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.
|
|
c94785a9
|
2011-11-26T08:35:56
|
|
repository: Use `git_config` when initializing
Thanks @carlosmn!
|
|
b028a898
|
2011-11-26T08:31:57
|
|
util: Remove unused macro
|
|
03da4480
|
2011-11-26T08:31:15
|
|
refcount: Fix off-by one error
|
|
6632c155
|
2011-11-26T08:30:14
|
|
Document all of the things
|
|
b54b88c4
|
2011-11-26T06:20:14
|
|
tests: Add `refs` folder to the `bad_tag.git` repo
|
|
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.
|
|
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.
|
|
880b6f0c
|
2011-11-25T21:31:35
|
|
Merge pull request #497 from carlosmn/config
Don't fail when opening a new config file
|
|
e42ea1f4
|
2011-11-25T21:30:08
|
|
Merge pull request #491 from schu/refs-cleanup
reference_rename() cleanup
|
|
533fda3b
|
2011-11-26T02:00:18
|
|
config: test saving config to new file
|
|
4e90a0a4
|
2011-11-26T01:54:12
|
|
config: allow to open and write to a new file
|
|
2869f404
|
2011-11-22T15:48:37
|
|
transport: Add `git_transport_valid_url`
|
|
6616e207
|
2011-11-22T11:17:03
|
|
Add a note not to free the result from git_remote_ls
|
|
39157563
|
2011-11-22T11:16:44
|
|
Free the created refs in git_remote_update_tips
|
|
a3147114
|
2011-11-22T10:30:30
|
|
Set transport to NULL after freeing it
|
|
b026b00d
|
2011-11-21T22:47:59
|
|
tests-clay: remove extra semi-colon in clay_libgit2.h, add one to index/rename.c
|
|
f8026322
|
2011-11-21T22:36:19
|
|
Merge pull request #493 from euler0/fix-typos-readme
Fix typos in the README file
|
|
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)
|
|
5689a8d5
|
2011-11-22T15:04:33
|
|
Fix a typo in the README file
|
|
4bef3565
|
2011-11-22T02:16:20
|
|
remote: Assert things that should be asserted
|
|
bec92f78
|
2011-11-21T17:12:23
|
|
Merge pull request #492 from carlosmn/networking
Networking improvements
|
|
2744806f
|
2011-11-22T02:10:41
|
|
tree: Fix documentation
|
|
bf038dab
|
2011-11-22T02:06:24
|
|
clay: Properly initialize filebuf
|
|
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>
|
|
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!
|
|
967617cc
|
2011-11-21T16:37:44
|
|
Merge pull request #489 from lht/fix-doc-bare-repo
Fix typo in repository documentation
|
|
6ac3b707
|
2011-11-21T20:48:59
|
|
Add git_remote_connected
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
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>
|
|
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>
|
|
b7c93a66
|
2011-11-21T13:01:40
|
|
Add git_reflog_rename() and git_reflog_delete()
Signed-off-by: schu <schu-github@schulog.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
40a40e8e
|
2011-10-26T18:06:36
|
|
net: move the reference storage to common code
|
|
28ba94ce
|
2011-11-18T17:43:43
|
|
Fix typo in repository documentation
|
|
e4c93a39
|
2011-11-18T02:26:10
|
|
Update clay instructions to use -vtap
|
|
c515b5bf
|
2011-11-18T02:16:24
|
|
Add test for renaming a file and adding it to the index
Thanks to Emeric.
|
|
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>
|
|
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.
|
|
9432af36
|
2011-11-17T01:23:19
|
|
Rename `git_tree_frompath` to `git_tree_get_subtree`
That makes more sense to me.
|
|
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.
|
|
2ba14f23
|
2011-11-17T02:13:46
|
|
tree: Add payload to `git_tree_walk`
|
|
010879d9
|
2011-11-16T20:35:29
|
|
Merge pull request #486 from petdance/development
Quoted the asterisk to avoid markdown highlighter confusion
|
|
a07d8994
|
2011-11-16T17:33:02
|
|
Quoted the asterisk to avoid markdown highlighter confusion
|
|
68240811
|
2011-11-16T11:45:37
|
|
Merge pull request #484 from brodie/packed-refs-perms
refs: permissions-related fixes/improvements
|
|
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.
|
|
7096d0f9
|
2011-11-16T11:36:13
|
|
refs: use 0666 permissions when writing packed-refs, not 0644
This matches stock Git's behavior.
|
|
b2ae96fd
|
2011-11-16T11:34:10
|
|
Merge pull request #482 from leto/patch-1
Fix docs about the command to mix the clay tests
|
|
7b615610
|
2011-11-16T10:22:13
|
|
Fix docs about the command to mix the clay tests
|
|
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()`.
|
|
b0b2dd5e
|
2011-11-07T12:04:13
|
|
Merge pull request #475 from carlosmn/perms
Fix Windows permissions problems
|
|
657a3951
|
2011-11-07T20:32:03
|
|
Write packed-refs with 0644 permissions
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
718eb4b8
|
2011-11-07T20:06:01
|
|
Reword packed-refs error messages so they're easier to track down
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
0c49ec2d
|
2011-11-07T19:34:24
|
|
Implement p_rename
Move the callers of git_futils_mv_atomic to use p_rename.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
38068dc1
|
2011-11-07T06:27:49
|
|
Merge pull request #473 from drafnel/bc/update-examples
bc/update examples
|
|
3b83bdac
|
2011-11-07T06:25:22
|
|
Merge pull request #470 from schu/test-helpers-no-assert
test_helpers: do not rely on assert
|
|
f8e8c8d4
|
2011-11-07T04:38:12
|
|
Merge pull request #472 from libgit2/new-references
References! References! References!
|
|
0b142c9c
|
2011-11-06T20:07:27
|
|
examples/network/.gitignore: ignore 'git2'
|
|
349532d0
|
2011-11-06T19:44:29
|
|
examples/network/git2.c: exit with proper status, and avoid segfault
This function should exit after printing usage information if too few
arguments were specified.
Additionally, it should exit with a failure status if the first argument
supplied is not one in the internal command list.
|
|
983562e4
|
2011-11-06T19:43:44
|
|
examples/network/git2.c: add newline to usage message
|
|
faeebd06
|
2011-11-06T19:35:35
|
|
examples/network/fetch.c: revert overzealous conversion of free to git__free
Since git__free is not exported (it's actually a macro), it should not be
used in client programs. Change this call to 'git__free' back to 'free'.
|
|
62dd6d16
|
2011-11-06T02:52:43
|
|
reflog: Do not free references before time
|
|
d4a0b124
|
2011-10-30T21:58:33
|
|
refs: Partial rewrite for read-only refs
This new version of the references code is significantly faster and
hopefully easier to read.
External API stays the same. A new method `git_reference_reload()` has
been added to force updating a memory reference from disk. In-memory
references are no longer updated automagically -- this was killing us.
If a reference is deleted externally and the user doesn't reload the
memory object, nothing critical happens: any functions using that
reference should fail gracefully (e.g. deletion, renaming, and so on).
All generated references from the API are read only and must be free'd
by the user. There is no reference counting and no traces of generated
references are kept in the library.
There is no longer an internal representation for references. There is
only one reference struct `git_reference`, and symbolic/oid targets are
stored inside an union.
Packfile references are stored using an optimized struct with flex array
for reference names. This should significantly reduce the memory cost of
loading the packfile from disk.
|
|
549bbd13
|
2011-08-13T18:14:39
|
|
git_reference_rename: cleanup reference renaming
git_reference_rename() didn't properly cleanup old references given by
the user to not break some ugly old tests. Since references don't point
to libgit's internal cache anymore we can cleanup git_reference_rename()
to be somewhat less messy.
Signed-off-by: schu <schu-github@schulog.org>
|
|
75abd2b9
|
2011-08-11T19:38:13
|
|
Free all used references in the source tree
Since references are not owned by the repository anymore we have to free
them manually now.
Signed-off-by: schu <schu-github@schulog.org>
|
|
4fd89fa0
|
2011-07-26T11:17:32
|
|
refs: add test case checking "immutable" references
Signed-off-by: schu <schu-github@schulog.org>
|
|
a46ec457
|
2011-08-10T16:19:42
|
|
refs: split internal and external references
Currently libgit2 shares pointers to its internal reference cache with
the user. This leads to several problems like invalidation of reference
pointers when reordering the cache or manipulation of the cache from
user side.
Give each user its own git_reference instead of leaking the internal
representation (struct reference).
Add the following new API functions:
* git_reference_free
* git_reference_is_packed
Signed-off-by: schu <schu-github@schulog.org>
|
|
54ccc717
|
2011-11-05T18:01:32
|
|
examples/general.c: update for recent API renaming of git_config_get_int
git_config_get_int --> git_config_get_int32
|
|
ec907944
|
2011-10-30T13:48:00
|
|
test_helpers: do not rely on assert
The functions loose_object_mode and loose_object_dir_mode call stat
inside an assert statement which isn't evaluated when compiling in
Release mode (NDEBUG) and leads to failing tests. Replace it.
Signed-off-by: schu <schu-github@schulog.org>
|
|
d3104fa0
|
2011-10-29T14:06:36
|
|
Merge pull request #468 from nulltoken/ntk/fix/issue-465
Status: fix segfault (#465) and order issues
|
|
e3baa3cc
|
2011-10-29T17:45:01
|
|
status: Fix a sorting issue in the treewalker
This ensures that entries from the working directory are retrieved according to the following rules:
- The file "subdir" should appear before the file "subdir.txt"
- The folder "subdir" should appear after the file "subdir.txt"
|
|
a1bd78ea
|
2011-10-29T21:29:31
|
|
status: Add a file in the test repository to cover the correct sorting of entries when the working folder is being read
In this case, "subdir.txt" should be listed before the "subdir" directory.
|
|
d1db74bf
|
2011-10-29T17:40:04
|
|
status: Prevent segfaulting when determining the status of a repository
Fixes #465
|
|
89fb8f02
|
2011-10-28T19:04:23
|
|
Merge pull request #456 from brodie/perm-fixes
Create objects, indexes, and directories with the right file permissions
|
|
3286c408
|
2011-10-28T14:51:13
|
|
global: Properly use `git__` memory wrappers
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.
|
|
da37654d
|
2011-10-27T22:33:31
|
|
tree: Add traversal in post-order
|
|
4849dbb8
|
2011-10-27T17:54:17
|
|
Merge branch 'status' of https://github.com/carlosmn/libgit2 into development
|
|
1ca715e0
|
2011-10-22T12:36:30
|
|
status: move GIT_STATUS_PATH_* into an enum
Their actual values have no meaning, so pack them in an enum.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|