Patrick Steinhardt
5aa1f12a81
tests: refs::create: fix memory leak
2017-03-01 07:45:14 +01:00
Patrick Steinhardt
cf8e9a3ad5
Merge pull request #4143 from richardipsum/issue-4094
...
Fix: make reflog include "(merge)" for merge commits
2017-03-01 07:35:44 +01:00
Richard Ipsum
397cf1a1f5
Add test for inclusion of (merge) in reflog
...
This test ensures that the string '(merge)' is included in the reflog
when a merge commit is made.
2017-02-28 22:32:21 +00:00
Richard Ipsum
1255a9ac0c
Fix: make reflog include "(merge)" for merge commits
...
This fixes issue #4094
2017-02-27 23:53:12 +00:00
Edward Thomson
a4b5ac643c
Merge pull request #4138 from richardipsum/symbolic-create-arbitrary-tgt-test
...
tests: Add create__symbolic_with_arbitrary_content
2017-02-26 16:12:30 +00:00
Edward Thomson
55d911d69a
Merge pull request #4142 from pblesi/patch-1
...
Fix minor typos in CONVENTIONS.md
2017-02-26 16:08:00 +00:00
Edward Thomson
6313a20855
Merge pull request #4141 from kainjow/patch-2
...
Fix inet_pton tests triggering an assert in Haiku
2017-02-26 16:01:32 +00:00
Patrick Blesi
c1239e3327
Fix minor typos in CONVENTIONS.md
2017-02-25 23:09:42 -06:00
Kevin Wojniak
4017017740
Fix inet_pton tests triggering an assert in Haiku
...
Haiku will assert in a nightly build if the "dst" input to inet_pton() is NULL.
2017-02-25 10:21:59 -08:00
Richard Ipsum
b84e58f45d
Whitespace and style fixes
...
Use C style comments as per style guide,
and fix mismatching indentation.
2017-02-25 14:18:16 +00:00
Richard Ipsum
d2b3a21f2b
tests: Add create__symbolic_with_arbitrary_content
...
This test ensures that it's possible to create a symbolic ref that
has arbitrary data as its target. It also ensures it's possible
to obtain the target of that symbolic reference from the git_reference
object.
2017-02-25 14:18:16 +00:00
Edward Thomson
7143145f2f
Merge pull request #4137 from libgit2/ethomson/appveyor
...
appveyor: don't rewrite the system mingw
2017-02-25 12:45:14 +00:00
Edward Thomson
408a7b7737
appveyor: don't rewrite system mingw
...
Download mingw-w64 into our build directory and execute it there, don't
try to overwrite the system's mingw.
2017-02-24 20:25:45 +00:00
Edward Thomson
c3abb1d261
appveyor: always build the 'appveyor' branch
...
The 'appveyor' branch is useful for testing AppVeyor builds.
2017-02-24 17:39:01 +00:00
Patrick Steinhardt
7f875fb4f6
Merge pull request #4133 from stinb/khash-cleanup-regression
...
fix regression from #4092
2017-02-24 08:51:50 +01:00
Jason Haslam
685f22519c
pack: fix looping over cache entries
...
Fixes a regression from #4092 . This is a crash on 32-bit and I assume that
it doesn't do the right thing on 64-bit either. MSVC emits a warning for this,
but of course, it's easy to get lost among all of the similar 'possible loss
of data' warnings.
2017-02-22 09:29:00 -07:00
Carlos Martín Nieto
c03f00ea9c
Merge pull request #4131 from pks-t/pks/attrcache-cleanups
...
Attrcache cleanups
2017-02-22 16:30:57 +01:00
Carlos Martín Nieto
86201b92c3
Merge pull request #4135 from libgit2/ethomson/ancient_gcc_not_threadsafe
...
Provide error on gcc < 4.1 when THREADSAFE
2017-02-22 16:17:54 +01:00
Edward Thomson
aa5ea47f73
Provide error on gcc < 4.1 when THREADSAFE
...
Provide a descriptive error message when compiling THREADSAFE on gcc
versions < 4.1. We require the atomic primitives (eg
`__sync_synchronize`) that were introduced in that version.
(Note, clang setes `__GNUC__` but appears to set its version > 4.1.)
2017-02-22 11:21:56 +00:00
Patrick Steinhardt
ce6f61daf0
attrcache: remove useless do_init
indirection
...
Remove useless indirection from `git_attr_cache__init` to
`git_attr_cache__do_init`. The difference is that the
`git_attr_cache__init` macro first checks if the cache is already
initialized and, if so, not call `git_attr_cache__do_init`. But
actually, `git_attr_cache__do_init` already does the same thing and
returns immediately if the cache is already initialized.
Remove the indirection.
2017-02-21 16:17:36 +01:00
Patrick Steinhardt
c11510103d
attrcache: replace existing file entry with git__swap
...
When doing an upsert of a file, we used to use `git__compare_and_swap`,
comparing the entry's file which is to be replaced with itself. This can
be more easily formulated by using `git__swap`, which unconditionally
replaces the value.
2017-02-21 16:17:36 +01:00
Patrick Steinhardt
b8ab782a6d
attrcache: do not lock/unlock the mutex directly
...
Improve encapsulation by not referencing the attrcache mutex directly
but instead using the `attr_cache_lock` and `attr_cache_unlock`
functions.
2017-02-21 16:17:31 +01:00
Edward Thomson
b13f0da153
Merge pull request #4130 from libgit2/ethomson/clar_messages
...
Improve clar messages
2017-02-17 16:32:14 +00:00
Edward Thomson
c52480fde5
cl_git_exec
-> cl_git_expect
2017-02-17 13:01:49 +00:00
Edward Thomson
a1dcc83030
tests: provide better pass/failure error messages
...
Provide more detailed messages when conditions pass or fail
unexpectedly. In particular, this provides the error messages when a
test fails with a different error code than was expected.
2017-02-17 12:58:57 +00:00
Edward Thomson
cc17264270
p_snprintf: no need for arguments to a format
...
`snprintf` requires a _format_ but does not require _arguments_ to the
format. eg: `snprintf(buf, 42, "hi")` is perfectly legal. Expand the
macro to match.
Without this, `p_sprintf(buf, 42, "hi")` errors with:
```
error: expected expression
p_snprintf(msg, 42, "hi");
^
src/unix/posix.h:53:34: note: expanded from macro 'p_snprintf'
^
/usr/include/secure/_stdio.h:57:73: note: expanded from macro 'snprintf'
__builtin___snprintf_chk (str, len, 0, __darwin_obsz(str),
__VA_ARGS__)
```
2017-02-17 12:10:19 +00:00
Patrick Steinhardt
d0c72a92ef
Merge pull request #4092 from pks-t/pks/khash-cleanups
...
khash cleanups
2017-02-17 12:41:05 +01:00
Patrick Steinhardt
8f1ff26bd3
idxmap: remove GIT__USE_IDXMAP
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
cee9ca6609
idxmap: convert to use functions instead of macros
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
8f5fe903d6
offmap: remove GIT__USE_OFFMAP macro
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
cf6124d68b
offmap: convert to use functions instead of macros
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
0d71690549
oidmap: remove GIT__USE_OIDMAP macro
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
659f5d07d5
oidmap: convert macros to functions
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
13c3bc9adf
strmap: remove GIT__USE_STRMAP macro
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
a13cfd2af2
strmap: convert macros to functions
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
f14f75d4a1
khash: avoid using kh_resize
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
73028af85c
khash: avoid using macro magic to get return address
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
85d2748c6f
khash: avoid using kh_key
/kh_val
as lvalue
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
f31cb45ad2
khash: avoid using kh_put
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
a8cd560b10
khash: avoid using kh_del
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
71a54317ef
khash: avoid using kh_key
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
cb18386f72
khash: avoid using kh_val
/kh_value
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
76e671a653
khash: avoid using kh_exist
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
c37b069b9f
khash: avoid using kh_clear
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
a853c52723
khash: avoid using kh_get
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
64e46dc3b5
khash: avoid using kh_end
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
036daa59e9
khash: use git_map_exists
where applicable
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
9694d9ba79
khash: avoid using kh_foreach
/kh_foreach_value
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
63e914cbf4
khash: avoid using kh_size
directly
2017-02-17 11:41:06 +01:00
Patrick Steinhardt
a1b23df58c
offmap: remove unused macro git_offmap_insert2
2017-02-17 11:41:06 +01:00