|
881e3da0
|
2012-01-19T11:38:09
|
|
Merge pull request #538 from carlosmn/ref-noleak
Don't leak when deleting or removing refs
|
|
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.
|
|
3f2bf4d6
|
2012-01-19T19:06:15
|
|
hashtable: add remove2 to retrieve the value that was removed
|
|
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.
|
|
585a2eb7
|
2012-01-19T17:05:16
|
|
remote: don't try to free the ref on error
On error, the pointer could be pointing anywhere.
|
|
43c6dd6f
|
2012-01-18T15:29:51
|
|
Merge pull request #537 from nulltoken/fix/download-segfault
Fix download segfault
|
|
c3ec2ec2
|
2012-01-19T00:09:47
|
|
transport: prevent git_remote_download() from segfaulting when being passed a lightweight remote built with git_remote_new()
|
|
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).
|
|
d1317f1b
|
2012-01-17T11:01:04
|
|
Merge pull request #536 from nulltoken/fix/transport-segfault
Fix transport segfault
|
|
0b44c065
|
2012-01-17T14:35:04
|
|
repository: add the invalid repository path to the error message
|
|
86360ffd
|
2012-01-17T14:33:26
|
|
transport: prevent the transport determination mechanism from segfaulting when being passed an url starting with an unknown prefix
|
|
fdc8a7db
|
2012-01-17T14:06:35
|
|
Fix MSVC compilation warning
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
2866c016
|
2012-01-13T18:20:13
|
|
examples: use git_repository_odb instead of _database
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
fdaa9240
|
2012-01-11T15:25:13
|
|
Fix up status tests
|
|
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).
|
|
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.
|
|
1d175074
|
2012-01-05T17:46:06
|
|
Merge pull request #528 from arrbee/valgrind-fixes-2
Valgrind fixes in smaller pieces
|
|
91d46f8d
|
2012-01-06T01:13:08
|
|
clay tests: free resources
Trees, indices and repos need to be freed
|
|
fa3cb0da
|
2012-01-05T15:15:43
|
|
Fix memory leak in git_index_remove.
Missed freeing the entry.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
b0df89d9
|
2012-01-04T12:34:59
|
|
Merge pull request #526 from nulltoken/fix/attr
Fix some "attributes" related issues
|
|
f46e6226
|
2012-01-04T21:15:12
|
|
Fix Windows specific off-by-one error
The value returned by MultiByteToWideChar includes the NULL termination character.
|
|
acb159e1
|
2012-01-04T17:59:48
|
|
Fix MSVC compilation warnings
|
|
7d93f96a
|
2012-01-03T07:28:38
|
|
Merge pull request #525 from euler0/add-missing-semicolon
Add missing semicolon
|
|
c6a437ea
|
2012-01-03T19:44:13
|
|
Add missing semicolon
|
|
1d415455
|
2012-01-02T10:06:24
|
|
clay: Move `file_create` to the helpers file
|
|
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
|
|
9191a6d2
|
2012-01-02T09:56:48
|
|
Merge remote-tracking branch 'arrbee/git-attributes' into development
Conflicts:
tests-clay/clay_main.c
|
|
9dd4c3e8
|
2011-12-31T05:56:39
|
|
config: Rename the `delete` callback name
`delete` is a reserved keyword in C++.
|
|
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.
|
|
0fb3fba1
|
2011-12-29T10:37:28
|
|
add diff-index tests
|
|
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.
|
|
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.
|
|
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.
|
|
599f2849
|
2011-12-26T18:37:31
|
|
add git_index_read_tree
|
|
a26a1563
|
2011-12-30T19:03:55
|
|
move entry_is_tree to tree.h
|
|
c6d2a2c0
|
2011-12-29T21:31:30
|
|
Fixed up memory leaks
|
|
e632f687
|
2011-12-29T13:04:17
|
|
cmake: generate tags
|
|
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.
|
|
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.
|
|
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
|
|
2017a15d
|
2011-12-27T16:03:28
|
|
path: add git_path_fromurl()
|
|
459e2dcd
|
2011-12-27T11:18:57
|
|
path: add git__percent_decode()
|
|
eb8de747
|
2011-12-28T20:24:58
|
|
util: add git__fromhex()
|
|
06fcf057
|
2011-12-27T06:32:11
|
|
Merge pull request #520 from antono/patch-1
Added link to vala bindings
|
|
27f69e48
|
2011-12-27T17:10:12
|
|
Added link to vala bindings
|
|
9aeef392
|
2011-12-26T23:01:06
|
|
Merge pull request #519 from ingydotnet/development
Add Perl to the list of bindings.
|
|
20626db1
|
2011-12-26T21:58:17
|
|
Add Perl to the list of bindings.
|
|
d16e4b2b
|
2011-12-25T00:25:04
|
|
remotes: Remove unused variables
|
|
fa515656
|
2011-12-25T00:22:20
|
|
refs: Fix double free
Includes relevant Clay test
|
|
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
|
|
db1f7e59
|
2011-12-21T16:36:34
|
|
remote: add test to retrieve the advertised references from a local repository and fix related implementation
|
|
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.
|
|
1bdba338
|
2011-12-20T16:27:25
|
|
Merge pull request #514 from schu/fix-warning-uninitialized
config_file: honor error
|
|
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>
|
|
be00b00d
|
2011-12-18T12:21:18
|
|
Add unit test for proper init of index entries
|
|
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.
|
|
3e72809b
|
2011-12-16T01:06:01
|
|
Merge pull request #513 from carlosmn/development
Really delete variables
|
|
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.
|
|
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.
|
|
2ea14da6
|
2011-12-15T18:14:41
|
|
config: Return ENOTFOUND when a variable was deleted
|
|
bc57b80b
|
2011-12-15T02:08:03
|
|
Update to Clay 0.10.0
Comes with support for global events; this fixes #496.
|
|
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
|
|
d6cceddd
|
2011-12-14T10:52:28
|
|
Check error on path manipulations.
This commit fixes #511.
|
|
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
|
|
dcb7447c
|
2011-12-14T11:15:19
|
|
Merge pull request #512 from nulltoken/fix/mktemp-segfault
Prevent segfaulting on Windows when building a temporary filename
|
|
489c3666
|
2011-12-14T20:00:34
|
|
posix_w32: prevent segfaulting on Windows when building a temporary filename
|
|
8fae76c5
|
2011-12-14T09:38:05
|
|
commit: add test to ensure predictability of generation of commit, tree and blob object ids
|
|
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
|
|
bf6d2717
|
2011-12-14T03:27:53
|
|
buffer: inline `git_buf_cstr`
|
|
7af26f8f
|
2011-12-14T03:24:16
|
|
Fix tree-diff with the new path API
|
|
40e73d6f
|
2011-12-09T01:38:46
|
|
Merge remote-tracking branch 'arrbee/git-buf-for-paths' into development
Conflicts:
tests-clay/clay_main.c
|
|
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.
|
|
a7954d2a
|
2011-12-04T17:55:35
|
|
tree: add test to ensure predictability of generation of object ids
|
|
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/
|
|
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>
|
|
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>
|
|
a22b14d3
|
2011-11-30T23:04:23
|
|
Merge pull request #506 from nulltoken/fix/warnings
Fix compilation warnings
|
|
8e80decf
|
2011-12-01T07:48:20
|
|
Fix compilation warnings
|
|
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>
|