]> git.proxmox.com Git - libgit2.git/log
libgit2.git
12 years agoFix issues raised on pull request
Russell Belfer [Wed, 7 Mar 2012 18:52:17 +0000 (10:52 -0800)]
Fix issues raised on pull request

This resolves the comments on pull request #590

12 years agoMigrating diff to new error handling
Russell Belfer [Wed, 7 Mar 2012 00:14:31 +0000 (16:14 -0800)]
Migrating diff to new error handling

Ended up migrating a bunch of upstream functions as well
including vector, attr_file, and odb in order to get this
to work right.

12 years agoerror-handling: Repository
Vicent Martí [Tue, 6 Mar 2012 23:02:55 +0000 (00:02 +0100)]
error-handling: Repository

This also includes droping `git_buf_lasterror` because it makes no sense
in the new system. Note that in most of the places were it has been
dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so
instead it should return a generic `-1` and obviously not throw
anything.

12 years agodiff: Fix rebase breackage
Vicent Martí [Tue, 6 Mar 2012 00:37:56 +0000 (01:37 +0100)]
diff: Fix rebase breackage

12 years agoerror-handling: References
Vicent Martí [Thu, 16 Feb 2012 23:13:34 +0000 (00:13 +0100)]
error-handling: References

Yes, this is error handling solely for `refs.c`, but some of the
abstractions leak all ofer the code base.

12 years agorefs: Error handling rework. WIP
Vicent Martí [Wed, 15 Feb 2012 15:54:17 +0000 (16:54 +0100)]
refs: Error handling rework. WIP

12 years agoerror-handling: Add new routines
Vicent Martí [Tue, 14 Feb 2012 20:23:11 +0000 (21:23 +0100)]
error-handling: Add new routines

Obviously all the old throw routines are still in place, so we can
gradually port over.

12 years agoerror-handling: Add reference documentation
Vicent Martí [Tue, 14 Feb 2012 19:36:39 +0000 (20:36 +0100)]
error-handling: Add reference documentation

12 years agoFixes for merge of filters branch
Russell Belfer [Fri, 2 Mar 2012 23:57:06 +0000 (15:57 -0800)]
Fixes for merge of filters branch

12 years agoRevert GIT_STATUS constants to avoid issues
Russell Belfer [Thu, 1 Mar 2012 19:45:00 +0000 (11:45 -0800)]
Revert GIT_STATUS constants to avoid issues

This reverts the changes to the GIT_STATUS constants and adds a
new enumeration to describe the type of change in a git_diff_delta.
I don't love this solution, but it should prevent strange errors
from occurring for now.  Eventually, I would like to unify the
various status constants, but it needs a larger plan and I just
wanted to eliminate this breakage quickly.

12 years agoFixing memory leaks indicated by valgrind
Russell Belfer [Wed, 29 Feb 2012 22:19:39 +0000 (14:19 -0800)]
Fixing memory leaks indicated by valgrind

This clears up the memory leaks that valgrind seems to find on
my machine.

12 years agoFix a win32 warning message
Russell Belfer [Wed, 29 Feb 2012 21:19:31 +0000 (13:19 -0800)]
Fix a win32 warning message

12 years agoClean up GIT_UNUSED macros on all platforms
Russell Belfer [Wed, 29 Feb 2012 20:04:59 +0000 (12:04 -0800)]
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.

12 years agoUpdate diff to use iterators
Russell Belfer [Wed, 29 Feb 2012 00:14:47 +0000 (16:14 -0800)]
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.

12 years agoFixing unit tests post rebase
Russell Belfer [Tue, 21 Feb 2012 23:09:04 +0000 (15:09 -0800)]
Fixing unit tests post rebase

Some changes that merged cleanly actually broke the unit
tests, so this fixes them.

12 years agoFirst pass of diff index to workdir implementation
Russell Belfer [Tue, 14 Feb 2012 01:29:30 +0000 (17:29 -0800)]
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.

12 years agoAdd tests and fix bugs for diff whitespace options
Russell Belfer [Tue, 7 Feb 2012 23:30:18 +0000 (15:30 -0800)]
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.

12 years agoContinue implementation of git-diff
Russell Belfer [Tue, 7 Feb 2012 20:14:28 +0000 (12:14 -0800)]
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

12 years agoFix minor WIN32 incompatibility
Russell Belfer [Sat, 4 Feb 2012 01:05:05 +0000 (17:05 -0800)]
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.

12 years agoClean up diff implementation for review
Russell Belfer [Sat, 4 Feb 2012 00:53:01 +0000 (16:53 -0800)]
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.

12 years agoImplement diff lists and formatters
Russell Belfer [Fri, 3 Feb 2012 02:03:43 +0000 (18:03 -0800)]
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.

12 years agoInitial implementation of git_diff_blob
Russell Belfer [Fri, 27 Jan 2012 19:29:25 +0000 (11:29 -0800)]
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).

12 years agoEliminate xdiff compiler warnings
Russell Belfer [Tue, 24 Jan 2012 22:08:20 +0000 (14:08 -0800)]
Eliminate xdiff compiler warnings

This cleans up the various GCC compiler warnings with the
xdiff code that was copied in.

12 years agoSimplify GIT_UNUSED macros
Russell Belfer [Tue, 24 Jan 2012 22:06:42 +0000 (14:06 -0800)]
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.

12 years agoImport xdiff library from git
Russell Belfer [Tue, 24 Jan 2012 20:23:20 +0000 (12:23 -0800)]
Import xdiff library from git

This is the initial import of the xdiff code (LGPL) from
core git as of rev f349b562086e2b7595d8a977d2734ab2ef9e71ef

12 years agoAdd test for possible attr bug
Russell Belfer [Mon, 23 Jan 2012 18:54:49 +0000 (10:54 -0800)]
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.

12 years agoMerge pull request #575 from libgit2/filters
Vicent Martí [Fri, 2 Mar 2012 23:44:15 +0000 (15:44 -0800)]
Merge pull request #575 from libgit2/filters

Filters, yo

12 years agoAdd filter tests and fix some bugs
Russell Belfer [Fri, 2 Mar 2012 23:09:40 +0000 (15:09 -0800)]
Add filter tests and fix some bugs

This adds some initial unit tests for file filtering and fixes
some simple bugs in filter application.

12 years agoattr: Add missing header to test suite
Vicent Martí [Fri, 2 Mar 2012 21:12:46 +0000 (22:12 +0100)]
attr: Add missing header to test suite

12 years agoconfig: Add missing file
Vicent Martí [Fri, 2 Mar 2012 20:12:00 +0000 (21:12 +0100)]
config: Add missing file

12 years agoconfig: Implement a proper cvar cache
Vicent Martí [Fri, 2 Mar 2012 19:08:00 +0000 (20:08 +0100)]
config: Implement a proper cvar cache

12 years agoattr: Change the attribute check macros
Vicent Martí [Fri, 2 Mar 2012 02:51:45 +0000 (03:51 +0100)]
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.

12 years agofilter: Beautiful refactoring
Vicent Martí [Thu, 1 Mar 2012 20:19:51 +0000 (21:19 +0100)]
filter: Beautiful refactoring

Comments soothe my soul.

12 years agofilter: Properly cache filter settings
Vicent Martí [Thu, 1 Mar 2012 04:06:47 +0000 (05:06 +0100)]
filter: Properly cache filter settings

12 years agofilter: Precache the filter config options on load
Vicent Martí [Thu, 1 Mar 2012 00:16:25 +0000 (01:16 +0100)]
filter: Precache the filter config options on load

12 years agoconfig: Refactor & add `git_config_get_mapped`
Vicent Martí [Wed, 29 Feb 2012 23:52:21 +0000 (00:52 +0100)]
config: Refactor & add `git_config_get_mapped`

Sane API for real-world usage.

12 years agofilter: Add write-to CRLF filter
Vicent Martí [Wed, 29 Feb 2012 00:26:03 +0000 (01:26 +0100)]
filter: Add write-to CRLF filter

12 years agofilter: Load attributes for file
Vicent Martí [Tue, 28 Feb 2012 00:13:32 +0000 (01:13 +0100)]
filter: Load attributes for file

12 years agoMerge pull request #576 from carlosmn/revwalk
Vicent Martí [Mon, 27 Feb 2012 22:03:20 +0000 (14:03 -0800)]
Merge pull request #576 from carlosmn/revwalk

Friendlier revision walking

12 years agoSimple test for pushing HEAD and hiding a branch
Carlos Martín Nieto [Mon, 27 Feb 2012 21:46:45 +0000 (22:46 +0100)]
Simple test for pushing HEAD and hiding a branch

12 years agorevwalk: add convenience function to push/hide HEAD
Carlos Martín Nieto [Mon, 27 Feb 2012 21:22:45 +0000 (22:22 +0100)]
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.

12 years agoAdd revwalk glob test
Carlos Martín Nieto [Mon, 27 Feb 2012 21:00:49 +0000 (22:00 +0100)]
Add revwalk glob test

12 years agorevwalk: introduce pushing and hiding by glob
Carlos Martín Nieto [Mon, 27 Feb 2012 20:17:13 +0000 (21:17 +0100)]
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.

12 years agoMove revwalk test to clar
Carlos Martín Nieto [Mon, 27 Feb 2012 20:30:22 +0000 (21:30 +0100)]
Move revwalk test to clar

12 years agobuffer: Null terminate on rtrim
Vicent Martí [Mon, 27 Feb 2012 16:22:51 +0000 (17:22 +0100)]
buffer: Null terminate on rtrim

12 years agofilter: Apply filters before writing a file to the ODB
Vicent Martí [Mon, 27 Feb 2012 03:31:05 +0000 (04:31 +0100)]
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.

12 years agobuffer: Unify `git_fbuffer` and `git_buf`
Vicent Martí [Mon, 27 Feb 2012 03:28:31 +0000 (04:28 +0100)]
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.

12 years agoMerge pull request #574 from carlosmn/remotes
Vicent Martí [Sun, 26 Feb 2012 18:45:23 +0000 (10:45 -0800)]
Merge pull request #574 from carlosmn/remotes

Add git_remote_list()

12 years agoAdd git_remote_list()
Carlos Martín Nieto [Sun, 26 Feb 2012 18:15:36 +0000 (19:15 +0100)]
Add git_remote_list()

Loops through the configuration and generates a list of configured
remotes.

12 years agoconfig: add more comprehensive multivar tests
Carlos Martín Nieto [Sat, 25 Feb 2012 18:00:58 +0000 (19:00 +0100)]
config: add more comprehensive multivar tests

12 years agoconfig: correctly deal with setting a multivar with regex where there are no matches
Carlos Martín Nieto [Sat, 25 Feb 2012 17:52:28 +0000 (18:52 +0100)]
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.

12 years agoA remote exists with an URL alone
Carlos Martín Nieto [Fri, 24 Feb 2012 11:14:26 +0000 (12:14 +0100)]
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.

12 years agoEnsure that commits don't fail if committing content that already exists
Paul Betts [Fri, 24 Feb 2012 01:11:20 +0000 (17:11 -0800)]
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).

12 years agoMerge pull request #573 from schu/tests-notes-fix
Vicent Martí [Thu, 23 Feb 2012 22:45:40 +0000 (14:45 -0800)]
Merge pull request #573 from schu/tests-notes-fix

tests-clar/notes: init oid before using

12 years agotests-clar/notes: init oid before using
schu [Thu, 23 Feb 2012 22:27:29 +0000 (23:27 +0100)]
tests-clar/notes: init oid before using

Reported-by: Carlos Martín Nieto <carlos@cmartin.tk>
Signed-off-by: schu <schu-github@schulog.org>
12 years agotree: break out on write error
Carlos Martín Nieto [Thu, 23 Feb 2012 21:56:04 +0000 (22:56 +0100)]
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.

12 years agoFix workdir iterator unit tests
Russell Belfer [Thu, 23 Feb 2012 19:17:48 +0000 (11:17 -0800)]
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?

12 years agoFix readdir usage across platforms
Russell Belfer [Thu, 23 Feb 2012 19:16:47 +0000 (11:16 -0800)]
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.

12 years agoFix warnings about type conversion on win32
Russell Belfer [Thu, 23 Feb 2012 19:15:45 +0000 (11:15 -0800)]
Fix warnings about type conversion on win32

12 years agoMerge pull request #572 from schu/fix-warning-uninitialized
Vicent Martí [Thu, 23 Feb 2012 16:18:54 +0000 (08:18 -0800)]
Merge pull request #572 from schu/fix-warning-uninitialized

Fix -Wuninitialized warning

12 years agoFix -Wuninitialized warning
schu [Thu, 23 Feb 2012 15:51:07 +0000 (16:51 +0100)]
Fix -Wuninitialized warning

Signed-off-by: schu <schu-github@schulog.org>
12 years agoMerge pull request #570 from arrbee/uniform-iterators
Vicent Martí [Thu, 23 Feb 2012 00:06:33 +0000 (16:06 -0800)]
Merge pull request #570 from arrbee/uniform-iterators

Uniform iterators for trees, index, and workdir

12 years agoFix iterators based on pull request feedback
Russell Belfer [Wed, 22 Feb 2012 23:15:35 +0000 (15:15 -0800)]
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.

12 years agoIterator improvements from diff implementation
Russell Belfer [Wed, 22 Feb 2012 19:22:33 +0000 (11:22 -0800)]
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.

12 years agoMerge pull request #565 from carlosmn/multimap
Vicent Martí [Wed, 22 Feb 2012 19:12:20 +0000 (11:12 -0800)]
Merge pull request #565 from carlosmn/multimap

Add config multivar support

12 years agoMerge pull request #571 from saurik/development
Vicent Martí [Wed, 22 Feb 2012 19:09:48 +0000 (11:09 -0800)]
Merge pull request #571 from saurik/development

Export parse_tag_buffer as git_tag__parse_buffer.

12 years agoExport parse_tag_buffer as git_tag__parse_buffer.
Jay Freeman (saurik) [Wed, 22 Feb 2012 04:41:08 +0000 (04:41 +0000)]
Export parse_tag_buffer as git_tag__parse_buffer.

12 years agoUniform iterators for trees, index, and workdir
Russell Belfer [Tue, 21 Feb 2012 22:46:24 +0000 (14:46 -0800)]
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.

12 years agoFix check for writing remote's fetch and push configurations
Carlos Martín Nieto [Tue, 21 Feb 2012 11:15:23 +0000 (12:15 +0100)]
Fix check for writing remote's fetch and push configurations

Fix copy-paste error

12 years agoMerge pull request #568 from carlosmn/remotes
Vicent Martí [Mon, 20 Feb 2012 19:35:08 +0000 (11:35 -0800)]
Merge pull request #568 from carlosmn/remotes

Remotes improvements

12 years agoMove git_remote_load() to git_buf
Carlos Martín Nieto [Mon, 20 Feb 2012 18:42:27 +0000 (19:42 +0100)]
Move git_remote_load() to git_buf

12 years agoAdd git_remote_save()
Carlos Martín Nieto [Mon, 20 Feb 2012 18:04:45 +0000 (19:04 +0100)]
Add git_remote_save()

12 years agoAdd git_remote_set_{fetch,push}spec()
Carlos Martín Nieto [Mon, 20 Feb 2012 17:37:07 +0000 (18:37 +0100)]
Add git_remote_set_{fetch,push}spec()

Allow setting the fetch and push refspecs, which is useful for
creating new refspecs.

12 years agoregex: fix sign warnings
Carlos Martín Nieto [Sat, 18 Feb 2012 00:32:13 +0000 (01:32 +0100)]
regex: fix sign warnings

12 years agoregex: The world uses utf-8
Carlos Martín Nieto [Sat, 18 Feb 2012 00:01:48 +0000 (01:01 +0100)]
regex: The world uses utf-8

12 years agoregex: Move the defines to a config header and include it unconditionally
Carlos Martín Nieto [Fri, 17 Feb 2012 23:54:03 +0000 (00:54 +0100)]
regex: Move the defines to a config header and include it unconditionally

12 years agoAdd GNU LGPL to COPYING
Carlos Martín Nieto [Fri, 17 Feb 2012 21:22:12 +0000 (22:22 +0100)]
Add GNU LGPL to COPYING

12 years agoAdd POSIX regex sources when needed
Carlos Martín Nieto [Fri, 17 Feb 2012 18:41:14 +0000 (19:41 +0100)]
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.

12 years agoDocument {get,set}_multivar
Carlos Martín Nieto [Sun, 5 Feb 2012 17:08:23 +0000 (18:08 +0100)]
Document {get,set}_multivar

12 years agoImplement setting multivars
Carlos Martín Nieto [Sat, 4 Feb 2012 23:29:26 +0000 (00:29 +0100)]
Implement setting multivars

12 years agoSupport getting multivars
Carlos Martín Nieto [Sat, 4 Feb 2012 22:18:30 +0000 (23:18 +0100)]
Support getting multivars

12 years agotests: add multivar read test
Carlos Martín Nieto [Wed, 1 Feb 2012 16:47:17 +0000 (17:47 +0100)]
tests: add multivar read test

12 years agoStore multivars in the multimap
Carlos Martín Nieto [Wed, 1 Feb 2012 16:21:28 +0000 (17:21 +0100)]
Store multivars in the multimap

12 years agoFirst round of config multimap changes
Carlos Martín Nieto [Mon, 23 Jan 2012 03:26:49 +0000 (04:26 +0100)]
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.

12 years agoMerge pull request #563 from schu/notes-fixup
Vicent Martí [Thu, 16 Feb 2012 12:22:56 +0000 (04:22 -0800)]
Merge pull request #563 from schu/notes-fixup

notes: fix assert

12 years agonotes: fix assert
schu [Thu, 16 Feb 2012 10:48:14 +0000 (11:48 +0100)]
notes: fix assert

Hopefully fix issue "Don't sleep and code" - #558.

Signed-off-by: schu <schu-github@schulog.org>
12 years agoMerge pull request #558 from schu/notes-api
Vicent Martí [Wed, 15 Feb 2012 19:38:40 +0000 (11:38 -0800)]
Merge pull request #558 from schu/notes-api

Notes API

12 years agoAdd git notes API
schu [Tue, 14 Feb 2012 23:33:38 +0000 (00:33 +0100)]
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>
12 years agozlib: Remove custom `git2/zlib.h` header
Vicent Martí [Wed, 15 Feb 2012 15:56:56 +0000 (16:56 +0100)]
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.

12 years agoutil: add git__ishex
schu [Tue, 14 Feb 2012 19:44:22 +0000 (20:44 +0100)]
util: add git__ishex

git__ishex allows to check if a string is a hexadecimal representation.

Signed-off-by: schu <schu-github@schulog.org>
12 years agocommit: actually allow yet to be born update_ref
schu [Tue, 14 Feb 2012 23:12:53 +0000 (00:12 +0100)]
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>
12 years agoMerge pull request #557 from schu/copyright
Vicent Martí [Mon, 13 Feb 2012 16:19:40 +0000 (08:19 -0800)]
Merge pull request #557 from schu/copyright

Update Copyright header

12 years agoUpdate Copyright header
schu [Mon, 13 Feb 2012 16:10:24 +0000 (17:10 +0100)]
Update Copyright header

Signed-off-by: schu <schu-github@schulog.org>
12 years agoMerge pull request #474 from schu/clang-unused
Vicent Martí [Mon, 13 Feb 2012 15:02:42 +0000 (07:02 -0800)]
Merge pull request #474 from schu/clang-unused

Fix "clang warning: expression result unused"

12 years agoconfig_file: fix clang sizeof-pointer-memaccess
schu [Mon, 19 Dec 2011 14:59:13 +0000 (15:59 +0100)]
config_file: fix clang sizeof-pointer-memaccess

12 years agoMerge pull request #556 from schu/fix-sign-compare
Vicent Martí [Mon, 13 Feb 2012 12:21:24 +0000 (04:21 -0800)]
Merge pull request #556 from schu/fix-sign-compare

tests-clar: fix warning sign-compare

12 years agotests-clar: fix warning sign-compare
schu [Mon, 13 Feb 2012 11:13:05 +0000 (12:13 +0100)]
tests-clar: fix warning sign-compare

Signed-off-by: schu <schu-github@schulog.org>
12 years agoMerge pull request #554 from carlosmn/revwalk-reset
Vicent Martí [Sat, 11 Feb 2012 14:44:54 +0000 (06:44 -0800)]
Merge pull request #554 from carlosmn/revwalk-reset

revwalk: unmark commits as uninteresting on reset

12 years agoodb: Proper symlink hashing
Vicent Martí [Fri, 10 Feb 2012 19:16:42 +0000 (20:16 +0100)]
odb: Proper symlink hashing

12 years agoodb: Add internal `git_odb__hashfd`
Vicent Martí [Fri, 10 Feb 2012 18:47:02 +0000 (19:47 +0100)]
odb: Add internal `git_odb__hashfd`