]> git.proxmox.com Git - libgit2.git/log
libgit2.git
11 years agoTests: Add 3 tags to resources/testrepo.
Sascha Cunz [Thu, 20 Sep 2012 22:57:21 +0000 (00:57 +0200)]
Tests: Add 3 tags to resources/testrepo.

Adjusts refs::list test (including the comments)
Adjusts objects::tags::list test

11 years agoTests::Object::Tag: Add a mechanism to test which tags were returned
Sascha Cunz [Thu, 20 Sep 2012 22:32:53 +0000 (00:32 +0200)]
Tests::Object::Tag: Add a mechanism to test which tags were returned

This patch changes the tag listing test helper to use a struct as input
parameter, which tells what we exactly expect.

As I don't think, we can rely on the fact that every os and every
filesystem will report the tags in the same order, I made this code
independent of the order that the tags are retrieved.

11 years agoTests::Object::Tag: move listing tags tests to an own file
Sascha Cunz [Thu, 20 Sep 2012 21:49:17 +0000 (23:49 +0200)]
Tests::Object::Tag: move listing tags tests to an own file

11 years agoTags: teach git_tag_list not to include the 'refs/tags/' prefix
Sascha Cunz [Thu, 20 Sep 2012 20:42:22 +0000 (22:42 +0200)]
Tags: teach git_tag_list not to include the 'refs/tags/' prefix

Since quite a while now, git_branch_foreach has learnt to list branches
without the 'refs/heads/' or 'refs/remotes' prefixes.
This patch teaches git_tag_list to do the same for listing tags.

11 years agoFix -Wmaybe-uninitialized warning
Michael Schubert [Sat, 22 Sep 2012 10:29:16 +0000 (12:29 +0200)]
Fix -Wmaybe-uninitialized warning

11 years agoMerge pull request #948 from csware/comment-fix
Russell Belfer [Fri, 21 Sep 2012 23:20:41 +0000 (16:20 -0700)]
Merge pull request #948 from csware/comment-fix

Make clear that git_odb_hashfile does not use filters

11 years agoMake clear that git_odb_hashfile does not use filters
Sven Strickroth [Fri, 21 Sep 2012 23:16:10 +0000 (01:16 +0200)]
Make clear that git_odb_hashfile does not use filters

Signed-off-by: Sven Strickroth <email@cs-ware.de>
11 years agoMerge pull request #942 from nulltoken/topic/checkout-notify-skipped
Russell Belfer [Fri, 21 Sep 2012 17:51:42 +0000 (10:51 -0700)]
Merge pull request #942 from nulltoken/topic/checkout-notify-skipped

checkout: add notification callback for skipped files

11 years agoMerge pull request #943 from csware/only-close-open-filehandles
Russell Belfer [Fri, 21 Sep 2012 17:42:53 +0000 (10:42 -0700)]
Merge pull request #943 from csware/only-close-open-filehandles

git_repository_hashfile: Only close file handle if we have a valid one

11 years agocheckout: add notification callback for skipped files
nulltoken [Wed, 19 Sep 2012 10:23:47 +0000 (12:23 +0200)]
checkout: add notification callback for skipped files

11 years agogit_repository_hashfile: Only close file handle if we have a valid one
Sven Strickroth [Thu, 20 Sep 2012 20:32:19 +0000 (22:32 +0200)]
git_repository_hashfile: Only close file handle if we have a valid one

Otherwise this throws an exception on MFC based systems.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
11 years agoFix MSVC amd64 compilation warnings
nulltoken [Thu, 20 Sep 2012 12:06:49 +0000 (14:06 +0200)]
Fix MSVC amd64 compilation warnings

11 years agocheckout: prefer mode_t type usage over int
nulltoken [Thu, 20 Sep 2012 09:41:49 +0000 (11:41 +0200)]
checkout: prefer mode_t type usage over int

11 years agoMerge pull request #887 from nulltoken/topic/reset-hard
Russell Belfer [Mon, 17 Sep 2012 18:38:33 +0000 (11:38 -0700)]
Merge pull request #887 from nulltoken/topic/reset-hard

Checkout, reset and others enhancements

11 years agocheckout: Mimic git_diff_options storage of paths
nulltoken [Mon, 17 Sep 2012 18:27:28 +0000 (20:27 +0200)]
checkout: Mimic git_diff_options storage of paths

11 years agocheckout : reduce memory usage when not filtering
nulltoken [Mon, 17 Sep 2012 08:38:57 +0000 (10:38 +0200)]
checkout : reduce memory usage when not filtering

11 years agorepository: introduce git_repository_set_head()
nulltoken [Sat, 15 Sep 2012 20:07:45 +0000 (22:07 +0200)]
repository: introduce git_repository_set_head()

11 years agorepository: introduce git_repository_set_head_detached()
nulltoken [Sat, 15 Sep 2012 20:07:09 +0000 (22:07 +0200)]
repository: introduce git_repository_set_head_detached()

11 years agorepository: introduce git_repository_detach_head()
nulltoken [Sat, 15 Sep 2012 20:03:31 +0000 (22:03 +0200)]
repository: introduce git_repository_detach_head()

11 years agorepository: fix documentation typo
nulltoken [Sat, 15 Sep 2012 10:55:37 +0000 (12:55 +0200)]
repository: fix documentation typo

11 years agorepository: separate head related tests
nulltoken [Sat, 15 Sep 2012 10:44:07 +0000 (12:44 +0200)]
repository: separate head related tests

11 years agocheckout: add test coverage of dirs and subtrees
nulltoken [Sat, 15 Sep 2012 10:23:49 +0000 (12:23 +0200)]
checkout: add test coverage of dirs and subtrees

11 years agocheckout: drop git_checkout_reference()
nulltoken [Fri, 14 Sep 2012 09:15:49 +0000 (11:15 +0200)]
checkout: drop git_checkout_reference()

11 years agocheckout: segregate checkout strategies
nulltoken [Thu, 6 Sep 2012 13:15:46 +0000 (15:15 +0200)]
checkout: segregate checkout strategies

11 years agocheckout: separate tree from index related tests
nulltoken [Fri, 14 Sep 2012 14:45:24 +0000 (16:45 +0200)]
checkout: separate tree from index related tests

11 years agoreset: add support for GIT_RESET_HARD mode
nulltoken [Sun, 19 Aug 2012 19:24:51 +0000 (21:24 +0200)]
reset: add support for GIT_RESET_HARD mode

11 years agocheckout: introduce git_checkout_index()
nulltoken [Fri, 24 Aug 2012 08:40:17 +0000 (10:40 +0200)]
checkout: introduce git_checkout_index()

11 years agocheckout: introduce git_checkout_tree()
nulltoken [Mon, 20 Aug 2012 14:56:45 +0000 (16:56 +0200)]
checkout: introduce git_checkout_tree()

11 years agoodb: don't overflow the link path buffer
Carlos Martín Nieto [Sat, 15 Sep 2012 22:10:07 +0000 (00:10 +0200)]
odb: don't overflow the link path buffer

Allocate a buffer large enough to store the path plus the terminator
instead of letting readlink write beyond the end.

11 years agoMerge pull request #860 from schu/thread-safety
Vicent Martí [Fri, 14 Sep 2012 20:45:29 +0000 (13:45 -0700)]
Merge pull request #860 from schu/thread-safety

odb_pack: make sure to search all backends

11 years agoodb_pack: fix race condition
Michael Schubert [Fri, 14 Sep 2012 19:33:50 +0000 (21:33 +0200)]
odb_pack: fix race condition

last_found is the last packfile a wanted object was found in. Since
last_found is shared among all searching threads, it might changes while
we're searching. As suggested by @arrbee, put a copy on the stack to fix
the race condition.

11 years agoMerge pull request #937 from nulltoken/fix/issue_936
Vicent Martí [Fri, 14 Sep 2012 20:33:49 +0000 (13:33 -0700)]
Merge pull request #937 from nulltoken/fix/issue_936

refs: prevent locked refs from being enumerated

11 years agorefs: prevent locked refs from being enumerated
nulltoken [Fri, 14 Sep 2012 19:36:49 +0000 (21:36 +0200)]
refs: prevent locked refs from being enumerated

Fix #936

11 years agoconfig: fix Unicode BOM detection
Carlos Martín Nieto [Fri, 14 Sep 2012 18:43:47 +0000 (20:43 +0200)]
config: fix Unicode BOM detection

Defining the BOM as a string makes the array include the
NUL-terminator, which means that the memcpy is going to check for that
as well and thus never match for a nonempty file.

Define the array as three chars, which makes the size correct.

11 years agoRemove unnecessary include
Russell Belfer [Fri, 14 Sep 2012 17:31:40 +0000 (10:31 -0700)]
Remove unnecessary include

I don't think clone.c needs in #include dirent.h and it is not
portable, so let's just get rid of it.

11 years agoMerge pull request #934 from nulltoken/patch-1
Russell Belfer [Fri, 14 Sep 2012 09:04:32 +0000 (02:04 -0700)]
Merge pull request #934 from nulltoken/patch-1

Fix MSVC compilation warnings

11 years agoFix MSVC compilation warnings
nulltoken [Fri, 14 Sep 2012 08:47:43 +0000 (11:47 +0300)]
Fix MSVC compilation warnings

11 years agoMerge pull request #933 from barrbrain/pack-iterate-objects-in-offset-order
Vicent Martí [Fri, 14 Sep 2012 06:04:16 +0000 (23:04 -0700)]
Merge pull request #933 from barrbrain/pack-iterate-objects-in-offset-order

pack: iterate objects in offset order

11 years agopack: iterate objects in offset order
David Michael Barr [Mon, 10 Sep 2012 01:48:21 +0000 (11:48 +1000)]
pack: iterate objects in offset order

Compute the ordering on demand and persist until the index is freed.

11 years agohttp: use the new unicode functions
Carlos Martín Nieto [Thu, 13 Sep 2012 22:51:29 +0000 (00:51 +0200)]
http: use the new unicode functions

The winhttp branch was based on a version before these existed, so the
build broke on Windows.

11 years agoMerge pull request #901 from carlosmn/winhttp
Vicent Martí [Fri, 14 Sep 2012 00:24:08 +0000 (17:24 -0700)]
Merge pull request #901 from carlosmn/winhttp

http: use WinHTTP on Windows

11 years agohttp: use WinHTTP on Windows
Carlos Martín Nieto [Sun, 26 Aug 2012 17:22:34 +0000 (19:22 +0200)]
http: use WinHTTP on Windows

Wondows has its own HTTP library. Use that one when possible instead of
our own.

As we don't depend on them anymore, remove the http-parser library from
the Windows build, as well as the search for OpenSSL.

11 years agoMerge pull request #931 from scunz/error_text
Vicent Martí [Thu, 13 Sep 2012 21:35:41 +0000 (14:35 -0700)]
Merge pull request #931 from scunz/error_text

Fix error text s/buffer too long/buffer too short/

11 years agoFix error text s/buffer too long/buffer too short/
Sascha Cunz [Thu, 13 Sep 2012 21:30:31 +0000 (23:30 +0200)]
Fix error text s/buffer too long/buffer too short/

11 years agoMerge pull request #929 from arrbee/diff-iter-fixes
Vicent Martí [Thu, 13 Sep 2012 21:20:43 +0000 (14:20 -0700)]
Merge pull request #929 from arrbee/diff-iter-fixes

Fix problems in diff iterator record chaining

11 years agoForgot to reset hunk & line between files
Russell Belfer [Thu, 13 Sep 2012 21:15:07 +0000 (14:15 -0700)]
Forgot to reset hunk & line between files

The last change tweaked the way we use the hunk_curr pointer
during iteration, but failed to reset the value back to NULL
when switching files.

11 years agoMerge pull request #930 from nulltoken/fix/tracking-without-fetch-refspec
Vicent Martí [Thu, 13 Sep 2012 20:35:04 +0000 (13:35 -0700)]
Merge pull request #930 from nulltoken/fix/tracking-without-fetch-refspec

refspec: No remote tracking ref from a fetchspec-less remote

11 years agorefspec: No remote tracking ref from a fetchspec-less remote
nulltoken [Thu, 13 Sep 2012 20:22:40 +0000 (22:22 +0200)]
refspec: No remote tracking ref from a fetchspec-less remote

11 years agoFix problems in diff iterator record chaining
Russell Belfer [Thu, 13 Sep 2012 20:17:38 +0000 (13:17 -0700)]
Fix problems in diff iterator record chaining

There is a bug in building the linked list of line records in the
diff iterator and also an off by one element error in the hunk
counts.  This fixes both of these, adds some test data with more
complex sets of hunk and line diffs to exercise this code better.

11 years agoMerge pull request #927 from arrbee/hashfile-with-filters
Vicent Martí [Thu, 13 Sep 2012 16:24:12 +0000 (09:24 -0700)]
Merge pull request #927 from arrbee/hashfile-with-filters

Add git_repository_hashfile to hash with filters

11 years agoMerge pull request #928 from barrbrain/odb-pack-stat-less
Vicent Martí [Thu, 13 Sep 2012 16:07:06 +0000 (09:07 -0700)]
Merge pull request #928 from barrbrain/odb-pack-stat-less

odb_pack: try lookup before refreshing packs

11 years agoFix -Wuninitialized warning
Michael Schubert [Thu, 13 Sep 2012 15:57:45 +0000 (17:57 +0200)]
Fix -Wuninitialized warning

11 years agoodb_pack: try lookup before refreshing packs
David Michael Barr [Wed, 12 Sep 2012 04:26:31 +0000 (14:26 +1000)]
odb_pack: try lookup before refreshing packs

This reduces the rate of syscalls for the common case of sequences of
object reads from the same pack.

Best of 5 timings for libgit2_clar before this patch:
real    0m5.375s
user    0m0.392s
sys     0m3.564s

After applying this patch:
real    0m5.285s
user    0m0.356s
sys     0m3.544s

0.6% improvement in system time.
9.2% improvement in user time.
1.7% improvement in elapsed time.

Confirmed a 0.6% reduction in number of system calls with strace.

Expect greater improvement for graph-traversal with large packs.

11 years agoAdd tests and improve param checks
Russell Belfer [Wed, 12 Sep 2012 00:26:21 +0000 (17:26 -0700)]
Add tests and improve param checks

Fixed some minor `git_repository_hashfile` issues:

- Fixed incorrect doc (saying that repo could be NULL)
- Added checking of object type value to acceptable ones
- Added more tests for various parameter permutations

11 years agoAdd git_repository_hashfile to hash with filters
Russell Belfer [Fri, 7 Sep 2012 20:27:49 +0000 (13:27 -0700)]
Add git_repository_hashfile to hash with filters

The existing `git_odb_hashfile` does not apply text filtering
rules because it doesn't have a repository context to evaluate
the correct rules to apply.  This adds a new hashfile function
that will apply repository-specific filters (based on config,
attributes, and filename) before calculating the hash.

11 years agoMerge pull request #920 from scunz/mergebase_const
Vicent Martí [Tue, 11 Sep 2012 21:56:13 +0000 (14:56 -0700)]
Merge pull request #920 from scunz/mergebase_const

git_mergebase: Constness-Fix for consistency

11 years agoMerge branch 'diff-crlf-filters' into development
Vicent Marti [Tue, 11 Sep 2012 21:38:16 +0000 (23:38 +0200)]
Merge branch 'diff-crlf-filters' into development

11 years agoProperly handle p_reads
Vicent Marti [Tue, 11 Sep 2012 21:05:24 +0000 (23:05 +0200)]
Properly handle p_reads

11 years agoFix diff binary file detection
Russell Belfer [Tue, 11 Sep 2012 19:03:33 +0000 (12:03 -0700)]
Fix diff binary file detection

In the process of adding tests for the max file size threshold
(which treats files over a certain size as binary) there seem to
be a number of problems in the new code with detecting binaries.
This should fix those up, as well as add a test for the file
size threshold stuff.

Also, this un-deprecates `GIT_DIFF_LINE_ADD_EOFNL`, since I
finally found a legitimate situation where it would be returned.

11 years agoMerge pull request #924 from schu/cache-fix-race-cond
Vicent Martí [Tue, 11 Sep 2012 18:04:09 +0000 (11:04 -0700)]
Merge pull request #924 from schu/cache-fix-race-cond

cache: fix race condition

11 years agocache: fix race condition
Michael Schubert [Mon, 10 Sep 2012 19:29:07 +0000 (21:29 +0200)]
cache: fix race condition

Example: a cached node is owned only by the cache (refcount == 1).
Thread A holds the lock and determines that the entry which should get
cached equals the node (git_oid_cmp(&node->oid, &entry->oid) == 0).
It frees the given entry to instead return the cached node to the user
(entry = node). Now, before Thread A happens to increment the refcount
of the node *outside* the cache lock, Thread B tries to store another
entry and hits the slot of the node before, decrements its refcount and
frees it *before* Thread A gets a chance to increment for the user.

git_cached_obj_incref(entry);

git_mutex_lock(&cache->lock);
{
git_cached_obj *node = cache->nodes[hash & cache->size_mask];

if (node == NULL) {
cache->nodes[hash & cache->size_mask] = entry;
} else if (git_oid_cmp(&node->oid, &entry->oid) == 0) {
git_cached_obj_decref(entry, cache->free_obj);
entry = node;
} else {
git_cached_obj_decref(node, cache->free_obj);

// Thread B is here

cache->nodes[hash & cache->size_mask] = entry;
}
}
git_mutex_unlock(&cache->lock);

// Thread A is here

/* increase the refcount again, because we are
 * returning it to the user */
git_cached_obj_incref(entry);

11 years agoMerge pull request #914 from authmillenon/index-fixes
Russell Belfer [Tue, 11 Sep 2012 06:19:00 +0000 (23:19 -0700)]
Merge pull request #914 from authmillenon/index-fixes

Fix logical error in git_index_set_caps

11 years agoMerge pull request #906 from nulltoken/topic/git_reference_peel
Russell Belfer [Tue, 11 Sep 2012 06:15:54 +0000 (23:15 -0700)]
Merge pull request #906 from nulltoken/topic/git_reference_peel

git reference peel

11 years agoReorg internal odb read header and object lookup
Russell Belfer [Mon, 10 Sep 2012 19:24:05 +0000 (12:24 -0700)]
Reorg internal odb read header and object lookup

Often `git_odb_read_header` will "fail" and have to read the
entire object into memory instead of just the header.  When this
happens, the object is loaded and then disposed of immediately,
which makes it difficult to efficiently use the header information
to decide if the object should be loaded (since attempting to do
so will often result in loading the object twice).

This commit takes the existing code and reorganizes it to have
two new functions:

- `git_odb__read_header_or_object` which acts just like the old
  read header function except that it returns the object, too, if
  it was forced to load the whole thing.  It then becomes the
  callers responsibility to free the `git_odb_object`.
- `git_object__from_odb_object` which was extracted from the old
  `git_object_lookup` and creates a subclass of `git_object` from
  an existing `git_odb_object` (separating the ODB lookup from the
  `git_object` creation).  This allows you to use the first header
  reading function efficiently without instantiating the
  `git_odb_object` twice.

There is no net change to the behavior of any of the existing
functions, but this allows internal code to tap into the ODB
lookup and object creation to be more efficient.

11 years agoMove diff max_size to public API
Russell Belfer [Mon, 10 Sep 2012 18:49:12 +0000 (11:49 -0700)]
Move diff max_size to public API

This commit adds a max_size value in the public `git_diff_options`
structure so that the user can automatically flag blobs over a
certain size as binary regardless of other properties.

Also, and perhaps more importantly, this moves binary detection
to be as early as possible in the diff traversal inner loop and
makes sure that we stop loading objects as soon as we decide that
they are binary.

11 years agoReplace git_diff_iterator_num_files with progress
Russell Belfer [Mon, 10 Sep 2012 16:59:14 +0000 (09:59 -0700)]
Replace git_diff_iterator_num_files with progress

The `git_diff_iterator_num_files` API was problematic, since we
don't actually know the exact number of files to be iterated over
until we load those files into memory.  This replaces it with a
new `git_diff_iterator_progress` API that goes from 0 to 1, and
moves and renamed the old API for the internal places that can
tolerate a max value instead of an exact value.

11 years agogit_mergebase: Constness-Fix for consistency
Sascha Cunz [Sun, 9 Sep 2012 13:53:57 +0000 (15:53 +0200)]
git_mergebase: Constness-Fix for consistency

11 years agoAdd missing accessor for fetchRecurseSubmodules
Russell Belfer [Fri, 7 Sep 2012 22:49:08 +0000 (15:49 -0700)]
Add missing accessor for fetchRecurseSubmodules

When `git_submodule` became an opaque structure, I forgot to add
accessor functions for the fetchRecurseSubmodules config setting.
This fixes that.

11 years agoClean up blob diff path
Russell Belfer [Thu, 6 Sep 2012 22:45:50 +0000 (15:45 -0700)]
Clean up blob diff path

Previously when diffing blobs, the diff code just ran with a NULL
repository object. Of course, that's not necessary and the test
for a NULL repo was confusing. This makes the blob diff run with
the repo that contains the blobs and clarifies the test that it
is possible to be diffing data where the path is unknown.

11 years agoImplement filters for status/diff blobs
Russell Belfer [Wed, 5 Sep 2012 22:00:40 +0000 (15:00 -0700)]
Implement filters for status/diff blobs

This adds support to diff and status for running filters (a la crlf)
on blobs in the workdir before computing SHAs and before generating
text diffs.  This ended up being a bit more code change than I had
thought since I had to reorganize some of the diff logic to minimize
peak memory use when filtering blobs in a diff.

This also adds a cap on the maximum size of data that will be loaded
to diff.  I set it at 512Mb which should match core git.  Right now
it is a #define in src/diff.h but it could be moved into the public
API if desired.

11 years agoBetter header comments
Russell Belfer [Fri, 31 Aug 2012 23:39:30 +0000 (16:39 -0700)]
Better header comments

11 years agoAlternate test for autocrlf with status
Russell Belfer [Fri, 31 Aug 2012 22:53:47 +0000 (15:53 -0700)]
Alternate test for autocrlf with status

I couldn't get the last failing test to actually fail.  This
is a different test suggested by @nulltoken which should fail.

11 years agoTest case to reproduce issue #690.
pontusm [Sun, 13 May 2012 08:11:13 +0000 (10:11 +0200)]
Test case to reproduce issue #690.
Staged file status does not handle CRLF correctly. Ensures that the test repo has core.autocrlf=true for the test to fail.

11 years agoobject: make git_object_peel() test more readable
nulltoken [Tue, 4 Sep 2012 09:17:46 +0000 (11:17 +0200)]
object: make git_object_peel() test more readable

11 years agocheckout: fix documentation code alignment
nulltoken [Mon, 20 Aug 2012 10:30:54 +0000 (12:30 +0200)]
checkout: fix documentation code alignment

11 years agocheckout: cleanup misplaced declaration
nulltoken [Mon, 20 Aug 2012 09:26:02 +0000 (11:26 +0200)]
checkout: cleanup misplaced declaration

11 years agoerrors: deploy GIT_EBAREREPO usage
nulltoken [Wed, 22 Aug 2012 09:30:55 +0000 (11:30 +0200)]
errors: deploy GIT_EBAREREPO usage

11 years agoerrors: introduce GIT_EBAREREPO
nulltoken [Wed, 22 Aug 2012 08:47:25 +0000 (10:47 +0200)]
errors: introduce GIT_EBAREREPO

11 years agorefs: introduce git_reference_peel()
nulltoken [Fri, 24 Aug 2012 19:30:45 +0000 (21:30 +0200)]
refs: introduce git_reference_peel()

Fix #530

11 years agoodb: mark unused variable
Michael Schubert [Thu, 6 Sep 2012 09:35:09 +0000 (11:35 +0200)]
odb: mark unused variable

11 years agoMerge pull request #900 from pwkelley/development
Vicent Martí [Thu, 6 Sep 2012 08:17:23 +0000 (01:17 -0700)]
Merge pull request #900 from pwkelley/development

Expose a malloc function to 3rd party ODB backends

11 years agoMerge pull request #912 from schu/netops-ssl-error
Vicent Martí [Thu, 6 Sep 2012 08:15:14 +0000 (01:15 -0700)]
Merge pull request #912 from schu/netops-ssl-error

netops: be more careful with SSL errors

11 years agodiff: Cleanup documentation and printf compat
Vicent Marti [Thu, 6 Sep 2012 08:13:38 +0000 (10:13 +0200)]
diff: Cleanup documentation and printf compat

11 years agoMerge remote-tracking branch 'arrbee/diff-iterator' into development
Vicent Marti [Thu, 6 Sep 2012 08:08:14 +0000 (10:08 +0200)]
Merge remote-tracking branch 'arrbee/diff-iterator' into development

11 years agoMerge pull request #917 from arrbee/test-issue-835
Russell Belfer [Wed, 5 Sep 2012 23:31:44 +0000 (16:31 -0700)]
Merge pull request #917 from arrbee/test-issue-835

Test for gitmodules only submodule def

11 years agoTest for gitmodules only submodule def
Russell Belfer [Wed, 5 Sep 2012 22:54:32 +0000 (15:54 -0700)]
Test for gitmodules only submodule def

This should confirm that issue #835 is fixed where a submodule that
is only declared in the .gitmodules file was not accessible via the
submodule APIs.

11 years agoFix comments and a minor bug
Russell Belfer [Thu, 30 Aug 2012 23:39:05 +0000 (16:39 -0700)]
Fix comments and a minor bug

This adds better header comments and also fixes a bug in one of
simple APIs that tells the number of lines in the current hunk.

11 years agoDiff iterators
Russell Belfer [Thu, 30 Aug 2012 21:24:16 +0000 (14:24 -0700)]
Diff iterators

This refactors the diff output code so that an iterator object
can be used to traverse and generate the diffs, instead of just
the `foreach()` style with callbacks.  The code has been rearranged
so that the two styles can still share most functions.

This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses
that as a common error code for marking the end of iteration when
using a iterator style of object.

11 years agoMerge pull request #856 from libgit2/utf8-win
Vicent Martí [Tue, 4 Sep 2012 21:19:24 +0000 (14:19 -0700)]
Merge pull request #856 from libgit2/utf8-win

Windows: Perform UTF-8 path conversion on the Stack

11 years agobranch: Add missing include
Vicent Marti [Tue, 4 Sep 2012 20:57:31 +0000 (22:57 +0200)]
branch: Add missing include

11 years agoodb: pass the user's data pointer correctly in foreach
Carlos Martín Nieto [Tue, 4 Sep 2012 19:42:00 +0000 (21:42 +0200)]
odb: pass the user's data pointer correctly in foreach

11 years agotravis: use a valgrind suppressions file
Carlos Martín Nieto [Tue, 4 Sep 2012 13:54:33 +0000 (15:54 +0200)]
travis: use a valgrind suppressions file

We don't care about the supposed zlib errors, and the leak from
giterr_set isn't interesting, as it gets freed each time an error is
set.

Give valgrind a suppressions file so it doesn't tell us about them.

11 years agoclar: Clear errors on shutdown
Vicent Marti [Tue, 4 Sep 2012 13:40:05 +0000 (15:40 +0200)]
clar: Clear errors on shutdown

11 years agoFix logical error in git_index_set_caps
authmillenon [Tue, 4 Sep 2012 10:07:51 +0000 (12:07 +0200)]
Fix logical error in git_index_set_caps

11 years agoMerge pull request #913 from nulltoken/fix/warnings
Vicent Martí [Tue, 4 Sep 2012 08:06:34 +0000 (01:06 -0700)]
Merge pull request #913 from nulltoken/fix/warnings

Fix MSVC compilation warnings

11 years agoFix MSVC compilation warnings
nulltoken [Tue, 4 Sep 2012 08:01:18 +0000 (10:01 +0200)]
Fix MSVC compilation warnings

11 years agonetops: be more careful with SSL errors
Michael Schubert [Tue, 28 Aug 2012 19:58:10 +0000 (21:58 +0200)]
netops: be more careful with SSL errors

SSL_get_error() allows to receive a result code for various SSL
operations. Depending on the return value (see man (3) SSL_get_error)
there might be additional information in the OpenSSL error queue. Return
the queued message if available, otherwise set an error message
corresponding to the return code.

11 years agonetops: continue writing on SSL_ERROR_WANT_WRITE
Michael Schubert [Mon, 3 Sep 2012 22:13:59 +0000 (00:13 +0200)]
netops: continue writing on SSL_ERROR_WANT_WRITE

11 years agoIgnore tags file
Ben Straub [Thu, 30 Aug 2012 14:55:36 +0000 (07:55 -0700)]
Ignore tags file

11 years agoMerge pull request #908 from nulltoken/bug/repo_reinit_init
Russell Belfer [Wed, 29 Aug 2012 18:01:46 +0000 (11:01 -0700)]
Merge pull request #908 from nulltoken/bug/repo_reinit_init

repository: add failing repo initialization test