]> git.proxmox.com Git - libgit2.git/log
libgit2.git
9 years agoHook up the custom_headers to the http transport
Matt Burke [Tue, 8 Sep 2015 18:00:37 +0000 (14:00 -0400)]
Hook up the custom_headers to the http transport

9 years agoTell the git_transport about the custom_headers
Matt Burke [Tue, 8 Sep 2015 17:53:41 +0000 (13:53 -0400)]
Tell the git_transport about the custom_headers

9 years agoAdd custom_headers to git_push_options
Matt Burke [Tue, 8 Sep 2015 14:18:54 +0000 (10:18 -0400)]
Add custom_headers to git_push_options

9 years agoDrop extra_http_headers from git_remote
Matt Burke [Tue, 8 Sep 2015 17:34:42 +0000 (13:34 -0400)]
Drop extra_http_headers from git_remote

9 years agoAllow the world to set HTTP headers for remotes
Matt Burke [Fri, 4 Sep 2015 13:36:50 +0000 (09:36 -0400)]
Allow the world to set HTTP headers for remotes

9 years agoPull extra_http_headers from the git_remote
Matt Burke [Fri, 4 Sep 2015 13:20:45 +0000 (09:20 -0400)]
Pull extra_http_headers from the git_remote

9 years agoPut the extra headers on the connection_data instead
Matt Burke [Fri, 4 Sep 2015 13:18:32 +0000 (09:18 -0400)]
Put the extra headers on the connection_data instead

9 years agoAdd more headers to HTTP requests
Matt Burke [Fri, 4 Sep 2015 12:56:26 +0000 (08:56 -0400)]
Add more headers to HTTP requests

9 years agoconfig: correct documentation for non-existent config file
Carlos Martín Nieto [Thu, 3 Sep 2015 09:38:21 +0000 (11:38 +0200)]
config: correct documentation for non-existent config file

9 years agoMerge pull request #3402 from ethomson/faster_diff
Carlos Martín Nieto [Tue, 1 Sep 2015 00:26:11 +0000 (02:26 +0200)]
Merge pull request #3402 from ethomson/faster_diff

Provide path matching in the iterators (for faster diffs)

9 years agoiterator: better document GIT_DIFF_DISABLE_PATHSPEC_MATCH
Edward Thomson [Mon, 31 Aug 2015 23:41:43 +0000 (19:41 -0400)]
iterator: better document GIT_DIFF_DISABLE_PATHSPEC_MATCH

9 years agoiterator test: handle case (in)sensitivity
Edward Thomson [Mon, 31 Aug 2015 16:12:21 +0000 (12:12 -0400)]
iterator test: handle case (in)sensitivity

9 years agoiterator test: use new iter opts in fifo test
Edward Thomson [Sun, 30 Aug 2015 23:33:18 +0000 (19:33 -0400)]
iterator test: use new iter opts in fifo test

9 years agoiterator: saner pathlist matching for idx iterator
Edward Thomson [Sun, 30 Aug 2015 23:25:47 +0000 (19:25 -0400)]
iterator: saner pathlist matching for idx iterator

Some nicer refactoring for index iteration walks.

The index iterator doesn't binary search through the pathlist space,
since it lacks directory entries, and would have to binary search
each index entry and all its parents (eg, when presented with an index
entry of `foo/bar/file.c`, you would have to look in the pathlist for
`foo/bar/file.c`, `foo/bar` and `foo`).  Since the index entries and the
pathlist are both nicely sorted, we walk the index entries in lockstep
with the pathlist like we do for other iteration/diff/merge walks.

9 years agodiff: drop `FILELIST_MATCH`
Edward Thomson [Sun, 30 Aug 2015 23:10:00 +0000 (19:10 -0400)]
diff: drop `FILELIST_MATCH`

Now that non-pathspec matching diffs are implemented at the iterator
level, drop `FILELIST_MATCH`ing.

9 years agostatus test: brackets are now literal
Edward Thomson [Sun, 30 Aug 2015 22:57:06 +0000 (18:57 -0400)]
status test: brackets are now literal

9 years agocheckout: use pathlist-based iterators
Edward Thomson [Sun, 30 Aug 2015 22:56:39 +0000 (18:56 -0400)]
checkout: use pathlist-based iterators

9 years agotree_iterator: use a pathlist
Edward Thomson [Sun, 30 Aug 2015 22:35:57 +0000 (18:35 -0400)]
tree_iterator: use a pathlist

9 years agodiff: use new iterator pathlist handling
Edward Thomson [Sun, 30 Aug 2015 21:06:26 +0000 (17:06 -0400)]
diff: use new iterator pathlist handling

When using literal pathspecs in diff with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`
turn on the faster iterator pathlist handling.

Updates iterator pathspecs to include directory prefixes (eg, `foo/`)
for compatibility with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`.

9 years agoMerge pull request #3401 from phatblat/pb/doc-warning
Carlos Martín Nieto [Sun, 30 Aug 2015 13:47:49 +0000 (15:47 +0200)]
Merge pull request #3401 from phatblat/pb/doc-warning

Escape @ in doc comment

9 years agoEscape @ in doc comment
Ben Chatelain [Sat, 29 Aug 2015 23:46:34 +0000 (17:46 -0600)]
Escape @ in doc comment

9 years agodiff: better document GIT_DIFF_PATHSPEC_DISABLE
Edward Thomson [Sat, 29 Aug 2015 00:06:18 +0000 (20:06 -0400)]
diff: better document GIT_DIFF_PATHSPEC_DISABLE

Document that `GIT_DIFF_PATHSPEC_DISABLE` is not necessarily about
explicit path matching, but also includes matching of directory
names.  Enforce this in a test.

9 years agoMerge pull request #3352 from ethomson/hidden
Edward Thomson [Fri, 28 Aug 2015 23:30:08 +0000 (19:30 -0400)]
Merge pull request #3352 from ethomson/hidden

win32: ensure hidden files can be staged

9 years agoiterator: sort subdirs properly with pathlist
Edward Thomson [Fri, 28 Aug 2015 22:30:39 +0000 (18:30 -0400)]
iterator: sort subdirs properly with pathlist

When given a pathlist, don't assume that directories sort before
files.  Walk through any list of entries sorting before us to make
sure that we've exhausted all entries that *aren't* directories.

Eg, if we're searching for 'foo/bar', and we have a 'foo.c', keep
advancing the pathlist to keep looking for an entry prefixed with
'foo/'.

9 years agoracy-git: TODO to use improved diffing
Edward Thomson [Wed, 29 Jul 2015 01:04:11 +0000 (20:04 -0500)]
racy-git: TODO to use improved diffing

9 years agoMove filelist into the iterator handling itself.
Edward Thomson [Wed, 29 Jul 2015 00:55:37 +0000 (19:55 -0500)]
Move filelist into the iterator handling itself.

9 years agoiterator: use an options struct instead of args
Edward Thomson [Tue, 28 Jul 2015 16:41:27 +0000 (11:41 -0500)]
iterator: use an options struct instead of args

9 years agoMerge pull request #3399 from arthurschreiber/patch-8
Edward Thomson [Wed, 26 Aug 2015 21:08:35 +0000 (17:08 -0400)]
Merge pull request #3399 from arthurschreiber/patch-8

Fix a typo [ci skip]

9 years agoFix a typo [ci skip]
Arthur Schreiber [Wed, 26 Aug 2015 21:08:03 +0000 (23:08 +0200)]
Fix a typo [ci skip]

9 years agoMerge pull request #3396 from ethomson/copying
Carlos Martín Nieto [Tue, 25 Aug 2015 17:09:38 +0000 (19:09 +0200)]
Merge pull request #3396 from ethomson/copying

COPYING: include winhttp definition copyright

9 years agoCOPYING: include winhttp definition copyright
Edward Thomson [Tue, 25 Aug 2015 15:20:37 +0000 (11:20 -0400)]
COPYING: include winhttp definition copyright

Include the copyright notice from the deps/winhttp/ sources.  Move the
LGPL to the bottom of the file (since multiple dependencies are LGPL
licensed) and include the actual copyright notices from the regex sources.

9 years agoMerge pull request #3355 from palmin/palmin/fix-2830
Carlos Martín Nieto [Mon, 24 Aug 2015 22:39:58 +0000 (00:39 +0200)]
Merge pull request #3355 from palmin/palmin/fix-2830

Include the 4 characters not recognised as hex-number in parse_len

9 years agoMerge pull request #3388 from libgit2/cmn/smart-callbacks
Carlos Martín Nieto [Thu, 20 Aug 2015 12:54:22 +0000 (14:54 +0200)]
Merge pull request #3388 from libgit2/cmn/smart-callbacks

transport: provide a way to get the callbacks

9 years agoMerge pull request #3389 from libgit2/cmn/old-security
Carlos Martín Nieto [Thu, 20 Aug 2015 12:53:51 +0000 (14:53 +0200)]
Merge pull request #3389 from libgit2/cmn/old-security

CMake: fall back to OpenSSL on older OS X

9 years agoCMake: fall back to OpenSSL on older OS X
Carlos Martín Nieto [Wed, 19 Aug 2015 10:53:31 +0000 (12:53 +0200)]
CMake: fall back to OpenSSL on older OS X

Starting at OS X 10.8, the Security framework offers some functions
which are unified across OS X and iOS. These are the functions that we
use.

Older versions of OS X do not have these functions and we fail to
compile. In these situations, fall back to using OpenSSL for our TLS
stream instead.

9 years agocred: add a free function wrapper
Carlos Martín Nieto [Tue, 18 Aug 2015 22:46:28 +0000 (00:46 +0200)]
cred: add a free function wrapper

9 years agotransport: provide a way to get the callbacks
Carlos Martín Nieto [Tue, 18 Aug 2015 18:55:59 +0000 (20:55 +0200)]
transport: provide a way to get the callbacks

libgit2 implementations of smart subtransports can simply reach through
the structure, but external implementors cannot.

Add these two functions as a way for the smart subtransports to get the
callbacks as set by the user.

9 years agoMerge pull request #3387 from leoyanggit/build_warning
Carlos Martín Nieto [Tue, 18 Aug 2015 14:09:28 +0000 (16:09 +0200)]
Merge pull request #3387 from leoyanggit/build_warning

Fix build warning: implicit declaration of function ‘git_transaction_config_new’

9 years agoFix build warning: implicit declaration of function ‘git_transaction_config_new’
Leo Yang [Mon, 17 Aug 2015 19:18:47 +0000 (15:18 -0400)]
Fix build warning: implicit declaration of function ‘git_transaction_config_new’

9 years agoInclude the 4 characters not recognised as hex-number when setting error in parse_len
Anders Borum [Wed, 5 Aug 2015 16:50:25 +0000 (18:50 +0200)]
Include the 4 characters not recognised as hex-number when setting error in parse_len

9 years agoMerge pull request #3377 from dleehr/fix-push-cb
Edward Thomson [Sat, 15 Aug 2015 20:46:32 +0000 (13:46 -0700)]
Merge pull request #3377 from dleehr/fix-push-cb

Fix bug in git_smart__push: push_transfer_progress cb is only called at end

9 years agoMerge pull request #3384 from libgit2/cmn/regex-nofail
Edward Thomson [Sat, 15 Aug 2015 20:43:46 +0000 (13:43 -0700)]
Merge pull request #3384 from libgit2/cmn/regex-nofail

diff: don't error out on an invalid regex

9 years agoMerge pull request #3383 from libgit2/cmn/http-error
Edward Thomson [Sat, 15 Aug 2015 20:42:51 +0000 (13:42 -0700)]
Merge pull request #3383 from libgit2/cmn/http-error

http: propagate the credentials callback's error code

9 years agodiff: don't error out on an invalid regex
Carlos Martín Nieto [Sat, 15 Aug 2015 16:46:38 +0000 (18:46 +0200)]
diff: don't error out on an invalid regex

When parsing user-provided regex patterns for functions, we must not
fail to provide a diff just because a pattern is not well
formed. Ignore it instead.

9 years agohttp: propagate the credentials callback's error code
Carlos Martín Nieto [Sat, 15 Aug 2015 16:15:23 +0000 (18:15 +0200)]
http: propagate the credentials callback's error code

When we ask for credentials, the user may choose to return EUSER to
indicate that an error has happened on its end and it wants to be given
back control.

We must therefore pass that back to the user instead of mentioning that
it was on_headers_complete() that returned an error code. Since we can,
we return the exact error code from the user (other than PASSTHROUGH)
since it doesn't cost anything, though using other error codes aren't
recommended.

9 years agoMerge pull request #3362 from libgit2/cmn/curl-proxyauth-any
Carlos Martín Nieto [Fri, 14 Aug 2015 20:12:59 +0000 (22:12 +0200)]
Merge pull request #3362 from libgit2/cmn/curl-proxyauth-any

curl: use the most secure auth method for the proxy

9 years agoFix bug in git_smart__push: push_transfer_progress cb is never called
Dan Leehr [Fri, 14 Aug 2015 02:52:52 +0000 (22:52 -0400)]
Fix bug in git_smart__push: push_transfer_progress cb is never called

The conditional checked cbs->transfer_progress then used the value in cbs->push_transfer_progress. In both cases it should be push_transfer_progress

9 years agoMerge pull request #3168 from libgit2/cmn/config-tx
Edward Thomson [Thu, 13 Aug 2015 17:22:50 +0000 (10:22 -0700)]
Merge pull request #3168 from libgit2/cmn/config-tx

Locking and transactional/atomic updates for config

9 years agoMerge pull request #3372 from libgit2/cmn/mirror-refspec
Edward Thomson [Wed, 12 Aug 2015 15:46:50 +0000 (08:46 -0700)]
Merge pull request #3372 from libgit2/cmn/mirror-refspec

remote: don't confuse tag auto-follow rules with refspec matching

9 years agoconfig: perform unlocking via git_transaction
Carlos Martín Nieto [Sun, 12 Jul 2015 10:50:23 +0000 (12:50 +0200)]
config: perform unlocking via git_transaction

This makes the API for commiting or discarding changes the same as for
references.

9 years agoconfig: expose locking via the main API
Carlos Martín Nieto [Mon, 1 Jun 2015 18:02:23 +0000 (20:02 +0200)]
config: expose locking via the main API

This lock/unlock pair allows for the cller to lock a configuration file
to avoid concurrent operations.

It also allows for a transactional approach to updating a configuration
file. If multiple updates must be made atomically, they can be done
while the config is locked.

9 years agoconfig: implement basic transactional support
Carlos Martín Nieto [Mon, 1 Jun 2015 17:17:03 +0000 (19:17 +0200)]
config: implement basic transactional support

When a configuration file is locked, any updates made to it will be done
to the in-memory copy of the file. This allows for multiple updates to
happen while we hold the lock, preventing races during complex
config-file manipulation.

9 years agoconfig: write the modified file to memory
Carlos Martín Nieto [Mon, 1 Jun 2015 06:45:15 +0000 (08:45 +0200)]
config: write the modified file to memory

Instead of writing into the filebuf directly, make the functions to
write the modified config file write into a buffer which can then be
dumped into the lockfile for committing.

This allows us to re-use the same code for modifying a locked
configuration, as we can simply skip the last step of dumping the data
to disk.

9 years agoMerge pull request #3363 from ripdev/master
Carlos Martín Nieto [Wed, 12 Aug 2015 02:04:39 +0000 (04:04 +0200)]
Merge pull request #3363 from ripdev/master

Forcing libssh2 lib location in CMake

9 years agoremote: don't confuse tag auto-follow rules with refspec matching
Carlos Martín Nieto [Tue, 11 Aug 2015 20:51:53 +0000 (22:51 +0200)]
remote: don't confuse tag auto-follow rules with refspec matching

When we're looking to update a tag, we can't stop if the tag auto-follow
rules don't say to update it. The tag might still match the refspec we
were given.

9 years agoremote: add failing test for a mirror refspec
Carlos Martín Nieto [Tue, 11 Aug 2015 18:44:19 +0000 (20:44 +0200)]
remote: add failing test for a mirror refspec

While we download the remote's remote-tracking branches, we don't
download the tag. This points to the tag auto-follow rules interfering
with the refspec.

9 years agocurl: use the most secure auth method for the proxy
Carlos Martín Nieto [Thu, 6 Aug 2015 11:02:35 +0000 (13:02 +0200)]
curl: use the most secure auth method for the proxy

When curl uses a proxy, it will only use Basic unless we prompt it to
try to use the most secure on it has available.

This is something which git did recently, and it seems like a good idea.

9 years agoForcing libssh2 lib location
Slava Karpenko [Thu, 6 Aug 2015 08:06:17 +0000 (11:06 +0300)]
Forcing libssh2 lib location

OS X may have libssh2 in diff locations, so CHECK_LIBRARY_EXISTS may check the wrong lib; forcing it to use a found directory.

9 years agoMerge pull request #3360 from nodegit/master-duplicate-basename-fix
Edward Thomson [Wed, 5 Aug 2015 21:26:43 +0000 (16:26 -0500)]
Merge pull request #3360 from nodegit/master-duplicate-basename-fix

Fix duplicate basenames to support older VS on master

9 years agoFix duplicate basenames to support older VS
John Haley [Wed, 5 Aug 2015 17:19:06 +0000 (10:19 -0700)]
Fix duplicate basenames to support older VS

With Visual Studio versions 2008 and older they ignore the full path to files and only check
the basename of the file to find a collision. Additionally, having duplicate basenames can break
other build tools like GYP.

This fixes https://github.com/libgit2/libgit2/issues/3356

9 years agoMerge pull request #3351 from ethomson/error_buf
Carlos Martín Nieto [Tue, 4 Aug 2015 09:18:21 +0000 (11:18 +0200)]
Merge pull request #3351 from ethomson/error_buf

Error handling: use buffers, improved OOM handling

9 years agoerrors: tighten up git_error_state OOMs a bit more
Edward Thomson [Mon, 3 Aug 2015 21:50:27 +0000 (16:50 -0500)]
errors: tighten up git_error_state OOMs a bit more

When an error state is an OOM, make sure that we treat is specially
and do not try to free it.

9 years agowin32: ensure hidden files can be staged
Edward Thomson [Mon, 3 Aug 2015 22:48:33 +0000 (17:48 -0500)]
win32: ensure hidden files can be staged

9 years agoMerge remote-tracking branches 'upstream/pr/3323' and 'upstream/pr/3329'
Edward Thomson [Mon, 3 Aug 2015 20:02:02 +0000 (15:02 -0500)]
Merge remote-tracking branches 'upstream/pr/3323' and 'upstream/pr/3329'

9 years agoTest: check restored oom error points to static buffer
Michael Procter [Mon, 27 Jul 2015 09:13:49 +0000 (10:13 +0100)]
Test: check restored oom error points to static buffer

9 years agoMake giterr_restore aware of g_git_oom_error
Michael Procter [Mon, 27 Jul 2015 09:10:18 +0000 (10:10 +0100)]
Make giterr_restore aware of g_git_oom_error

Allow restoring a previously captured oom error, by
detecting when the captured message pointer points to the
static oom error message.  This means there is no need
to strdup the message in giterr_detach.

9 years agoMake giterr_detach no longer public
Michael Procter [Mon, 27 Jul 2015 08:59:07 +0000 (09:59 +0100)]
Make giterr_detach no longer public

9 years agoEnsure static oom error message not detached
Michael Procter [Thu, 23 Jul 2015 12:17:08 +0000 (13:17 +0100)]
Ensure static oom error message not detached

Error messages that are detached are assumed to be dynamically
allocated.  Passing a pointer to the static oom error message
can cause an attempt to free the static buffer later.  This change
checks if the oom error message is about to be detached and detaches
a copy instead.

9 years agoAdd failing test for capture/restore oom error
Michael Procter [Thu, 23 Jul 2015 12:16:19 +0000 (13:16 +0100)]
Add failing test for capture/restore oom error

9 years agoMerge pull request #3325 from libgit2/cmn/filebuf-rename-error
Edward Thomson [Mon, 3 Aug 2015 13:33:53 +0000 (08:33 -0500)]
Merge pull request #3325 from libgit2/cmn/filebuf-rename-error

 filebuf: remove lockfile upon rename errors

9 years agoMerge pull request #3344 from libgit2/cmn/add-unreg-submodule
Edward Thomson [Mon, 3 Aug 2015 13:17:47 +0000 (08:17 -0500)]
Merge pull request #3344 from libgit2/cmn/add-unreg-submodule

index: stage an unregistered submodule as well

9 years agoMerge pull request #3348 from MrHacky/remote-path-with-tilde
Carlos Martín Nieto [Mon, 3 Aug 2015 08:29:17 +0000 (10:29 +0200)]
Merge pull request #3348 from MrHacky/remote-path-with-tilde

Handle ssh:// and git:// urls containing a '~' character.

9 years agoHandle ssh:// and git:// urls containing a '~' character.
Simon [Mon, 3 Aug 2015 06:38:07 +0000 (07:38 +0100)]
Handle ssh:// and git:// urls containing a '~' character.

For such a path '/~/...' the leading '/' is stripped so the server will
get a path starting with '~' and correctly handle it.

9 years agoindex: stage an unregistered submodule as well
Carlos Martín Nieto [Sat, 1 Aug 2015 17:53:53 +0000 (19:53 +0200)]
index: stage an unregistered submodule as well

We previously added logic to `_add_bypath()` to update a submodule. Go
further and stage the submodule even if it's not registered to behave
like git.

9 years agoindex: test that an unregistered submodule gets staged
Carlos Martín Nieto [Sat, 1 Aug 2015 17:52:25 +0000 (19:52 +0200)]
index: test that an unregistered submodule gets staged

When we pass the path of a repository to `_bypath()`, we should behave
like git and stage it as a `_COMMIT` regardless of whether it is
registered a a submodule.

9 years agoindex: add test for adding an old-style submodule to index
Linquize [Tue, 28 Jul 2015 16:08:37 +0000 (00:08 +0800)]
index: add test for adding an old-style submodule to index

9 years agoMerge pull request #3332 from phatblat/ben/doc-warnings
Carlos Martín Nieto [Sat, 1 Aug 2015 13:38:04 +0000 (15:38 +0200)]
Merge pull request #3332 from phatblat/ben/doc-warnings

Resolve documentation warnings

9 years agoMerge pull request #3341 from stewid/pedantic-compiler-warning
Edward Thomson [Fri, 31 Jul 2015 20:36:22 +0000 (15:36 -0500)]
Merge pull request #3341 from stewid/pedantic-compiler-warning

Remove extra semicolon outside of a function

9 years agoRemove extra semicolon outside of a function
Stefan Widgren [Fri, 31 Jul 2015 14:23:11 +0000 (16:23 +0200)]
Remove extra semicolon outside of a function

Without this change, compiling with gcc and pedantic generates warning:
ISO C does not allow extra ‘;’ outside of a function.

9 years agoMerge pull request #3328 from libgit2/cmn/iterator-skip-diriter
Edward Thomson [Wed, 29 Jul 2015 21:46:47 +0000 (16:46 -0500)]
Merge pull request #3328 from libgit2/cmn/iterator-skip-diriter

iterator: skip over errors in diriter init

9 years agoMerge pull request #3339 from palmin/palmin-issue-3338
Edward Thomson [Wed, 29 Jul 2015 21:35:08 +0000 (16:35 -0500)]
Merge pull request #3339 from palmin/palmin-issue-3338

case-insensitive check for WWW-Authenticate header

9 years agocase-insensitive check for WWW-Authenticate header
Anders Borum [Wed, 29 Jul 2015 20:23:00 +0000 (22:23 +0200)]
case-insensitive check for WWW-Authenticate header

Fixes issue #3338

9 years agoBetter param docs
Ben Chatelain [Tue, 28 Jul 2015 14:28:33 +0000 (08:28 -0600)]
Better param docs

9 years agoerror: store the error messages in a reusable buffer
Carlos Martín Nieto [Sun, 26 Jul 2015 19:12:00 +0000 (21:12 +0200)]
error: store the error messages in a reusable buffer

Instead of allocating a brand new buffer for each error string we want
to store, we can use a per-thread buffer to store the error string and
re-use the underlying storage. We already use the buffer to format the
string, so this mostly makes that more direct.

9 years agoFix remaining documentation warnings
Ben Chatelain [Tue, 28 Jul 2015 00:32:55 +0000 (18:32 -0600)]
Fix remaining documentation warnings

9 years agoAdd -Wdocumentation flag if supported
Ben Chatelain [Tue, 28 Jul 2015 00:28:29 +0000 (18:28 -0600)]
Add -Wdocumentation flag if supported

9 years agoUse correct Doxygen trailing comment syntax
Ben Chatelain [Mon, 27 Jul 2015 23:42:08 +0000 (17:42 -0600)]
Use correct Doxygen trailing comment syntax

9 years agoFix @param names in doc comments
Ben Chatelain [Mon, 27 Jul 2015 20:46:50 +0000 (14:46 -0600)]
Fix @param names in doc comments

9 years agoiterator: adjust unreadable-dir test to new behaviour
Carlos Martín Nieto [Mon, 27 Jul 2015 11:31:06 +0000 (13:31 +0200)]
iterator: adjust unreadable-dir test to new behaviour

We don't want the iterator to make us stop whenever we hit an unreadable
dir. We should instead move over to the next item.

9 years agoiterator: skip over errors in diriter init
Carlos Martín Nieto [Sun, 26 Jul 2015 15:19:22 +0000 (17:19 +0200)]
iterator: skip over errors in diriter init

An error here will typically mean that the directory was removed between
the time we iterated the parent and the time we wanted to visit it in
which case we should ignore it.

Other kinds of errors such as permissions (or transient errors) also
better dealt with by pretending we didn't see it.

9 years agofilebuf: remove lockfile upon rename errors
Carlos Martín Nieto [Fri, 24 Jul 2015 17:22:41 +0000 (19:22 +0200)]
filebuf: remove lockfile upon rename errors

When we have an error renaming the lockfile, we need to make sure
that we remove it upon cleanup. For this, we need to keep track of
whether we opened the file and whether the rename succeeded.

If we did create the lockfile but the rename did not succeed, we
remove the lockfile. This won't protect against all errors, but
the most common ones (target file is open) does get handled.

9 years agofilebuf: failing test for leaving the lockfile when failing to rename
Carlos Martín Nieto [Fri, 24 Jul 2015 16:44:29 +0000 (18:44 +0200)]
filebuf: failing test for leaving the lockfile when failing to rename

When we fail to rename, we currently leave the lockfile laying
around. This shows that behaviour.

9 years agoMerge pull request #3307 from libgit2/cmn/submodule-backslash
Edward Thomson [Fri, 24 Jul 2015 20:05:16 +0000 (15:05 -0500)]
Merge pull request #3307 from libgit2/cmn/submodule-backslash

Normalize submodule urls before looking at them

9 years agoMerge pull request #3303 from libgit2/cmn/index-add-submodule
Edward Thomson [Fri, 24 Jul 2015 20:04:20 +0000 (15:04 -0500)]
Merge pull request #3303 from libgit2/cmn/index-add-submodule

Allow adding a submodule through git_index_add_bypath

9 years agoMerge pull request #3305 from libgit2/cmn/reflog-del-backend
Edward Thomson [Fri, 24 Jul 2015 20:01:04 +0000 (15:01 -0500)]
Merge pull request #3305 from libgit2/cmn/reflog-del-backend

refdb: delete a ref's reflog upon deletion

9 years agoMerge pull request #3304 from libgit2/cmn/checkout-free-stream
Edward Thomson [Fri, 24 Jul 2015 19:59:38 +0000 (14:59 -0500)]
Merge pull request #3304 from libgit2/cmn/checkout-free-stream

filter: make sure to close the stream even on error

9 years agoMerge pull request #3317 from csware/fix-vista
Edward Thomson [Thu, 23 Jul 2015 15:00:55 +0000 (10:00 -0500)]
Merge pull request #3317 from csware/fix-vista

Make libgit2 work on Windows Vista again

9 years agoMerge pull request #3322 from libgit2/fix-init-ordering
Josh Abernathy [Wed, 22 Jul 2015 20:01:08 +0000 (16:01 -0400)]
Merge pull request #3322 from libgit2/fix-init-ordering

Increment `git__n_inits` before doing `init_once`.

9 years agoMerge branch 'master' into fix-init-ordering
joshaber [Wed, 22 Jul 2015 15:33:18 +0000 (11:33 -0400)]
Merge branch 'master' into fix-init-ordering

9 years agoIncrement `git__n_inits` before doing `init_once`.
joshaber [Wed, 22 Jul 2015 14:51:38 +0000 (10:51 -0400)]
Increment `git__n_inits` before doing `init_once`.

Fixes #3318.