]> git.proxmox.com Git - libgit2.git/log
libgit2.git
11 years agoremote: Make git_remote_list() detect pushurl
nulltoken [Tue, 27 Aug 2013 17:14:18 +0000 (19:14 +0200)]
remote: Make git_remote_list() detect pushurl

11 years agovector: Teach git_vector_uniq() to free while deduplicating
nulltoken [Tue, 27 Aug 2013 18:00:28 +0000 (20:00 +0200)]
vector: Teach git_vector_uniq() to free while deduplicating

11 years agoremote: Relax the parsing logic even more
nulltoken [Wed, 21 Aug 2013 14:04:25 +0000 (16:04 +0200)]
remote: Relax the parsing logic even more

In order to be loaded, a remote needs to be configured with at least a `url` or a `pushurl`.

ENOTFOUND will be returned when trying to git_remote_load() a remote with neither of these entries defined.

11 years agoremote: Don't parse missing urls as empty strings
nulltoken [Wed, 21 Aug 2013 11:37:21 +0000 (13:37 +0200)]
remote: Don't parse missing urls as empty strings

11 years agoremote: Warn the user when connecting with no url
nulltoken [Wed, 21 Aug 2013 11:20:17 +0000 (13:20 +0200)]
remote: Warn the user when connecting with no url

11 years agoremote: Assert proper GIT_DIRECTION_XXXX values
nulltoken [Wed, 21 Aug 2013 11:16:17 +0000 (13:16 +0200)]
remote: Assert proper GIT_DIRECTION_XXXX values

11 years agoMerge pull request #1810 from nvloff/reference_is_tag
Vicent Martí [Mon, 26 Aug 2013 10:32:09 +0000 (03:32 -0700)]
Merge pull request #1810 from nvloff/reference_is_tag

refs: add git_reference_is_tag

11 years agorefs: add git_reference_is_tag
Nikolai Vladimirov [Sun, 25 Aug 2013 12:59:50 +0000 (15:59 +0300)]
refs: add git_reference_is_tag

11 years agoMerge pull request #1809 from frasertweedale/fix/git_push_unpack_ok-doc
Vicent Martí [Sun, 25 Aug 2013 10:39:06 +0000 (03:39 -0700)]
Merge pull request #1809 from frasertweedale/fix/git_push_unpack_ok-doc

push: small documentation fix

11 years agopush: small documentation fix
Fraser Tweedale [Sun, 25 Aug 2013 07:01:04 +0000 (17:01 +1000)]
push: small documentation fix

11 years agoMerge pull request #1807 from frasertweedale/fix/freebsd
Vicent Martí [Sat, 24 Aug 2013 09:43:38 +0000 (02:43 -0700)]
Merge pull request #1807 from frasertweedale/fix/freebsd

fix tests on FreeBSD

11 years agofix tests on FreeBSD
Fraser Tweedale [Sat, 24 Aug 2013 07:39:15 +0000 (17:39 +1000)]
fix tests on FreeBSD

238b761 introduced a test for posix behaviour, but on FreeBSD some
of the structs and constants used aren't defined in <arpa/inet.h>.
Include the appropriate headers to get the tests working again on
FreeBSD.

11 years agoMerge pull request #1801 from ethomson/utf8_bom
Russell Belfer [Wed, 21 Aug 2013 23:57:45 +0000 (16:57 -0700)]
Merge pull request #1801 from ethomson/utf8_bom

Skip UTF-8 BOM in binary detection

11 years agoSkip UTF-8 BOM in binary detection
Edward Thomson [Mon, 19 Aug 2013 23:46:26 +0000 (18:46 -0500)]
Skip UTF-8 BOM in binary detection

When a git_buf contains a UTF-8 BOM, the three bytes comprising
that BOM are treated as unprintable characters.  For a small git_buf,
the three BOM characters overwhelm the printable characters.  This
is problematic when trying to check out a small file as the CR/LF
filtering will not apply.

11 years agoMerge pull request #1800 from ethomson/mingw_warnings
Russell Belfer [Mon, 19 Aug 2013 23:01:30 +0000 (16:01 -0700)]
Merge pull request #1800 from ethomson/mingw_warnings

Quiet down some warnings

11 years agoQuiet down some warnings
Edward Thomson [Mon, 19 Aug 2013 22:49:12 +0000 (17:49 -0500)]
Quiet down some warnings

11 years agoMerge pull request #1796 from ethomson/fix_inet_pton
Ben Straub [Mon, 19 Aug 2013 22:47:31 +0000 (15:47 -0700)]
Merge pull request #1796 from ethomson/fix_inet_pton

Fix p_inet_pton on windows

11 years agoFix p_inet_pton on windows
Edward Thomson [Fri, 16 Aug 2013 18:31:24 +0000 (13:31 -0500)]
Fix p_inet_pton on windows

p_inet_pton on Windows should set errno properly for callers.
Rewrite p_inet_pton to handle error cases correctly and add
test cases to exercise this function.

11 years agoMerge pull request #1799 from ethomson/gettimeofday
Ben Straub [Mon, 19 Aug 2013 22:06:39 +0000 (15:06 -0700)]
Merge pull request #1799 from ethomson/gettimeofday

Use time(2) to get the time

11 years agoUse time(2) to get the time
Edward Thomson [Mon, 19 Aug 2013 21:44:17 +0000 (16:44 -0500)]
Use time(2) to get the time

We didn't use the added precision in gettimeofday, so remove it.
This prevents us from having an unnecessary reimplementation on
win32.

11 years agoMerge pull request #1797 from ethomson/keep_hash_ctx_private
Ben Straub [Mon, 19 Aug 2013 18:00:20 +0000 (11:00 -0700)]
Merge pull request #1797 from ethomson/keep_hash_ctx_private

Don't expose git_hash_ctx since it's internal

11 years agotravis: exit on failure for anything related to building
Carlos Martín Nieto [Mon, 19 Aug 2013 16:50:03 +0000 (18:50 +0200)]
travis: exit on failure for anything related to building

11 years agoDon't expose git_hash_ctx since it's internal
Edward Thomson [Mon, 19 Aug 2013 16:42:50 +0000 (11:42 -0500)]
Don't expose git_hash_ctx since it's internal

And doing so makes the mingw build choke.

11 years agoRevparse does not handle refspecs
Carlos Martín Nieto [Mon, 19 Aug 2013 11:04:05 +0000 (13:04 +0200)]
Revparse does not handle refspecs

11 years agoMerge pull request #1785 from libgit2/cmn/odb-hash-frontend
Vicent Martí [Mon, 19 Aug 2013 09:17:00 +0000 (02:17 -0700)]
Merge pull request #1785 from libgit2/cmn/odb-hash-frontend

odb: move hashing to the frontend for streaming

11 years agoMerge pull request #1792 from libgit2/ntk/bug/prefix_size
Vicent Martí [Mon, 19 Aug 2013 09:16:02 +0000 (02:16 -0700)]
Merge pull request #1792 from libgit2/ntk/bug/prefix_size

odb: Straighten oid prefix handling

11 years agoMerge pull request #1794 from libgit2/cmn/elocked
Vicent Martí [Mon, 19 Aug 2013 09:06:15 +0000 (02:06 -0700)]
Merge pull request #1794 from libgit2/cmn/elocked

index: report when it's locked

11 years agotravis: really fail if the tests fail
Carlos Martín Nieto [Mon, 19 Aug 2013 08:50:28 +0000 (10:50 +0200)]
travis: really fail if the tests fail

When implementing the ssh testing, the move to the script made it so
the first test suite's exit code was ignored. Check whether the main
tests fail and exit with an error in that case.

11 years agoindex: report when it's locked
Carlos Martín Nieto [Mon, 19 Aug 2013 08:30:44 +0000 (10:30 +0200)]
index: report when it's locked

Report the index being locked with its own error code in order to be
able to differentiate, as a locked index is typically the result of a
crashed process or concurrent access, both of which often require user
intervention to fix.

11 years agoMerge pull request #1793 from libgit2/ntk/valgrind
Ben Straub [Mon, 19 Aug 2013 01:30:48 +0000 (18:30 -0700)]
Merge pull request #1793 from libgit2/ntk/valgrind

Bring Valgrind back!

11 years agoci: Make Valgrind run on Travis
nulltoken [Sun, 18 Aug 2013 22:18:44 +0000 (00:18 +0200)]
ci: Make Valgrind run on Travis

11 years agoodb: Straighten oid prefix handling
nulltoken [Sun, 18 Aug 2013 21:38:51 +0000 (23:38 +0200)]
odb: Straighten oid prefix handling

11 years agoodb: avoid hashing twice in and edge case
Carlos Martín Nieto [Sat, 17 Aug 2013 00:12:04 +0000 (02:12 +0200)]
odb: avoid hashing twice in and edge case

If none of the backends support direct writes and we must stream the
whole file, we already know what the object's id should be; so use the
stream's functions directly, bypassing the frontend's hashing and
overwriting of our existing id.

11 years agoodb: document git_odb_stream
Carlos Martín Nieto [Fri, 16 Aug 2013 23:55:52 +0000 (01:55 +0200)]
odb: document git_odb_stream

Clarify the role of each function and in particular mention that there
is no need for the backend or stream to worry about the object's id,
as it will be given when `finalize_write` is called.

11 years agoodb: make it clearer that the id is calculated in the frontend
Carlos Martín Nieto [Fri, 16 Aug 2013 23:41:08 +0000 (01:41 +0200)]
odb: make it clearer that the id is calculated in the frontend

The frontend is in charge of calculating the id of the objects. Thus
the backends should treat it as a read-only value. The positioning in
the function signature made it seem as though it was an output
parameter.

Make the id const and move it from the front to behind the subject
(backend or stream).

11 years agoMerge pull request #1778 from libgit2/push_tag_to_tag_test
Vicent Martí [Fri, 16 Aug 2013 23:22:37 +0000 (16:22 -0700)]
Merge pull request #1778 from libgit2/push_tag_to_tag_test

push: handle tag chains correctly

11 years agoMerge pull request #1790 from libgit2/examples-init
Vicent Martí [Fri, 16 Aug 2013 22:33:13 +0000 (15:33 -0700)]
Merge pull request #1790 from libgit2/examples-init

Add "git init"-like example

11 years agoImprove isolation of new test from user environs
Russell Belfer [Fri, 16 Aug 2013 22:03:15 +0000 (15:03 -0700)]
Improve isolation of new test from user environs

11 years agoAdd example like "git init"
Russell Belfer [Fri, 16 Aug 2013 21:49:38 +0000 (14:49 -0700)]
Add example like "git init"

11 years agoNew test that inits repo and make commit
Russell Belfer [Fri, 16 Aug 2013 21:48:14 +0000 (14:48 -0700)]
New test that inits repo and make commit

11 years agoAdd new git_signature_default API using config
Russell Belfer [Fri, 16 Aug 2013 21:34:51 +0000 (14:34 -0700)]
Add new git_signature_default API using config

This adds a new API for creating a signature that uses the
config to look up "user.name" and "user.email".

11 years agoMerge pull request #1789 from martinwoodward/posix_win32-attribution
Ben Straub [Fri, 16 Aug 2013 20:25:18 +0000 (13:25 -0700)]
Merge pull request #1789 from martinwoodward/posix_win32-attribution

Give credit to PHP for the p_readlink function in posix_w32.c

11 years agoGive credit to PHP for the p_readlink function in posix_w32.c
Martin Woodward [Fri, 16 Aug 2013 18:40:58 +0000 (19:40 +0100)]
Give credit to PHP for the p_readlink function in posix_w32.c

11 years agopush: handle tag chains correctly
Carlos Martín Nieto [Mon, 12 Aug 2013 14:15:36 +0000 (16:15 +0200)]
push: handle tag chains correctly

When dealing with a chain of tags, we need to enqueue each of them
individually, which means we can't use `git_tag_peel` as that jumps
over the intermediate tags.

Do the peeling manually so we can look at each object and take the
appropriate action.

11 years agoodb: remove a duplicate object header formatting function
Carlos Martín Nieto [Thu, 15 Aug 2013 12:32:47 +0000 (14:32 +0200)]
odb: remove a duplicate object header formatting function

11 years agoodb: perform the stream hashing in the frontend
Carlos Martín Nieto [Thu, 15 Aug 2013 12:29:39 +0000 (14:29 +0200)]
odb: perform the stream hashing in the frontend

Hash the data as it's coming into the stream and tell the backend what
its name is when finalizing the write. This makes it consistent with
the way a plain git_odb_write() performs the write.

11 years agoodb: wrap the stream reading and writing functions
Carlos Martín Nieto [Thu, 15 Aug 2013 11:48:35 +0000 (13:48 +0200)]
odb: wrap the stream reading and writing functions

This is in preparation for moving the hashing to the frontend, which
requires us to handle the incoming data before passing it to the
backend's stream.

11 years agoMerge pull request #1784 from evhan/development
Vicent Martí [Thu, 15 Aug 2013 06:15:02 +0000 (23:15 -0700)]
Merge pull request #1784 from evhan/development

revparse: Free left side of invalid range revspecs

11 years agorevparse: Use more idiomatic error value test
Evan Hanson [Thu, 15 Aug 2013 05:25:05 +0000 (17:25 +1200)]
revparse: Use more idiomatic error value test

11 years agorevparse: Free left side of invalid range revspecs
Evan Hanson [Thu, 15 Aug 2013 04:25:48 +0000 (16:25 +1200)]
revparse: Free left side of invalid range revspecs

This fixes a small memory leak in git_revparse where early returns on
errors from git_revparse_single cause a free() on the (reallocated) left
side of the revspec to be skipped.

11 years agosha1-lookup: This assert was correct
Vicent Marti [Wed, 14 Aug 2013 22:09:46 +0000 (00:09 +0200)]
sha1-lookup: This assert was correct

11 years agoCommit 7affc2f7 removed var initialization
Russell Belfer [Wed, 14 Aug 2013 17:58:02 +0000 (10:58 -0700)]
Commit 7affc2f7 removed var initialization

That commit accidentally removed the initialization of the "start"
variable giving undefined results for the host extraction from the
url input.

11 years agoMerge pull request #1780 from phkelley/development
Vicent Martí [Wed, 14 Aug 2013 13:48:09 +0000 (06:48 -0700)]
Merge pull request #1780 from phkelley/development

Respect GIT_SSL_NO_VERIFY and http.sslVerify

11 years agoMerge pull request #1783 from libgit2/cmn/relax-remote
Vicent Martí [Wed, 14 Aug 2013 13:44:28 +0000 (06:44 -0700)]
Merge pull request #1783 from libgit2/cmn/relax-remote

remote: relax the url rules

11 years agoMerge pull request #1774 from libgit2/test-ssh
Vicent Martí [Wed, 14 Aug 2013 13:43:43 +0000 (06:43 -0700)]
Merge pull request #1774 from libgit2/test-ssh

Test SSH in travis

11 years agoMerge pull request #1781 from brodie/brodie/stat-before-open
Vicent Martí [Wed, 14 Aug 2013 13:40:38 +0000 (06:40 -0700)]
Merge pull request #1781 from brodie/brodie/stat-before-open

fileops: stat() before open()ing in git_futils_readbuffer_updated()

11 years agoMerge pull request #1782 from libgit2/vmg/no-lookup
Vicent Martí [Wed, 14 Aug 2013 13:38:37 +0000 (06:38 -0700)]
Merge pull request #1782 from libgit2/vmg/no-lookup

Do not use the "experimental" lookup mode

11 years agoremote: relax the url rules
Carlos Martín Nieto [Wed, 14 Aug 2013 09:18:05 +0000 (11:18 +0200)]
remote: relax the url rules

Accept any value for the remote's url, including an empty string which
we used to reject as invalid configuration.

This is not quite what git does (although it has its own problems with
such configurations) and it makes it harder to fix the issue, by not
letting the user modify it.

As we already need to check for a valid URL when we try to connect to
the network, let that perform the check, as we don't need to do it
anywhere else.

11 years agoTest SSH in travis
Carlos Martín Nieto [Sat, 10 Aug 2013 23:37:44 +0000 (01:37 +0200)]
Test SSH in travis

Set up the ssh credentials so we are able to talk to localhost and
issue git commands. Move to use a script, as the command list is
getting somewhat long.

While here, delay installing valgrind until we need it, as it and its
dependencies are by far the largest downloads and this allows us to
start compiling (and failing) faster and we only incur this cost when
the test suite runs successfully.

11 years agooid: Helper for old-school hashcmp
Vicent Marti [Wed, 14 Aug 2013 08:34:07 +0000 (10:34 +0200)]
oid: Helper for old-school hashcmp

11 years agosha1_lookup: Hello my name is MSVC and how do I pointer
Vicent Marti [Wed, 14 Aug 2013 08:31:02 +0000 (10:31 +0200)]
sha1_lookup: Hello my name is MSVC and how do I pointer

11 years agosha1_lookup: do not use the "experimental" lookup mode
Vicent Marti [Wed, 14 Aug 2013 08:28:01 +0000 (10:28 +0200)]
sha1_lookup: do not use the "experimental" lookup mode

11 years agoRespect GIT_SSL_NO_VERIFY and http.sslVerify
Philip Kelley [Tue, 13 Aug 2013 17:10:52 +0000 (13:10 -0400)]
Respect GIT_SSL_NO_VERIFY and http.sslVerify

11 years agoMerge pull request #1779 from ben/win32-precompiled-header-speedup
Ben Straub [Tue, 13 Aug 2013 18:37:31 +0000 (11:37 -0700)]
Merge pull request #1779 from ben/win32-precompiled-header-speedup

Speed up build under MSVC

11 years agoMerge pull request #1767 from libgit2/win32-bigger-utf8-buffer
Vicent Martí [Tue, 13 Aug 2013 18:36:24 +0000 (11:36 -0700)]
Merge pull request #1767 from libgit2/win32-bigger-utf8-buffer

Bigger buffer for utf-8 parsing in win32

11 years agofileops: stat() before open()ing in git_futils_readbuffer_updated()
Brodie Rao [Tue, 13 Aug 2013 17:55:37 +0000 (10:55 -0700)]
fileops: stat() before open()ing in git_futils_readbuffer_updated()

This reverts refactoring done in 13224ea4aad9a1b3c9cc4c992ceaea9af623e047
that introduces a performance regression for NFS when reading files that
don't exist. open() forces a cache invalidation on NFS, while stat()ing a
file just uses the cache and is very quick.

To give a specific example, say you have a repo with a thousand packed
refs. Before this change, looking up every single one ould incur a thousand
slow open() calls. With this change, it's a thousand fast stat() calls.

11 years agoMissed one path for path_as_utf8 type
Russell Belfer [Tue, 13 Aug 2013 17:20:25 +0000 (10:20 -0700)]
Missed one path for path_as_utf8 type

11 years agoMinor win32 fixes and improvements
Russell Belfer [Tue, 13 Aug 2013 16:53:56 +0000 (09:53 -0700)]
Minor win32 fixes and improvements

This is just a bunch of small fixes that I noticed while looking
at the UTF8 and UTF16 path stuff.  It fixes a slowdown in looking
for an empty directory (not exiting loop asap), makes the dir name
in the git__DIR structure be a GIT_FLEX_ARRAY to save an allocation,
and fixes some slightly odd assumptions in the cl_getenv helper.

11 years agoReintroduce type for UTF8 win32 path conversions
Russell Belfer [Tue, 13 Aug 2013 16:45:56 +0000 (09:45 -0700)]
Reintroduce type for UTF8 win32 path conversions

11 years agoRename git__win32_path fns to git_win32_path
Russell Belfer [Tue, 13 Aug 2013 16:40:32 +0000 (09:40 -0700)]
Rename git__win32_path fns to git_win32_path

11 years agoAdd some things to precompiled header
Ben Straub [Tue, 13 Aug 2013 16:22:53 +0000 (09:22 -0700)]
Add some things to precompiled header

11 years agoFix mingw cross-compile build
Ben Straub [Thu, 8 Aug 2013 17:10:23 +0000 (10:10 -0700)]
Fix mingw cross-compile build

11 years agowindows: Fuck me
Vicent Marti [Tue, 13 Aug 2013 07:38:37 +0000 (09:38 +0200)]
windows: Fuck me

11 years agowindows: Require order
Vicent Marti [Tue, 13 Aug 2013 07:35:07 +0000 (09:35 +0200)]
windows: Require order

11 years agowindows: Missing renames.
Vicent Marti [Tue, 13 Aug 2013 07:31:03 +0000 (09:31 +0200)]
windows: Missing renames.

11 years agowindows: Path conversion with better semantics
Vicent Marti [Tue, 13 Aug 2013 07:15:39 +0000 (09:15 +0200)]
windows: Path conversion with better semantics

11 years agoMerge pull request #1775 from libgit2/ssh-default-user
Ben Straub [Mon, 12 Aug 2013 19:05:58 +0000 (12:05 -0700)]
Merge pull request #1775 from libgit2/ssh-default-user

SSH username fixes

11 years agoUpdate to clar 7bf638b80
Ben Straub [Mon, 12 Aug 2013 18:02:53 +0000 (11:02 -0700)]
Update to clar 7bf638b80

11 years agoCMake: finding libssh2 should be idempotent
Carlos Martín Nieto [Mon, 12 Aug 2013 10:07:33 +0000 (12:07 +0200)]
CMake: finding libssh2 should be idempotent

With the current code, running 'cmake .' in an already-configured
directory causes the removal of ssh flags passed to the compiler,
making it impossible to build with ssh support but by removing CMake's
cache.

Remove the check for LIBSSH2_LIBRARY and let CMake do the right thing
wrt finding the library.

11 years agoInclude username in each credential type
Carlos Martín Nieto [Sun, 11 Aug 2013 21:30:47 +0000 (23:30 +0200)]
Include username in each credential type

Key-based authentication also needs an username, so include it in each
one.

Also stop assuming a default username of "git" in the ssh transport
which has no business making such a decision.

11 years agoodb: free object data when id is ambiguous
Carlos Martín Nieto [Mon, 12 Aug 2013 09:50:27 +0000 (11:50 +0200)]
odb: free object data when id is ambiguous

By the time we recognise this as an ambiguous id, the object's data
has been loaded into memory. Free it when returning EABMIGUOUS.

11 years agoMerge pull request #1768 from arrbee/issue-1766-gitignore-weirdness
Ben Straub [Mon, 12 Aug 2013 00:28:33 +0000 (17:28 -0700)]
Merge pull request #1768 from arrbee/issue-1766-gitignore-weirdness

Fix issue 1766 - bugs in managing ignore file lists

11 years agoMake utf-8 source strings unlimited
Ben Straub [Sat, 10 Aug 2013 22:11:19 +0000 (15:11 -0700)]
Make utf-8 source strings unlimited

11 years agoFix 64-bit MSVC warnings
Ben Straub [Sat, 10 Aug 2013 21:56:58 +0000 (14:56 -0700)]
Fix 64-bit MSVC warnings

11 years agoMerge pull request #1770 from ethomson/index_fuzz
Vicent Martí [Fri, 9 Aug 2013 22:30:50 +0000 (15:30 -0700)]
Merge pull request #1770 from ethomson/index_fuzz

Fixes to safely reading the index

11 years agoImprove and comment git_ignore__pop_dir
Russell Belfer [Fri, 9 Aug 2013 17:06:23 +0000 (10:06 -0700)]
Improve and comment git_ignore__pop_dir

This just cleans up the improved logic for popping ignore dirs
and documents why the complex behavior is needed.

11 years agoImprove building ignore file lists
Russell Belfer [Wed, 7 Aug 2013 16:17:20 +0000 (09:17 -0700)]
Improve building ignore file lists

The routines to push and pop ignore files while traversing a
directory had some issues. In particular, setting up the initial
list would sometimes push an ignore file before it ought to be
applied if the starting path was a directory containing an ignore
file. Also, the pop function was not always matching the right
part of the path and would fail to pop ignores from the list in
some cases.

This adds some tests that exercise a particular problematic case
and then fixes the problems that I could find related to this.

At some point, I'd like to isolate this ignore rule management
code and rewrite it, but that's a larger project and right now,
I'll opt to just try to fix the broken behaviors.

11 years agoMerge pull request #1773 from arrbee/fix-fnmatch-prefix
Russell Belfer [Fri, 9 Aug 2013 18:39:38 +0000 (11:39 -0700)]
Merge pull request #1773 from arrbee/fix-fnmatch-prefix

Revert PR #1462 and provide alternative fix

11 years agoMatch against file with leading ! was too broad
Russell Belfer [Fri, 9 Aug 2013 18:20:49 +0000 (11:20 -0700)]
Match against file with leading ! was too broad

11 years agoRevert PR #1462 and provide alternative fix
Russell Belfer [Fri, 9 Aug 2013 17:52:35 +0000 (10:52 -0700)]
Revert PR #1462 and provide alternative fix

This rolls back the changes to fnmatch parsing from commit
2e40a60e847d6c128af23e24ea7a8efebd2427da except for the tests
that were added.  Instead this adds couple of new flags that can
be passed in when attempting to parse an fnmatch pattern.  Also,
this changes the pathspec match logic to special case matching a
filename with a '!' prefix against a negative pattern.

This fixes the build.

11 years agoMerge pull request #1764 from ethomson/status_renames_from_rewrites
Russell Belfer [Fri, 9 Aug 2013 16:35:23 +0000 (09:35 -0700)]
Merge pull request #1764 from ethomson/status_renames_from_rewrites

Add rename from rewrites to status

11 years agoMerge pull request #1462 from yorah/fix/libgit2sharp-issue-379
Russell Belfer [Fri, 9 Aug 2013 16:32:06 +0000 (09:32 -0700)]
Merge pull request #1462 from yorah/fix/libgit2sharp-issue-379

status: fix handling of filenames with special prefixes

11 years agoMerge pull request #1771 from nvloff/write_empty_config_value
Russell Belfer [Thu, 8 Aug 2013 19:57:13 +0000 (12:57 -0700)]
Merge pull request #1771 from nvloff/write_empty_config_value

config: allow setting  empty string as value

11 years agoconfig: allow empty string as value
Nikolai Vladimirov [Thu, 8 Aug 2013 18:17:32 +0000 (21:17 +0300)]
config: allow empty string as value

`git_config_set_string(config, "config.section", "")` fails when
escaping the value.

The buffer in `escape_value` is allocated without NULL-termination. And
in case of empty string 0 is passed for buffer size in `git_buf_grow`.

`git_buf_detach` returns NULL when the allocated size is 0 and that
leads to an error return in `GITERR_CHECK_ALLOC` called after
`escape_value`

The change in `config_file.c` was suggested by Russell Belfer <rb@github.com>

11 years agogit_strndup fix when OOM
Edward Thomson [Thu, 8 Aug 2013 17:36:11 +0000 (12:36 -0500)]
git_strndup fix when OOM

11 years agoFixes to safely reading the index
Edward Thomson [Thu, 8 Aug 2013 16:05:00 +0000 (11:05 -0500)]
Fixes to safely reading the index

Avoid wrapping around extension size when reading, avoid walking off
the end of the buffer when reading names.

11 years agoMerge pull request #1738 from libgit2/diff-patch-content-size
Ben Straub [Thu, 8 Aug 2013 15:54:38 +0000 (08:54 -0700)]
Merge pull request #1738 from libgit2/diff-patch-content-size

Add API for getting at git_diff_patch->content_size

11 years agoMerge pull request #1746 from libgit2/rename-detection-performance
Ben Straub [Thu, 8 Aug 2013 15:53:37 +0000 (08:53 -0700)]
Merge pull request #1746 from libgit2/rename-detection-performance

Rename detection slow

11 years agoDiscriminate path-specific and general UTF-X conversions
Ben Straub [Thu, 8 Aug 2013 15:48:57 +0000 (08:48 -0700)]
Discriminate path-specific and general UTF-X conversions

11 years agoMerge pull request #1638 from brodie/brodie/handle-duplicate-objects-across-packs
Russell Belfer [Thu, 8 Aug 2013 14:50:59 +0000 (07:50 -0700)]
Merge pull request #1638 from brodie/brodie/handle-duplicate-objects-across-packs

odb_pack: handle duplicate objects from different packs