|
da9abdd6
|
2012-02-29T13:19:31
|
|
Fix a win32 warning message
|
|
854eccbb
|
2012-02-29T12:04:59
|
|
Clean up GIT_UNUSED macros on all platforms
It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5
did not fix the GIT_USUSED behavior on all platforms. This commit
walks through and really cleans things up more thoroughly, getting
rid of the unnecessary stuff.
To remove the use of some GIT_UNUSED, I ended up adding a couple
of new iterators for hashtables that allow you to iterator just
over keys or just over values.
In making this change, I found a bug in the clar tests (where we
were doing *count++ but meant to do (*count)++ to increment the
value). I fixed that but then found the test failing because it
was not really using an empty repo. So, I took some of the code
that I wrote for iterator testing and moved it to clar_helpers.c,
then made use of that to make it easier to open fixtures on a
per test basis even within a single test file.
|
|
760db29c
|
2012-02-21T15:09:04
|
|
Fixing unit tests post rebase
Some changes that merged cleanly actually broke the unit
tests, so this fixes them.
|
|
5a2f097f
|
2012-02-03T17:05:05
|
|
Fix minor WIN32 incompatibility
File mode flags are not all defined on WIN32, but since git
is so rigid in how it uses file modes, there is no reason not
to hard code a particular value. Also, this is only used in
the git_diff_print_compact helper function, so it is really
really not important.
|
|
e47329b6
|
2012-02-13T17:29:30
|
|
First pass of diff index to workdir implementation
This is an initial version of git_diff_workdir_to_index. It
also includes renaming some structures and some refactoring
of the existing code so that it could be shared better with
the new function.
This is not complete since it needs a rebase to get some
new odb functions from the upstream branch.
|
|
74fa4bfa
|
2012-02-28T16:14:47
|
|
Update diff to use iterators
This is a major reorganization of the diff code. This changes
the diff functions to use the iterators for traversing the
content. This allowed a lot of code to be simplified. Also,
this moved the functions relating to outputting a diff into a
new file (diff_output.c).
This includes a number of other changes - adding utility
functions, extending iterators, etc. plus more tests for the
diff code. This also takes the example diff.c program much
further in terms of emulating git-diff command line options.
|
|
caf71ec0
|
2012-02-07T15:30:18
|
|
Add tests and fix bugs for diff whitespace options
Once I added tests for the whitespace handling options of
diff, I realized that there were some bugs. This fixes
those and adds the new tests into the test suite.
|
|
a2e895be
|
2012-02-07T12:14:28
|
|
Continue implementation of git-diff
* Implemented git_diff_index_to_tree
* Reworked git_diff_options structure to handle more options
* Made most of the options in git_diff_options actually work
* Reorganized code a bit to remove some redundancy
* Added option parsing to examples/diff.c to test most options
|
|
3a437590
|
2012-02-03T16:53:01
|
|
Clean up diff implementation for review
This fixes several bugs, updates tests and docs, eliminates the
FILE* assumption in favor of printing callbacks for the diff patch
formatter helpers, and adds a "diff" example function that can
perform a diff from the command line.
|
|
65b09b1d
|
2012-02-02T18:03:43
|
|
Implement diff lists and formatters
This reworks the diff API to separate the steps of producing
a diff descriptions from formatting the diff. This will allow
us to share diff output code with the various diff creation
scenarios and will allow us to implement rename detection as
an optional pass that can be run on a diff list.
|
|
cd33323b
|
2012-01-27T11:29:25
|
|
Initial implementation of git_diff_blob
This gets the basic plumbing in place for git_diff_blob.
There is a known issue where additional parameters like
the number of lines of context to display on the diff
are not working correctly (which leads one of the new
unit tests to fail).
|
|
8b75f7f3
|
2012-01-24T14:08:20
|
|
Eliminate xdiff compiler warnings
This cleans up the various GCC compiler warnings with the
xdiff code that was copied in.
|
|
2705576b
|
2012-01-24T14:06:42
|
|
Simplify GIT_UNUSED macros
Since casting to void works to eliminate errors with unused
parameters on all platforms, avoid the various special cases.
Over time, it will make sense to eliminate the GIT_UNUSED
macro completely and just have GIT_UNUSED_ARG.
|
|
3a5ad90a
|
2012-01-24T12:23:20
|
|
Import xdiff library from git
This is the initial import of the xdiff code (LGPL) from
core git as of rev f349b562086e2b7595d8a977d2734ab2ef9e71ef
|
|
7e3fc623
|
2012-01-23T10:54:49
|
|
Add test for possible attr bug
This is a test that should replicate an issue that Peff
is setting with git attributes. But the test doesn't fail.
|
|
e3d55b2a
|
2012-03-02T15:44:15
|
|
Merge pull request #575 from libgit2/filters
Filters, yo
|
|
ce49c7a8
|
2012-03-02T15:09:40
|
|
Add filter tests and fix some bugs
This adds some initial unit tests for file filtering and fixes
some simple bugs in filter application.
|
|
d377fe80
|
2012-03-02T22:12:46
|
|
attr: Add missing header to test suite
|
|
97da3eae
|
2012-03-02T21:12:00
|
|
config: Add missing file
|
|
f2c25d18
|
2012-03-02T20:08:00
|
|
config: Implement a proper cvar cache
|
|
c63793ee
|
2012-03-02T03:51:45
|
|
attr: Change the attribute check macros
The point of having `GIT_ATTR_TRUE` and `GIT_ATTR_FALSE` macros is to be
able to change the way that true and false values are stored inside of
the returned gitattributes value pointer.
However, if these macros are implemented as a simple rename for the
`git_attr__true` pointer, they will always be used with the `==`
operator, and hence we cannot really change the implementation to any
other way that doesn't imply using special pointer values and comparing
them!
We need to do the same thing that core Git does, which is using a
function macro. With `GIT_ATTR_TRUE(attr)`, we can change
internally the way that these values are stored to anything we want.
This commit does that, and rewrites a large chunk of the attributes test
suite to remove duplicated code for expected attributes, and to
properly test the function macro behavior instead of comparing
pointers.
|
|
47a899ff
|
2012-03-01T21:19:51
|
|
filter: Beautiful refactoring
Comments soothe my soul.
|
|
788430c8
|
2012-03-01T05:06:47
|
|
filter: Properly cache filter settings
|
|
c5266eba
|
2012-03-01T01:16:25
|
|
filter: Precache the filter config options on load
|
|
c5e94482
|
2012-03-01T00:52:21
|
|
config: Refactor & add `git_config_get_mapped`
Sane API for real-world usage.
|
|
27950fa3
|
2012-02-29T01:26:03
|
|
filter: Add write-to CRLF filter
|
|
450b40ca
|
2012-02-28T01:13:32
|
|
filter: Load attributes for file
|
|
17b3d9b9
|
2012-02-27T14:03:20
|
|
Merge pull request #576 from carlosmn/revwalk
Friendlier revision walking
|
|
a4a910dd
|
2012-02-27T22:46:45
|
|
Simple test for pushing HEAD and hiding a branch
|
|
f7367993
|
2012-02-27T22:22:45
|
|
revwalk: add convenience function to push/hide HEAD
It's not unusual to want the walker to act on HEAD, so add a
convencience function for the case that the user doesn't already have
a resolved HEAD reference.
|
|
f0fa1c1a
|
2012-02-27T22:00:49
|
|
Add revwalk glob test
|
|
155aca2d
|
2012-02-27T21:17:13
|
|
revwalk: introduce pushing and hiding by glob
git_revwalk_{push,hide}_glob() lets you push the OIDs of references
that match the specified glob. This is the basics for what git.git
does with the rev-list options --branches, --tags, --remotes and
--glob.
|
|
8f7be6ca
|
2012-02-27T21:30:22
|
|
Move revwalk test to clar
|
|
eb8f90e5
|
2012-02-27T17:22:51
|
|
buffer: Null terminate on rtrim
|
|
44b1ff4c
|
2012-02-27T04:31:05
|
|
filter: Apply filters before writing a file to the ODB
Initial implementation. The relevant code is in `blob.c`: the blob write
function has been split into smaller functions.
- Directly write a file to the ODB in streaming mode
- Directly write a symlink to the ODB in direct mode
- Apply a filter, and write a file to the ODB in direct mode
When trying to write a file, we first call `git_filter__load_for_file`,
which populates a filters array with the required filters based on the
filename.
If no filters are resolved to the filename, we can write to the ODB in
streaming mode straight from disk. Otherwise, we load the whole file in
memory and use double-buffering to apply the filter chain. We finish
by writing the file as a whole to the ODB.
|
|
13224ea4
|
2012-02-27T04:28:31
|
|
buffer: Unify `git_fbuffer` and `git_buf`
This makes so much sense that I can't believe it hasn't been done
before. Kill the old `git_fbuffer` and read files straight into
`git_buf` objects.
Also: In order to fully support 4GB files in 32-bit systems, the
`git_buf` implementation has been changed from using `ssize_t` for
storage and storing negative values on allocation failure, to using
`size_t` and changing the buffer pointer to a magical pointer on
allocation failure.
Hopefully this won't break anything.
|
|
e07c2d22
|
2012-02-26T10:45:23
|
|
Merge pull request #574 from carlosmn/remotes
Add git_remote_list()
|
|
8171998f
|
2012-02-26T19:15:36
|
|
Add git_remote_list()
Loops through the configuration and generates a list of configured
remotes.
|
|
6b63589e
|
2012-02-25T19:00:58
|
|
config: add more comprehensive multivar tests
|
|
0a43d7cb
|
2012-02-25T18:52:28
|
|
config: correctly deal with setting a multivar with regex where there are no matches
We used to erroneously consider "^$" as a special case for appending a
value to a multivar. This was a misunderstanding and we should always
append a value if there are no existing values that match.
While we're in the area, replace all the variables in-memory in one
swoop and then replace them on disk so as to avoid matching a value
we've just introduced.
|
|
9554cd51
|
2012-02-24T12:14:26
|
|
A remote exists with an URL alone
We used to consider it an error if a remote didn't have at least a
fetch refspec. This was too much checking, as a remote doesn't in fact
need to have anything other than an URL configured to be considered
a remote.
|
|
1db9d2c3
|
2012-02-23T17:11:20
|
|
Ensure that commits don't fail if committing content that already exists
Making a commit that results in a blob that already exists in the ODB (i.e.
committing something, then making a revert commit) will result in us trying
to p_rename -> MoveFileExW a temp file into the existing ODB entry. Despite
the MOVEFILE_REPLACE_EXISTING flag is passed in, Win32 does not care and
fails it with STATUS_ACCESS_DENIED.
To fix this, we p_unlink the ODB entry before attempting to rename it. This
call will typically fail, but we don't care, we'll let the p_rename fail if
the file actually does exist and we couldn't delete it for some reason (ACLs,
etc).
|
|
34ab819e
|
2012-02-23T14:45:40
|
|
Merge pull request #573 from schu/tests-notes-fix
tests-clar/notes: init oid before using
|
|
aa4254d9
|
2012-02-23T23:27:29
|
|
tests-clar/notes: init oid before using
Reported-by: Carlos Martín Nieto <carlos@cmartin.tk>
Signed-off-by: schu <schu-github@schulog.org>
|
|
82ccb87e
|
2012-02-23T22:56:04
|
|
tree: break out on write error
If write_tree() returs an error, we used to set the error message and
continued looping. Exit the loop so we return the error.
|
|
f01fa266
|
2012-02-23T11:17:48
|
|
Fix workdir iterator unit tests
This test is fragile if you leave extra files in the test
data directory, such as a foo.c~ file from editing with
Emacs. Who would do such a thing?
|
|
290f240e
|
2012-02-23T11:16:47
|
|
Fix readdir usage across platforms
This fixes the missing readdir_r from win32 and fixes other
platforms to always use the reentrant readdir_r form for reading
directory contents.
|
|
1ec1de6d
|
2012-02-23T11:15:45
|
|
Fix warnings about type conversion on win32
|
|
df16fbcf
|
2012-02-23T08:18:54
|
|
Merge pull request #572 from schu/fix-warning-uninitialized
Fix -Wuninitialized warning
|
|
01269540
|
2012-02-23T16:51:07
|
|
Fix -Wuninitialized warning
Signed-off-by: schu <schu-github@schulog.org>
|
|
36d72a51
|
2012-02-22T16:06:33
|
|
Merge pull request #570 from arrbee/uniform-iterators
Uniform iterators for trees, index, and workdir
|
|
0534641d
|
2012-02-22T15:15:35
|
|
Fix iterators based on pull request feedback
This update addresses all of the feedback in pull request #570.
The biggest change was to create actual linked list stacks for
storing the tree and workdir iterator state. This cleaned up
the code a ton. Additionally, all of the static functions had
their 'git_' prefix removed, and a lot of other unnecessary
changes were removed from the original patch.
|
|
da337c80
|
2012-02-22T11:22:33
|
|
Iterator improvements from diff implementation
This makes two changes to iterator behavior: first, advance
can optionally do the work of returning the new current value.
This is such a common pattern that it really cleans up usage.
Second, for workdir iterators, this removes automatically
iterating into directories. That seemed like a good idea,
but when an entirely new directory hierarchy is introduced
into the workdir, there is no reason to iterate into it if
there are no corresponding entries in the tree/index that it
is being compared to.
This second change actually wasn't a lot of code because not
descending into directories was already the behavior for
ignored directories. This just extends that to all directories.
|
|
8d36b253
|
2012-02-22T11:12:20
|
|
Merge pull request #565 from carlosmn/multimap
Add config multivar support
|
|
20ed8983
|
2012-02-22T11:09:48
|
|
Merge pull request #571 from saurik/development
Export parse_tag_buffer as git_tag__parse_buffer.
|
|
b60deb02
|
2012-02-22T04:41:08
|
|
Export parse_tag_buffer as git_tag__parse_buffer.
|
|
b6c93aef
|
2012-02-21T14:46:24
|
|
Uniform iterators for trees, index, and workdir
This create a new git_iterator type of object that provides a
uniform interface for iterating over the index, an arbitrary
tree, or the working directory of a repository.
As part of this, git ignore support was extended to support
push and pop of directory-based ignore files as the working
directory is being traversed (so the array of ignores does
not have to be recreated at each directory during traveral).
There are a number of other small utility functions in buffer,
path, vector, and fileops that are included in this patch
that made the iterator implementation cleaner.
|
|
9c94a356
|
2012-02-21T12:15:23
|
|
Fix check for writing remote's fetch and push configurations
Fix copy-paste error
|
|
481f5e27
|
2012-02-20T11:35:08
|
|
Merge pull request #568 from carlosmn/remotes
Remotes improvements
|
|
f0f3a18a
|
2012-02-20T19:42:27
|
|
Move git_remote_load() to git_buf
|
|
89e5ed98
|
2012-02-20T19:04:45
|
|
Add git_remote_save()
|
|
bcb8c007
|
2012-02-20T18:37:07
|
|
Add git_remote_set_{fetch,push}spec()
Allow setting the fetch and push refspecs, which is useful for
creating new refspecs.
|
|
b13dbb91
|
2012-02-18T01:32:13
|
|
regex: fix sign warnings
|
|
1eaecf2f
|
2012-02-18T01:01:48
|
|
regex: The world uses utf-8
|
|
4a1ecba6
|
2012-02-18T00:54:03
|
|
regex: Move the defines to a config header and include it unconditionally
|
|
2b15f61f
|
2012-02-17T22:22:12
|
|
Add GNU LGPL to COPYING
|
|
c17b1d00
|
2012-02-17T19:41:14
|
|
Add POSIX regex sources when needed
Windows doesn't support POSIX regex, so we need to include it
ourselves. The sources come from git, which in turn took them from
gawk.
|
|
d9da4cca
|
2012-02-05T18:08:23
|
|
Document {get,set}_multivar
|
|
3005855f
|
2012-02-05T00:29:26
|
|
Implement setting multivars
|
|
5e0dc4af
|
2012-02-04T23:18:30
|
|
Support getting multivars
|
|
78d65f39
|
2012-02-01T17:47:17
|
|
tests: add multivar read test
|
|
0774d94d
|
2012-02-01T17:21:28
|
|
Store multivars in the multimap
|
|
fefd4551
|
2012-01-23T04:26:49
|
|
First round of config multimap changes
Move the configuration to use a multimap instead of a list. This
commit doesn't provide any functional changes but changes the support
structures.
|
|
555c81f3
|
2012-02-16T04:22:56
|
|
Merge pull request #563 from schu/notes-fixup
notes: fix assert
|
|
0691966a
|
2012-02-16T11:48:14
|
|
notes: fix assert
Hopefully fix issue "Don't sleep and code" - #558.
Signed-off-by: schu <schu-github@schulog.org>
|
|
6117895f
|
2012-02-15T11:38:40
|
|
Merge pull request #558 from schu/notes-api
Notes API
|
|
bf477ed4
|
2012-02-15T00:33:38
|
|
Add git notes API
This commit adds basic git notes support to libgit2, namely:
* git_note_read
* git_note_message
* git_note_oid
* git_note_create
* git_note_remove
In the long run, we probably want to provide some convenience callback
mechanism for merging and moving (filter-branch) notes.
Signed-off-by: schu <schu-github@schulog.org>
|
|
0c3bae62
|
2012-02-15T16:56:56
|
|
zlib: Remove custom `git2/zlib.h` header
This is legacy compat stuff for when `deflateBound` is not defined, but
we're not embedding zlib and that function is always available. Kill
that with fire.
|
|
905919e6
|
2012-02-14T20:44:22
|
|
util: add git__ishex
git__ishex allows to check if a string is a hexadecimal representation.
Signed-off-by: schu <schu-github@schulog.org>
|
|
b4b79ac3
|
2012-02-15T00:12:53
|
|
commit: actually allow yet to be born update_ref
git_commit_create is supposed to update the given reference
"update_ref", but segfaulted in case of a yet to be born
reference. Fix it.
Signed-off-by: schu <schu-github@schulog.org>
|
|
66faeb5c
|
2012-02-13T08:19:40
|
|
Merge pull request #557 from schu/copyright
Update Copyright header
|
|
5e0de328
|
2012-02-13T17:10:24
|
|
Update Copyright header
Signed-off-by: schu <schu-github@schulog.org>
|
|
2c19b565
|
2012-02-13T07:02:42
|
|
Merge pull request #474 from schu/clang-unused
Fix "clang warning: expression result unused"
|
|
15f52ae1
|
2011-12-19T15:59:13
|
|
config_file: fix clang sizeof-pointer-memaccess
|
|
4ef52315
|
2012-02-13T04:21:24
|
|
Merge pull request #556 from schu/fix-sign-compare
tests-clar: fix warning sign-compare
|
|
90e6c620
|
2012-02-13T12:13:05
|
|
tests-clar: fix warning sign-compare
Signed-off-by: schu <schu-github@schulog.org>
|
|
6d39c0dd
|
2012-02-11T06:44:54
|
|
Merge pull request #554 from carlosmn/revwalk-reset
revwalk: unmark commits as uninteresting on reset
|
|
f19e3ca2
|
2012-02-10T20:16:42
|
|
odb: Proper symlink hashing
|
|
18e5b854
|
2012-02-10T19:47:02
|
|
odb: Add internal `git_odb__hashfd`
|
|
9b8d5608
|
2012-02-09T01:18:26
|
|
makefile: Define _GNU_SOURCE in the embed mkfile
|
|
97313ce2
|
2012-02-07T10:51:57
|
|
revwalk: unmark commits as uninteresting on reset
Not doing so hides commits we want to get at during a second walk.
|
|
61eba2d8
|
2012-02-07T02:27:17
|
|
Merge pull request #553 from nacho/glib
Add libgit2-glib link to README.md
|
|
13f77071
|
2012-02-07T10:20:03
|
|
Add libgit2-glib link to README.md
|
|
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.
|