|
7ef9f1b5
|
2012-04-02T21:05:45
|
|
Backport .travis.yml
|
|
242a1cea
|
2012-02-05T16:29:12
|
|
libgit2 v0.16.0 "Dutch Fries"
This lovely and much delayed release of libgit2 ships from the cold city
of Brussels, which is currently hosting FOSDEM 2012.
There's been plenty of changes since the latest stable release, here's a
full summary:
- Git Attributes support (see git2/attr.h)
There is now support to efficiently parse and retrieve information
from `.gitattribute` files in a repository. Note that this
information is not yet used e.g. when checking out files.
- .gitignore support
Likewise, all the operations that are affected by `.gitignore` files
now take into account the global, user and local ignores when
skipping the relevant files.
- Cleanup of the object ownership semantics
The ownership semantics for all repository subparts (index, odb,
config files, etc) has been redesigned. All these objects are now
reference counted, and can be hot-swapped in the middle of
execution, allowing for instance to add a working directory and an
index to a repository that was previously opened as bare, or to
change the source of the ODB objects after initialization.
Consequently, the repository API has been simplified to remove all
the `_openX` calls that allowed setting these subparts *before*
initialization.
- git_index_read_tree()
Git trees can now be read into the index.
- More reflog functionality
The reference log has been optimized, and new API calls to rename
and delete the logs for a reference have been added.
- Rewrite of the References code with explicit ownership semantics
The references code has been mostly rewritten to take into account
the cases where another Git application was modifying a repository's
references while the Library was running.
References are now explicitly loaded and free'd by the user, and
they may be reloaded in the middle of execution if the user suspects
that their values may have changed on disk. Despite the new
ownership semantics, the references API stays the same.
- Simplified the Remotes API
Some of the more complex Remote calls have been refactored into
higher level ones, to facilitate the usual `fetch` workflow of a
repository.
- Greatly improved thread-safety
The library no longer has race conditions when loading objects from
the same ODB and different threads at the same time. There's now
full TLS support, even for error codes. When the library is built
with `THREADSAFE=1`, the threading support must be globally
initialized before it can be used (see `git_threads_init()`)
- Tree walking API
A new API can recursively traverse trees and subtrees issuing callbacks for
every single entry.
- Tree diff API
There is basic support for diff'ing an index against two trees.
- Improved windows support
The Library is now codepage aware under Windows32: new API calls
allow the user to set the default codepage for the OS in order to
avoid strange Unicode errors.
|
|
199b7d94
|
2012-02-05T07:42:06
|
|
Merge pull request #551 from schu/treebuilder-entries
treebuilder: remove needless variable entry_count
|
|
b3408e3e
|
2012-02-05T14:59:45
|
|
treebuilder: remove needless variable entry_count
Signed-off-by: schu <schu-github@schulog.org>
|
|
1f0c1984
|
2012-02-04T08:38:46
|
|
Merge pull request #549 from nulltoken/fix/open-repo-with-workdir-path
Fix trailing slash issue to the gitdir path when the repo is opened through a workdir
|
|
99abb79d
|
2012-02-03T12:45:43
|
|
repository: ensure that the path to the .git directory ends with a forward slash when opening a repository through a working directory path
This fixes an issue which was detected while using one of the libgit2 bindings [0]. The lack of the trailing forward slash led the name of references returned by git_reference_listall() to be prefixed with a forward slash.
[0]: https://github.com/libgit2/libgit2sharp/pull/108
|
|
0a4aebb0
|
2012-02-02T04:35:58
|
|
Merge pull request #548 from ehsan/build_fix
Fix the build on Emscripten
|
|
31ffc141
|
2012-02-02T00:14:59
|
|
Fix the build on Emscripten
struct timeval is used in this file, which requires <sys/time.h> to be
included.
|
|
38691ffc
|
2012-02-01T13:20:47
|
|
Compile with _GNU_SOURCE when appropriate
On non-Windows builds, we will now use _GNU_SOURCE so header
files will include modern API extensions. This should resolve
issue #547.
|
|
e8c96ed2
|
2012-02-01T12:30:35
|
|
Add unit tests for recent bug fixes
Add unit tests to confirm ignore directory pattern matches and
to confirm that ignore and attribute files are loaded properly
into the attribute file cache.
|
|
62a1f713
|
2012-02-01T11:54:42
|
|
Fix memory leak in attr file cache
Actually look for the file by the same cache key that we
store it under. Rocket science!
|
|
4ea79a9d
|
2012-02-01T17:41:54
|
|
status: Document submodule TODOs
|
|
bf0107d1
|
2012-02-01T17:35:11
|
|
Merge remote-tracking branch 'arrbee/status-bugs' into development
|
|
771cde43
|
2012-02-01T04:40:18
|
|
tests: free the remotes temp buffer
|
|
f82d996e
|
2012-01-31T14:58:40
|
|
Merge pull request #544 from nulltoken/fix/thread-tests
threads: Make the old test suite TLS aware...
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
1e53b52e
|
2012-01-29T15:11:09
|
|
threads: Make the old test suite TLS aware
|
|
f25cc58d
|
2012-01-27T18:29:03
|
|
clar: Remove pregenerated files
Those were re-added on the move. Ops!
|
|
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.
|
|
7a6f51de
|
2012-01-26T18:03:14
|
|
win32: Use the Windows Atomic API on MinGW too
|
|
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.
|
|
99a07f0f
|
2012-01-25T16:45:46
|
|
Merge pull request #541 from nulltoken/topic/repo-reinit
Repository re-initialization
|
|
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.
|
|
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.
|
|
911ff94e
|
2012-01-25T13:58:40
|
|
Merge pull request #540 from libgit2/clay-rename
Rename the Clay test suite to Clar
|
|
32dc20b5
|
2012-01-25T13:57:31
|
|
gitignore: Add `clar` data
|
|
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!
|
|
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.
|
|
19313a76
|
2012-01-23T21:27:29
|
|
remote: add test which creates a basic remote entry in the repository configuration then loads the remote
|
|
63ab73be
|
2012-01-20T11:13:17
|
|
Merge branch 'fix-subdir-attr-paths' into development
This resolves issue #535 and issue #533.
|
|
9269ccce
|
2012-01-19T23:44:52
|
|
diff-index: fix leak
The buffer wasn't getting freed if the last difference was a deletion.
|
|
860de004
|
2012-01-19T23:26:20
|
|
http: use PRIuZ
MSVC doesn't think %zd is a valid specifier.
|
|
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
|
|
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.
|
|
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.
|
|
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
|