Commit Graph

8781 Commits

Author SHA1 Message Date
Edward Thomson
9bf5bd7cd8 Merge pull request #2867 from ethomson/8dot3
Handle 8dot3 filenames being disabled on Win32
2015-02-05 09:19:46 -05:00
Edward Thomson
3dc92940c8 Merge pull request #2875 from JIghtuse/master
for-each-ref example: initialize libgit2 in main
2015-02-05 09:18:47 -05:00
Boris Egorov
2107dac346 for-each-ref example: init/shutdown libgit2 in main
I don't get how it was working without git_libgit2_init() call. I run it
and libgit2 throws assertion somewhere in its internals. Now it works.

Updated commit with shutdown at the end.
2015-02-05 10:51:22 +06:00
Edward Thomson
3983935b0f Merge pull request #2872 from ethomson/pedantic
Fixes for pedantry
2015-02-04 16:11:15 -05:00
Edward Thomson
a2e4593e82 hash_generic: __extension__ keyword for pedantry 2015-02-04 15:26:09 -05:00
Edward Thomson
0cd479abf4 Merge pull request #2874 from modocache/add-gift
README.md: Add Swift bindings "Gift"
2015-02-04 09:24:49 -05:00
Edward Thomson
fa89ff20cd remove some unused warnings 2015-02-04 14:15:13 +00:00
Edward Thomson
500ec54315 checkout: hold seen dir paths in a map 2015-02-04 14:15:13 +00:00
Edward Thomson
f58cc280c9 attr_session: keep a temp buffer 2015-02-04 14:15:13 +00:00
Edward Thomson
d4b1b76701 checkout: cache system attributes file location 2015-02-04 14:15:12 +00:00
Carlos Martín Nieto
505d5b8a97 Merge pull request #2873 from ethomson/structinit
structinit test: use %PRIuZ instead of %d for size_t
2015-02-04 12:54:57 +01:00
Brian Gesiak
35425b5119 README.md: Add Swift bindings "Gift" 2015-02-04 01:06:07 -05:00
Edward Thomson
f45f9b6dbc structinit test: use %PRIuZ instead of %d for size_t 2015-02-04 03:52:34 +00:00
Edward Thomson
f9e7abcbe2 Merge pull request #2870 from urkud/log-libssh-not-found
Tell user if libssh was not found
2015-02-03 21:44:15 -05:00
Edward Thomson
573a53a8f7 Merge pull request #2861 from libgit2/ntk/appveyor
AppVeyor: Prettify build script
2015-02-03 21:19:21 -05:00
Edward Thomson
07c989e98d win32: further cleanups for 8.3 disabling 2015-02-03 20:01:24 -05:00
Edward Thomson
710f66af35 bswap: remove unused bswap 2015-02-03 18:43:57 -05:00
Yury G. Kudryashov
e15a0849eb Tell user if libssh was not found
Fixes #2665
2015-02-04 00:29:09 +03:00
Carlos Martín Nieto
471b10bd8f Merge pull request #2868 from ethomson/diff_doc
diff docs: update `git_diff_delta` description
2015-02-03 21:19:57 +01:00
Edward Thomson
3538f8f131 diff docs: update git_diff_delta description 2015-02-03 13:41:35 -05:00
Edward Thomson
5f28ec84a1 win32: cleanup 8.3 disabled tests 2015-02-03 12:23:04 -05:00
Jeff Hostetler
1589a93aa6 Fix branch creation when branch name matches namespace of previously deleted branch 2015-02-03 10:33:04 -05:00
Edward Thomson
9f779aacdd attrcache: don't re-read attrs during checkout
During checkout, assume that the .gitattributes files aren't
modified during the checkout.  Instead, create an "attribute session"
during checkout.  Assume that attribute data read in the same
checkout "session" hasn't been modified since the checkout started.
(But allow subsequent checkouts to invalidate the cache.)

Further, cache nonexistent git_attr_file data even when .gitattributes
files are not found to prevent re-scanning for nonexistent files.
2015-02-03 00:31:08 -05:00
Edward Thomson
60561d5446 tests: update for new test data 2015-02-02 22:46:43 -05:00
Edward Thomson
2fbce0bfac checkout test: ensure .gitattributes lifecycle
The .gitattributes cache should not reload .gitattributes in the
middle of checking out, only between checkout operations.  Otherwise,
we'll spend all our time stat'ing and read'ing the gitattributes.
2015-02-02 22:46:39 -05:00
nulltoken
f4e3a6ab59 AppVeyor: Prettify build script 2015-01-31 22:15:10 +01:00
Edward Thomson
f83c19c87d Merge pull request #2832 from ethomson/appveyor_badge
64-bit Appveyor Builds
2015-01-30 14:16:45 -05:00
Carlos Martín Nieto
6e5a397ca6 Merge pull request #2853 from swisspol/empty_doc
Clarified git_repository_is_empty() documentation
2015-01-30 18:00:26 +01:00
Linquize
9dcc4a36f7 Fix test failures when 8.3 is disabled 2015-01-31 00:09:31 +08:00
Pierre-Olivier Latour
9a294fd8c5 Clarified git_repository_is_empty() documentation 2015-01-27 08:17:23 -08:00
Edward Thomson
1ac5acdc69 Merge pull request #2819 from libgit2/cmn/config-get-path
config: add parsing and getter for paths
2015-01-26 11:28:59 -06:00
Edward Thomson
2724219918 Merge pull request #2837 from swisspol/set_index
Allow passing a NULL index to git_repository_set_index()
2015-01-26 11:27:09 -06:00
Edward Thomson
f483720c6f Merge pull request #2839 from swisspol/typo
Fixed typo in git_repository_reinit_filesystem() documentation
2015-01-26 11:25:16 -06:00
Edward Thomson
ff80b5e80b Merge pull request #2847 from jacquesg/coverity
More coverity fixes
2015-01-26 11:24:47 -06:00
Edward Thomson
9a09ed13c4 Merge pull request #2840 from swisspol/sys_repository_include
Make sure sys/repository.h includes the required headers
2015-01-26 11:21:04 -06:00
Edward Thomson
9f1ee63d8f Merge pull request #2841 from swisspol/set_bare
Fixed git_repository_set_bare() not setting "core.bare" correctly
2015-01-26 11:20:00 -06:00
Edward Thomson
65bc22fa50 Merge pull request #2844 from rakuco/netinet-include-fixes
openssl: Add all required includes for AF_INET6 and in6_addr.
2015-01-26 11:18:17 -06:00
Edward Thomson
645073b770 Merge pull request #2848 from JIghtuse/describe_mem_fix
describe example: fix memory allocation size
2015-01-26 10:56:40 -06:00
Carlos Martín Nieto
f101a7d4ff Merge pull request #2846 from JIghtuse/master
pathspec: do not try to dereference NULL
2015-01-26 17:29:15 +01:00
Raphael Kubo da Costa
461fd5a0c7 Add libssh2's library and include directories.
Follow-up to 4f91bfa ("Find libssh2 via pkg-config"): FindPkgConfig sets
<foo>_INCLUDE_DIRS, not <foo>_INCLUDE_DIR like FindLIBSSH2 did.

Additionally, if using only FindPkgConfig to find libssh2, we have to
call LINK_DIRECTORIES() as well to pass the appropriate -L entries,
otherwise the build will only work if libssh2.so is in a directory
searched automatically by the linker.
2015-01-25 22:33:34 +02:00
Boris Egorov
36e13399c0 describe example: fix memory allocation size
We need to allocate memory for sizeof(char *) * ncommits, not just for
ncommits.

Issue detected by GCC's AddressSanitizer.
2015-01-25 22:34:46 +06:00
Jacques Germishuys
bb6aafe88f Ensure the diff hunk callback is specified before trying to dereference it 2015-01-25 14:40:23 +02:00
Jacques Germishuys
636af2198e Return early if allocating a git_pathspec_match_list failed 2015-01-25 14:38:10 +02:00
Jacques Germishuys
b63b3b0e4d Ensure git_index_entry is not NULL before trying to free it 2015-01-25 14:08:05 +02:00
Boris Egorov
dc5fe00c65 pathspec: do not try to dereference NULL
pathspec_match_free() should not dereference a NULL passed to it.

I found this issue when I tried to run example log program with
nonexistent branch:

./example/log help

Such call leads to segmentation fault.
2015-01-25 01:40:44 +06:00
Raphael Kubo da Costa
3cda6be76b openssl: Add all required includes for AF_INET6 and in6_addr.
This fixes the build at least on FreeBSD, where those types were not
defined indirectly:

src/openssl_stream.c💯18: error: variable has incomplete type 'struct in6_addr'
        struct in6_addr addr6;
                        ^
src/openssl_stream.c💯9: note: forward declaration of 'struct in6_addr'
        struct in6_addr addr6;
               ^
src/openssl_stream.c:111:18: error: use of undeclared identifier 'AF_INET'
        if (p_inet_pton(AF_INET, host, &addr4)) {
                        ^
src/unix/posix.h:31:40: note: expanded from macro 'p_inet_pton'
                                       ^
src/openssl_stream.c:115:18: error: use of undeclared identifier 'AF_INET6'
                if(p_inet_pton(AF_INET6, host, &addr6)) {
                               ^
src/unix/posix.h:31:40: note: expanded from macro 'p_inet_pton'
                                       ^
2015-01-24 16:19:43 +02:00
Pierre-Olivier Latour
b2a7bcdb54 Fixed git_repository_set_bare() not setting "core.bare" correctly 2015-01-23 20:57:13 -08:00
Pierre-Olivier Latour
86815dca20 Make sure sys/repository.h includes the required headers
It was missing "common.h" and "types.h" like other system headers.
This generated compilation errors if including it directly.
2015-01-23 16:04:23 -08:00
Pierre-Olivier Latour
22b6a92365 Fixed typo in git_repository_reinit_filesystem() documentation 2015-01-23 15:59:54 -08:00
Pierre-Olivier Latour
fa8ca519cc Allow passing a NULL index to git_repository_set_index()
This is supported by the underlying set_index() implementation
and setting the repository index to NULL is recommended by the
git_repository_set_bare() documentation.
2015-01-23 15:35:29 -08:00