Edward Thomson
710f66af35
bswap: remove unused bswap
2015-02-03 18:43:57 -05: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
ff80b5e80b
Merge pull request #2847 from jacquesg/coverity
...
More coverity fixes
2015-01-26 11:24:47 -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
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
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
Edward Thomson
1188803922
checkout: free last created directory
2015-01-23 00:19:11 +00:00
Edward Thomson
a789b36100
Merge pull request #2829 from jacquesg/dead-code
...
Remove logically dead code (we're already asserting)
2015-01-21 09:20:54 -06:00
Edward Thomson
e74340b000
checkout: remove files before writing new ones
...
On case insensitive filesystems, we may have files in the working
directory that case fold to a name we want to write. Remove those
files (by default) so that we will not end up with a filename that
has the unexpected case.
2015-01-20 17:13:31 -06:00
Edward Thomson
c2dee0fcb0
checkout: drop newline in error message
2015-01-20 17:13:20 -06:00
Edward Thomson
b4cbd67f5f
checkout: don't recreate previous directory
...
Don't bother trying to recreate the previously created directory
during checkout, for a modest reduction in the number of stats.
2015-01-20 17:12:58 -06:00
Edward Thomson
fe598f0903
mkdir: walk up tree to mkdir
...
Walk up the tree to mkdir, which is less immediately efficient,
but allows us to look at intermediate directories that may need
attention.
2015-01-20 17:12:46 -06:00
Edward Thomson
1fbfcdfcd0
git_path_join_unrooted: return base len
...
The documentation for `git_path_join_unrooted` states that the base
length will be returned, so that consumers like checkout know where
to start creating directories instead of always creating directories
at the directory root.
2015-01-20 17:12:35 -06:00
Edward Thomson
1d50b3649d
checkout: introduce git_checkout_perfdata
...
Checkout can now provide performance data about the number of (some)
syscalls performed using an optional callback.
2015-01-20 17:12:23 -06:00
Sven Strickroth
0161e096a3
Make binary detection work similar to vanilla git
...
Main change: Don't treat chars > 128 as non-printable (common in UTF-8 files)
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2015-01-20 16:17:37 -06:00
Jacques Germishuys
9ae4ad2daf
Treat a NULL string as if it's empty
2015-01-20 23:26:55 +02:00
Jacques Germishuys
526182d28c
Remove logically dead code (we're already asserting)
2015-01-20 23:24:32 +02:00
Edward Thomson
147d86fc69
diff: only compute patches when requested
...
When we're called with no hunk or line callback, we don't need to
do the hunk or line computation.
2015-01-20 12:31:24 -06:00
Maks Naumov
d8b5c8c329
Remove strlen() calls from loop condition
...
Avoid str length recalculation every iteration
2015-01-15 15:16:19 +02:00
Carlos Martín Nieto
eac773d92b
config: add parsing and getter for paths
2015-01-14 19:36:50 +01:00
Edward Thomson
85880693d5
Merge branch 'pr/2740'
2015-01-14 10:19:28 -06:00
Pierre-Olivier Latour
b3837d4d2b
Always use GIT_HASHSIG_SMART_WHITESPACE when diffing for merges
...
git_merge_tree_flag_t cannot contain any GIT_DIFF_FIND_xxx flags so there's not point in checking for them
2015-01-14 10:18:00 -06:00
Pierre-Olivier Latour
36fc549781
Added GIT_HASHSIG_ALLOW_SMALL_FILES to allow computing signatures for small files
...
The implementation of the hashsig API disallows computing a signature on
small files containing only a few lines. This new flag disables this
behavior.
git_diff_find_similar() sets this flag by default which means that rename
/ copy detection of small files will now work. This in turn affects the
behavior of the git_status and git_blame APIs which will now detect rename
of small files assuming the right options are passed.
2015-01-14 10:17:56 -06:00
Carlos Martín Nieto
d4b2410126
Merge commit '4b1018d24f980273528743c27c47ceb96cb720bd'
...
Fix crash in free() when git_buf_grow() fails.
2015-01-09 16:47:48 +01:00
Jeff Hostetler
4b1018d24f
Fix crash in free() when git_buf_grow() fails.
2015-01-09 16:46:44 +01:00
Edward Thomson
a8846da7b3
remote: plug leak
2015-01-08 13:45:22 -06:00
Edward Thomson
1646412d8f
Merge pull request #2802 from calavera/remote_create_prune_config
...
Load prune configuration when a remote is created.
2015-01-08 11:20:44 -06:00
David Calavera
c868981f0e
Add extern function to initialize submodule update options.
2015-01-07 09:04:49 -06:00
Edward Thomson
5018e2c639
submodule: declare vars at top of func block
2015-01-06 17:08:38 -06:00
David Calavera
66b71ea5f5
Fix intentation.
2015-01-05 13:33:36 -08:00
David Calavera
1ef3f0cebb
Load prune configuration when a remote is created.
2015-01-05 13:24:11 -08:00
Carlos Martín Nieto
0c6012293a
Merge commit 'refs/pull/2632/head' of github.com:libgit2/libgit2
2015-01-05 20:10:43 +00:00
Pierre-Olivier Latour
c070ac64fd
Fixed internal push state not being cleared on download
...
git_remote_download() must also clear the internal push state resulting from a possible earlier push operation. Otherwise calling git_remote_update_tips() will execute the push version instead of the fetch version and among other things, tags won't be updated.
2015-01-01 04:19:33 -08:00
Edward Thomson
a3ef70bb40
Merge pull request #2761 from libgit2/cmn/fetch-prune
...
Remote-tracking branch prunning
2014-12-30 11:53:55 -06:00
Edward Thomson
c4c47fc286
Merge pull request #2762 from libgit2/cmn/hide-push
...
remote: remove git_push from the public API
2014-12-30 11:53:45 -06:00
Carlos Martín Nieto
fe794b2ea7
remote: remove git_push from the public API
...
Instead we provide git_remote_upload() and git_remote_update_tips() in
order to have a parallel API for fetching and pushing.
2014-12-30 17:02:50 +00:00
Carlos Martín Nieto
13da562a87
Merge pull request #2785 from jacquesg/coverity
...
Coverity fixes
2014-12-30 16:48:52 +00:00
Jacques Germishuys
dfda1cf507
Check for OOM
2014-12-30 12:33:40 +02:00
Jacques Germishuys
0beb7fe427
Added missing error handling path
2014-12-30 12:33:40 +02:00
Jacques Germishuys
3dbd9a0e86
Check the result of git_buf_joinpath
2014-12-30 12:33:39 +02:00
Edward Thomson
4ceb388b13
Merge pull request #2784 from jacquesg/undef-stat
...
Undef stat for Mingw
2014-12-29 14:22:36 -06:00
Jacques Germishuys
6f73e02605
Plug some leaks
2014-12-29 18:18:49 +02:00
Jacques Germishuys
a1daec3c53
Undef stat first
2014-12-29 18:11:33 +02:00