Vicent Marti
6a1ca96e41
Temporary fix for Travis CI builds
...
See https://github.com/libgit2/libgit2/pull/2321#issuecomment-42039673
We may rollback once we found something more reliable
2014-05-02 17:14:33 +02:00
Vicent Marti
89e9c1674c
Merge pull request #2318 from linquize/sleep
...
Make examples/status.c compile on Windows
2014-05-02 03:37:40 -07:00
Vicent Marti
644592bc73
Merge pull request #2320 from libgit2/rb/fix-starstar-again
...
Make ** pattern eat trailing slash
2014-05-02 03:36:22 -07:00
Russell Belfer
d19b2f9f9f
Make ** pattern eat trailing slash
...
This allows "foo/**/*.html" to match "foo/file.html"
2014-05-01 12:46:46 -07:00
Linquize
d0420fc681
Make examples/status.c compile on Windows
2014-05-01 22:39:35 +08:00
Jacques Germishuys
f5dd2a2891
git_pool_mallocsz takes an unsigned long
2014-05-01 10:49:51 +02:00
Jacques Germishuys
6e94a1efbc
_InterlockedExchange expects a volatile LONG
2014-05-01 10:49:51 +02:00
Jacques Germishuys
1017f81f00
Undef lseek first
2014-05-01 10:49:51 +02:00
Vicent Marti
9d878fc420
Merge pull request #2304 from jacquesg/solaris
...
Solaris!
2014-05-01 01:23:10 -07:00
Jacques Germishuys
183aa4f831
Check for NULL before passing it to vsnprintf
2014-04-30 22:58:40 +02:00
Jacques Germishuys
6b05240cea
strcasecmp is in <strings.h>
2014-04-30 17:05:13 +02:00
Jacques Germishuys
98b8fcff4f
Build regex.c for Solaris. Added required defines for Solaris
2014-04-30 17:05:13 +02:00
Carlos Martín Nieto
5cdac19caa
remote: move branch upstream deletion to use an iterator
...
This should make it more readable and allocate a bunch fewer strings.
2014-04-30 14:47:32 +02:00
Vicent Marti
c522bed0af
Merge pull request #2314 from libgit2/cmn/known-libs
...
Assorted CMake fixups
2014-04-30 05:45:31 -07:00
Vicent Marti
739040e667
Merge pull request #2315 from jacquesg/qsort-cygwin
...
cygwin also doesn't have qsort_r
2014-04-30 05:34:33 -07:00
Jacques Germishuys
90a4340aaa
cygwin also doesn't have qsort_r
2014-04-30 13:17:15 +02:00
Carlos Martín Nieto
039e354b7d
ciscript: don't use an empty string as a number
...
An empty string is not a valid number, and some shells complain.
Check instead if $COVERITY is non-empty, which is a common convention
and what we're doing anyway.
2014-04-30 12:02:10 +02:00
nulltoken
40e48ea40f
remote: Introduce git_remote_delete()
2014-04-30 11:45:49 +02:00
Carlos Martín Nieto
891b0277af
refs: document _next_name()
...
If it's not documented, it doesn't show up in the docs (and we really
should document, anyway).
2014-04-30 11:20:51 +02:00
Carlos Martín Nieto
f5fc63bc0c
Don't exclude libssh2 from MinGW
...
It reportedly works. It does not however work when cross-compiling on
Travis, so let's disable it there.
This fixes #2311 .
2014-04-30 11:15:41 +02:00
Ting-Wei Lan
096ac799a3
Workaround missing .pc files on FreeBSD
...
This fixes #2118
2014-04-30 10:51:44 +02:00
Carlos Martín Nieto
04739e9f4a
Unquiet CMake output
...
The point of this phase is to know what we have and not. Show the user a
clear indication of what we have.
2014-04-30 10:15:44 +02:00
nulltoken
3a728fb508
object: introduce git_describe_object()
2014-04-30 09:46:25 +02:00
nulltoken
4cc71bb7fb
tests: Add "describe" test repository
...
Built with the following script:
#!/bin/sh
test_tick () {
sleep 10
}
test_tick &&
echo one >file && git add file && git commit -m initial &&
one=$(git rev-parse HEAD) &&
git describe --always HEAD &&
test_tick &&
echo two >file && git add file && git commit -m second &&
two=$(git rev-parse HEAD) &&
test_tick &&
echo three >file && git add file && git commit -m third &&
test_tick &&
echo A >file && git add file && git commit -m A &&
test_tick &&
git tag -a -m A A &&
test_tick &&
echo c >file && git add file && git commit -m c &&
test_tick &&
git tag c &&
git reset --hard $two &&
test_tick &&
echo B >side && git add side && git commit -m B &&
test_tick &&
git tag -a -m B B &&
test_tick &&
git merge -m Merged c &&
merged=$(git rev-parse HEAD) &&
git reset --hard $two &&
test_tick &&
echo D >another && git add another && git commit -m D &&
test_tick &&
git tag -a -m D D &&
test_tick &&
git tag -a -m R R &&
test_tick &&
echo DD >another && git commit -a -m another &&
test_tick &&
git tag e &&
test_tick &&
echo DDD >another && git commit -a -m "yet another" &&
test_tick &&
git merge -m Merged $merged &&
test_tick &&
echo X >file && echo X >side && git add file side &&
git commit -m x
2014-04-30 09:31:58 +02:00
nulltoken
de1e81aa10
oidmap: Enhance the khash wrapper
2014-04-30 09:31:58 +02:00
nulltoken
48ebea662a
tests: Introduce count_config_entries_match() helper
2014-04-30 07:24:20 +02:00
Carlos Martín Nieto
217c029b54
commit: safer commit creation with reference update
...
The current version of the commit creation and amend function are unsafe
to use when passing the update_ref parameter, as they do not check that
the reference at the moment of update points to what the user expects.
Make sure that we're moving history forward when we ask the library to
update the reference for us by checking that the first parent of the new
commit is the current value of the reference. We also make sure that the
ref we're updating hasn't moved between the read and the write.
Similarly, when amending a commit, make sure that the current tip of the
branch is the commit we're amending.
2014-04-30 00:41:37 +02:00
Vicent Marti
892778ee84
Merge pull request #2309 from jacquesg/midnightbsd
...
MidnightBSD may also not have strnlen
2014-04-29 05:02:38 -07:00
Jacques Germishuys
36a6151833
MidnightBSD may also not have strnlen
2014-04-29 13:28:16 +02:00
Vicent Marti
041336e6bd
Merge pull request #2306 from odcinek/development_cmake
...
Make the build CMake 2.6 compatible
2014-04-28 07:36:27 -07:00
Marcin Sawicki
7f0de93a0d
Make the build CMake 2.6 compatible
2014-04-28 15:24:36 +01:00
Vicent Marti
ec77105889
Merge pull request #2301 from libgit2/cmn/pack-objects-memory
...
Keep the deflate buffer from ballooning up
2014-04-27 03:57:53 -07:00
Carlos Martín Nieto
38d338b2b8
pack-objects: always write out the status in write_one()
...
Make sure we set the output parameter to a value.
2014-04-26 18:15:39 +02:00
Carlos Martín Nieto
c7f86efb13
zstream: grow based on used memory rather than allocated
...
When deflating data, we might need to grow the buffer. Currently we
add a guess on top of the currently-allocated buffer size.
When we re-use the buffer, it already has some memory allocated; adding
to that means that we always grow the buffer regardless of how much we
need to use.
Instead, increase on top of the currently-used size. This still leaves
us with the allocated size of the largest object we compress, but it's a
minor pain compared to unbounded growth.
This fixes #2285 .
2014-04-26 18:04:43 +02:00
Carlos Martín Nieto
783555d8e1
netops: catch the server not sending a certificate
...
It's possible for an encrypted connection not have a certificate. In
this case, SSL_get_verify_result() will return OK because no error
happened (as it never even tried to validate anything).
SSL_get_peer_certificate() will return NULL in this case so we need to
catch that. On the upside, the current code would segfault in this
situation instead of letting it through as a valid cert.
2014-04-26 17:27:43 +02:00
Carlos Martín Nieto
51d3f6f5f2
netops: provide more specific error for cert failure
...
Specify what we do not like about the certificate. In this case, we do
not like the name.
2014-04-26 17:27:43 +02:00
Carlos Martín Nieto
1f0d4f3d8d
netops: unit-test the cert host-name pattern matching
...
This kind of stuff should have unit tests, even if it's just to show
what we expect to match successfully.
2014-04-26 17:27:42 +02:00
Carlos Martín Nieto
4f9d54146d
refdb: fix typo and wording
2014-04-26 14:29:18 +02:00
Vicent Marti
e79a2998cb
Merge pull request #2299 from mekishizufu/fix_leaks
...
Plug some leaks
2014-04-25 07:08:41 -07:00
Jiri Pospisil
7b8d564d5d
Reset tests: Use sandboxed index
2014-04-25 15:49:58 +02:00
Jiri Pospisil
424222f415
Filter: Make sure to release local on error
2014-04-25 15:49:26 +02:00
Vicent Marti
8443ed6c1d
Merge pull request #2284 from jacquesg/push-progress-callback
...
Fire progress and update tips callbacks also for pushes.
2014-04-25 02:10:19 -07:00
Vicent Marti
332e4f2027
Merge pull request #2297 from libgit2/rb/status-with-precomposed-changes
...
Improve test coverage of status with different core.precomposeunicode settings
2014-04-25 02:07:42 -07:00
Vicent Marti
2ad51b81d2
Merge pull request #2241 from libgit2/rb/stash-skip-submodules
...
Improve stash and checkout for ignored + untracked items
2014-04-25 02:04:12 -07:00
Russell Belfer
af9eeac939
Merge pull request #2294 from ethomson/merge_checkout_strategy
...
Merge checkout strategy
2014-04-24 16:20:08 -07:00
Russell Belfer
6b833e3a4a
Improve docs for status rename detection limits
...
and make tests empty on platforms without iconv support.
2014-04-24 15:40:50 -07:00
Russell Belfer
f608f3bb27
Test toggling core.precomposeunicode yields rename
...
There is an interesting difference with core Git here, though.
Because libgit2 will do rename detection with the working directory,
in the last case where the HEAD and the working directory both
have the decomposed data and the index has the composed data, we
generate a single status record with two renames whereas Git will
generate one rename (head to index) and one untracked file.
2014-04-24 15:25:01 -07:00
Russell Belfer
2334e3d8c3
Test decomposed unicode renames work as expected
2014-04-24 14:46:59 -07:00
Russell Belfer
a409acefbb
Handle explicitly ignored dir slightly differently
...
When considering status of untracked directories, if we find an
explicitly ignored item, even if it is a directory, treat the
parent as an IGNORED item. It was accidentally being treated as
an EMPTY item because we were not looking into the ignored subdir.
2014-04-24 11:59:50 -07:00
Vicent Marti
87c9b741df
Merge pull request #2295 from libgit2/cmn/fetchhead-quote
...
fetchhead: deal with quotes in branch names
2014-04-24 05:24:46 -07:00