Commit Graph

8090 Commits

Author SHA1 Message Date
Edward Thomson
6dfd8506b7 checkout test: ensure we write to casechanged dir
Ensure that on a case insensitive filesystem that we can checkout
into some folder 'FOLDER' that exists on disk, even if the target
of the checkout is a different case (eg 'folder').
2015-05-04 07:18:26 -05:00
Edward Thomson
431f98070f checkout test: ignore unstaged case-changing renames
On Windows, you might sloppily rewrite a file (or have a sloppy
text editor that does it for you) and accidentally change its
case.  (eg, "README" -> "readme").  Git ignores this accidental
case changing rename during checkout and will happily write the
new content to the file despite the name change.  We should, too.
2015-05-04 07:18:25 -05:00
Carlos Martín Nieto
cfc2e56d59 Merge pull request #3087 from ethomson/pr/3054
Performance Improvements to Status on Windows
2015-05-04 11:16:52 +02:00
Edward Thomson
72f8da9175 Merge pull request #3089 from volftomas/patch-2
Added call to git_libgit2_shutdown()
2015-05-02 10:51:24 -04:00
Tomas Paladin Volf
785990bead
Restructured to be nicer example
Code restructured to better represent best practice when
using libgit2.
2015-05-02 12:16:22 +02:00
Edward Thomson
ef23a82fa7 Merge pull request #3092 from techee/iconv_macports_fix2
Don't search iconv in /opt/local
2015-05-01 17:30:51 -04:00
Jiří Techet
b7df2e8bdd Don't search iconv in /opt/local
Since OpenSSL isn't used any more on OS X, there is no dependency
on any MacPorts library under /opt/local and there is no danger of
conflicts between MacPorts and system iconv. For this reason the
system iconv can always be used now.
2015-05-01 22:48:33 +02:00
Edward Thomson
be3f104967 diriter: actually use iconv on mac 2015-05-01 12:31:47 -04:00
Edward Thomson
cd39e4e2f3 git_buf_put_w: introduce utf16->utf8 conversion 2015-05-01 12:31:44 -04:00
Edward Thomson
f63a1b729b git_path_diriter: use FindFirstFile in win32
Using FindFirstFile and FindNextFile in win32 allows us to
use the directory information that is returned, instead of
us having to get the file attributes all over again, which
is a distinct cost savings on win32.
2015-05-01 12:31:40 -04:00
Edward Thomson
5c387b6c5a git_path_diriter: next shouldn't take path ptr
The _next method shouldn't take a path pointer (and a path_len
pointer) as 100% of current users use the full path and ignore
the filename.

Plus let's add some docs and a unit test.
2015-05-01 12:31:29 -04:00
Edward Thomson
7ef005f165 git_path_dirload_with_stat: moved to fs_iterator 2015-05-01 12:31:26 -04:00
Edward Thomson
ba8ef18a53 git_path_dirload_with_stat: use git_path_diriter 2015-05-01 12:31:21 -04:00
Edward Thomson
35c1d20750 git_win32_path_dirload_with_stat: removed 2015-05-01 12:31:14 -04:00
Edward Thomson
07bbc045c7 git_path_dirload: use git_path_diriter 2015-05-01 12:31:09 -04:00
Edward Thomson
edbfc52cdd git_path: introduce 'git_path_diriter'
Introduce a new `git_path_diriter` that can iterate directories
efficiently for each platform.
2015-05-01 12:31:05 -04:00
Edward Thomson
cbe8a61dfa Merge pull request #3059 from libgit2/cmn/negotiation-notify
[WIP/RFC] push: report the update plan to the caller
2015-05-01 11:28:54 -04:00
Edward Thomson
9f73e1f335 Merge pull request #3081 from leoyanggit/build_warnings
Fix some build warnings
2015-05-01 09:01:34 -04:00
Carlos Martín Nieto
5e00e5c965 Merge pull request #3090 from libgit2/jamill/doc_update
Update documentation for API changes
2015-04-30 21:55:10 +02:00
Carlos Martín Nieto
1275de53c5 Merge pull request #3088 from volftomas/patch-1
Fixed unused warning in tests/rebase/merge.c
2015-04-30 21:25:54 +02:00
Jameson Miller
bf2ba5290a Update documentation for API changes 2015-04-30 10:59:50 -04:00
Tomas Paladin Volf
9bff15f4a4 Added call to git_libgit2_shutdown()
Added forgotten call to git_libgit2_shutdown() to the /examples/network/git2.c.
2015-04-30 15:10:28 +02:00
Tomas Paladin Volf
cf2380a623 Fixed unused warning in tests/rebase/merge.c 2015-04-30 14:17:05 +02:00
Carlos Martín Nieto
891cc5045f Merge pull request #3085 from yongthecoder/regfree
Do not call regfree() on an empty regex that is not successfully created...
2015-04-29 22:08:46 +02:00
Yong Li
e30438ccb0 Do not call regfree() on an empty regex that is not successfully created by regcomp
(also removed an unused member "has_regex" from all_iter)
2015-04-29 13:40:42 -04:00
Edward Thomson
544139f50b win32: keep full path for realpath usage 2015-04-28 17:15:28 -04:00
Edward Thomson
c074d7a4c5 win32: mimic git_path_dirload_with_stat closely 2015-04-28 17:15:18 -04:00
Edward Thomson
b3f6cef066 dirload: loop conditional; less path mangling 2015-04-28 14:25:13 -04:00
Edward Thomson
e05531ddbd win32 dirload: don't heap allocate DIR structure 2015-04-28 14:25:09 -04:00
Edward Thomson
f3c444b879 win32: abstract file attributes -> struct stat fn 2015-04-28 14:25:06 -04:00
J Wyman
1920ee4ef6 Improvements to status performance on Windows.
Changed win32/path_w32.c to utilize NTFS' FindFirst..FindNext data instead of doing an lstat per file. Avoiding unnecessary directory opens and file scans reduces IO, improving overall performance. Effect is magnified due to NTFS being a kernel mode file system (as opposed to user mode).
2015-04-28 14:25:02 -04:00
J Wyman
4c09e19a37 Improvements to ignore performance on Windows.
Minimizing the number directory and file opens, minimizes the amount of IO thus reducing the overall cost of performing ignore operations.
2015-04-28 14:24:58 -04:00
Leo Yang
69f0032b4c Fix some build warnings
In checkout.c and filter.c we were casting a sub struct
to a parent struct which breaks the strict aliasing rules
in C. However we can use .parent or .base to access the
parent struct to avoid the build warnings.

In remote.c the local variable error was not initialized
or updated in some cases. For unintialized error a build
warning will be generated. So always keep error variable
up-to-date.
2015-04-28 12:40:20 -04:00
Edward Thomson
d969d41547 Merge pull request #3071 from linquize/git_reflog_drop
Fix wrong format string in git_reflog_drop() error message
2015-04-24 12:00:51 -04:00
Linquize
31d5dce372 Fix wrong format string in git_reflog_drop() error message 2015-04-24 23:56:59 +08:00
Carlos Martín Nieto
65808406bb Merge pull request #3063 from ethomson/config_validate_name
Validate configuration keys
2015-04-24 02:46:49 +02:00
Edward Thomson
dbb459505c Merge pull request #2997 from libgit2/cmn/secure-transport
Use SecureTransport on OS X
2015-04-23 15:24:05 -04:00
Carlos Martín Nieto
44b769e497 SecureTransport: handle graceful closes
On close, we might get a return code which looks like an error but just
means that the other side closed gracefully. Handle that.
2015-04-23 17:43:44 +02:00
Carlos Martín Nieto
65ac7ddccc SecureTransport: require TLS v1.x
Anything SSL is deprecated. Let's make sure we don't try to use SSL v3
when talking to the server.
2015-04-23 17:43:44 +02:00
Carlos Martín Nieto
85247df084 Update THREADING and CHANGELOG with SecureTransport details 2015-04-23 17:43:44 +02:00
Carlos Martín Nieto
b7e1c81d1b SecureTransport: allow overriding a bad certificate
Do not automatically fail on a bad certificate, but let the caller
decide. This means we don't need our switch on errors anymore but can
return a string representation from the security framework.
2015-04-23 17:43:43 +02:00
Carlos Martín Nieto
24e53d2fba Rename GIT_SSL to GIT_OPENSSL
This is what it's meant all along, but now we actually have multiple
implementations, it's clearer to use the name of the library.
2015-04-23 17:39:51 +02:00
Carlos Martín Nieto
70b852cee2 Silence unused warnings when not using OpenSSL 2015-04-23 17:39:51 +02:00
Carlos Martín Nieto
6946a3be95 Abstract away the TLS stream implementation
Instead, provide git_tls_stream_new() to ask for the most appropriate
encrypted stream and use it in our HTTP transport.
2015-04-23 17:39:51 +02:00
Carlos Martín Nieto
6bb54cbff3 Add a SecureTransport TLS channel
As an alternative to OpenSSL when we're on OS X. This one can actually
take advantage of stacking the streams.
2015-04-23 17:39:51 +02:00
Edward Thomson
d369d71f6a config: peek returns '\n' on EOF; handle in write 2015-04-23 11:25:07 -04:00
Edward Thomson
6dc55872a8 config: ensure we can write to an empty file 2015-04-23 11:25:03 -04:00
Edward Thomson
2c8c00c646 config: validate config keys 2015-04-23 11:24:59 -04:00
Edward Thomson
23fb4004ed config: test that we validate the key 2015-04-23 11:24:50 -04:00
Carlos Martín Nieto
69c333f997 Merge pull request #3064 from rcorre/config-write-fix
config_write -- handle duplicate section headers when deleting entries
2015-04-23 17:23:04 +02:00