[PATCH 1/2] config.mak.uname: OpenBSD uses BSD semantics with fread for directories

2018-12-01 Thread Carlo Marcelo Arenas Belón
6.4) but considering this is a legacy feature it is likely that it affected all old versions and is probably what most users had been using as a workaround Signed-off-by: Carlo Marcelo Arenas Belón --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.un

[PATCH] t5004: avoid using tar for empty packages

2018-12-01 Thread Carlo Marcelo Arenas Belón
the expected result for its tests from one containing an empty directory to a plain empty archive but the portable test wasn't updated resulting on them failing again in (at least) NetBSD and OpenBSD Signed-off-by: Carlo Marcelo Arenas Belón --- t/t5004-archive-corner-cases.sh | 17

[PATCH] t5004: avoid using tar for empty packages

2018-12-01 Thread Carlo Marcelo Arenas Belón
the expected result for its tests from one containing an empty directory to a plain empty archive but the portable test wasn't updated resulting on them failing again in (at least) NetBSD and OpenBSD Signed-off-by: Carlo Marcelo Arenas Belón --- t/t5004-archive-corner-cases.sh | 17

Re: [PATCH] t6036: avoid "cp -a"

2018-12-01 Thread Carlo Marcelo Arenas Belón
B3n?= Subject: [PATCH] tests: add lint for non portable cp -a cp -a, while a common flag isn't in POSIX and will therefore fail on systems that don't have GNUish tools (like OpenBSD, AIX or Solaris) Signed-off-by: Carlo Marcelo Arenas Belón --- t/check-non-portable-shell.pl | 1 + 1 file changed

[PATCH] t6036: avoid "cp -a"

2018-11-30 Thread Carlo Marcelo Arenas Belón
b8cd1bb713 ("t6036, t6043: increase code coverage for file collision handling", 2018-11-07) uses this GNU extension that is not available in a POSIX complaint cp; use cp -R instead Signed-off-by: Carlo Marcelo Arenas Belón --- to be applied on top of en/merge-path-collision for next

[PATCH] config.mak.dev: enable -Wpedantic in clang

2018-11-27 Thread Carlo Marcelo Arenas Belón
so correct that with the hope that in the future CI could be used for early detection of similar issues -Wpedantic is only enabled for clang 10 or higher (only available in macOS with latest Xcode) but this restriction should be relaxed further as more environments are tested Signed-off-by: Carlo Marcelo Ar

[RFC PATCH 5/7] test-lib: use pkgsrc provided unzip for NetBSD

2018-11-25 Thread Carlo Marcelo Arenas Belón
ead so all tests from t5003 succeed Signed-off-by: Carlo Marcelo Arenas Belón --- t/test-lib.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/test-lib.sh b/t/test-lib.sh index 6c6c0af7a1..2acb35f277 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1244,6 +1244,7 @@ test_lazy_pre

[RFC PATCH 7/7] config.mak.uname: use pkgsrc perl for NetBSD

2018-11-25 Thread Carlo Marcelo Arenas Belón
otherwise will default to /usr/bin/perl which wouldn't normally exist Signed-off-by: Carlo Marcelo Arenas Belón --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.uname index 59ce03819b..d2edb723f4 100644 --- a/config.mak.uname +++ b

[RFC PATCH 6/7] t5004: use GNU tar to avoid known issues with BSD tar

2018-11-25 Thread Carlo Marcelo Arenas Belón
56ee96572a ("t5004: resurrect original empty tar archive test", 2013-05-09) added a test to try to detect and workaround issues with the standard tar from BSD, but at least in NetBSD would be better to instead require GNU tar which is available from pkgsrc Signed-off-by: Carlo Marc

[RFC PATCH 2/7] t0301: remove trailing / for dir creation

2018-11-25 Thread Carlo Marcelo Arenas Belón
an alternative fix Signed-off-by: Carlo Marcelo Arenas Belón --- t/t0301-credential-cache.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh index fd92533acf..9529c612af 100755 --- a/t/t0301-credential-cache.sh +++ b/t

[RFC PATCH 4/7] config.mak.uname: NetBSD uses old iconv interface

2018-11-25 Thread Carlo Marcelo Arenas Belón
-util.h:275:0, from utf8.c:1: /usr/include/iconv.h:46:8: note: expected 'const char ** restrict' but argument is of type 'char **' size_t iconv(iconv_t, const char ** __restrict, ^ it is set by optional configure at least since NetBSD 6.0 Signed-off-by: Carlo Marcelo Arenas

[RFC PATCH 3/7] config.mak.uname: NetBSD uses BSD semantics with fread for directories

2018-11-25 Thread Carlo Marcelo Arenas Belón
oing as a workaround Signed-off-by: Carlo Marcelo Arenas Belón --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.uname index 3ee7da0e23..36c973c7e6 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -253,6 +253,7 @@ ife

[RFC PATCH 1/7] Documentation: update INSTALL for NetBSD

2018-11-25 Thread Carlo Marcelo Arenas Belón
NetBSD added a BSD licensed reimplementation of GNU libintl to its base at least since release 4.0 (mid 2012) and git can be configured to build with it. Signed-off-by: Carlo Marcelo Arenas Belón --- INSTALL | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL b

[RFC PATCH 0/7] test: NetBSD support

2018-11-25 Thread Carlo Marcelo Arenas Belón
Likely still missing changes as it only completes a run with a minimal number of dependencies but open for feedback Requires pkgsrc packages for gmake, perl, bash and curl and completes a run $ gmake SHELL_PATH=/usr/pkg/bin/bash NO_PYTHON=1 CURL_DIR=/usr/pkg test Carlo Marcelo Arenas Belón (7

[PATCH v1 1/1] t5601-99: Enable colliding file detection for MINGW

2018-11-22 Thread Carlo Marcelo Arenas Belón
tter to avoid any compiled assumptions about the platform and let the user drive the fallback through core.checkStat instead Signed-off-by: Carlo Marcelo Arenas Belón --- entry.c | 4 1 file changed, 4 deletions(-) diff --git a/entry.c b/entry.c index 0a3c451f5f..5ae74856e6 100644 --- a/

[PATCH] t5562: skip if NO_CURL is enabled

2018-11-19 Thread Carlo Marcelo Arenas Belón
6c213e863a ("http-backend: respect CONTENT_LENGTH for receive-pack", 2018-07-27) introduced all tests but without a check for CURL support from git. Signed-off-by: Carlo Marcelo Arenas Belón --- t/t5562-http-backend-content-length.sh | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH v5] clone: report duplicate entries on case-insensitive filesystems

2018-11-19 Thread Carlo Marcelo Arenas Belón
ernel.org/pub/scm/docs/man-pages/man-pages.git warning: the following paths have collided (e.g. case-sensitive paths on a case-insensitive filesystem) and only one from the same colliding group is in the working tree: 'man2/_Exit.2' 'man2/_exit.2' 'man3/NAN.3' 'man3/nan.3' Signed-off-by:

[PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-12 Thread Carlo Marcelo Arenas Belón
ication times of a shared index. dddbad728c ("timestamp_t: a new data type for timestamps", 2017-04-26) shows why that might be problematic so move to timestamp_t/time_t. if time_t can't represent a valid time keep the indexes for failsafe Signed-off-by: Carlo Marcelo Arenas Belón

[PATCH 1/2] builtin/commit: use timestamp_t in parse_force_date

2018-11-12 Thread Carlo Marcelo Arenas Belón
of unsigned long. Signed-off-by: Carlo Marcelo Arenas Belón --- builtin/commit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index 0d9828e29e..a447e08f62 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -537,10 +537,10 @@ static i

[PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-12 Thread Carlo Marcelo Arenas Belón
problematic so move to time_t instead. Signed-off-by: Carlo Marcelo Arenas Belón --- read-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/read-cache.c b/read-cache.c index 7b1354d759..5525d8e679 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2625,9 +

[PATCH 0/2] avoid unsigned long for timestamps

2018-11-12 Thread Carlo Marcelo Arenas Belón
specially problematic in Windows where unsigned long is only 32bit wide and therefore the assumption that a time_t would fit will lead to loss of precision in a 64bit OS. builtin/commit.c | 4 ++-- read-cache.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)

[PATCH] builtin/notes: remove unnecessary free

2018-11-11 Thread Carlo Marcelo Arenas Belón
511726e4b1 ("builtin/notes: fix premature failure when trying to add the empty blob", 2014-11-09) removed the check for !len but left a call to free the buffer that will be otherwise NULL Signed-off-by: Carlo Marcelo Arenas Belón --- builtin/notes.c | 4 +--- 1 file changed, 1 inser

[PATCH] parse-options: deprecate OPT_DATE

2018-11-05 Thread Carlo Marcelo Arenas Belón
Signed-off-by: Carlo Marcelo Arenas Belón --- Documentation/technical/api-parse-options.txt | 4 1 file changed, 4 deletions(-) diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt index 829b558110..2b036d7838 100644

[PATCH] multi-pack-index: make code -Wunused-parameter clean

2018-11-03 Thread Carlo Marcelo Arenas Belón
Signed-off-by: Carlo Marcelo Arenas Belón --- midx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/midx.c b/midx.c index 4fac0cd08a..a2c17e3108 100644 --- a/midx.c +++ b/midx.c @@ -710,7 +710,7 @@ static size_t write_midx_object_offsets(struct hashfile *f, int large_

[PATCH v3 3/3] commit-slab: missing definitions and forward declarations (hdr-check)

2018-10-25 Thread Carlo Marcelo Arenas Belón
struct commmit needs to be defined before commit-slab can generate working code, object_id should be at least known through a forward declaration Signed-off-by: Carlo Marcelo Arenas Belón --- commit-slab-impl.h | 2 ++ commit-slab.h | 2 ++ 2 files changed, 4 insertions(+) diff --git

[PATCH v3 1/3] commit-slab: move MAYBE_UNUSED into git-compat-util

2018-10-25 Thread Carlo Marcelo Arenas Belón
after 36da893114 ("config.mak.dev: enable -Wunused-function", 2018-10-18) it is expected to be used to prevent -Wunused-function warnings for code that was macro generated Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- commit-slab-impl.h | 4 +--- git-com

[PATCH v3 0/3] delta-islands: avoid unused function messages

2018-10-25 Thread Carlo Marcelo Arenas Belón
message cleanup * Make changes hdr-check clean Changes from v1: * Use MAYBE_UNUSED for all cases as suggested by Duy Carlo Marcelo Arenas Belón (3): commit-slab: move MAYBE_UNUSED into git-compat-util khash: silence -Wunused-function in delta-islands from khash commit-slab: missing definitions

[PATCH v3 2/3] khash: silence -Wunused-function in delta-islands from khash

2018-10-25 Thread Carlo Marcelo Arenas Belón
: unused function 'kh_del_str' [-Wunused-function] Reported-by: René Scharfe Suggested-by: Nguyễn Thái Ngọc Duy Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- khash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/khash.h b/khash.h index d10caa0c35

[PATCH v2] sequencer: cleanup for gcc warning in non developer mode

2018-10-25 Thread Carlo Marcelo Arenas Belón
e inferred by the previous call the somehow more convoluted syntax works around the issue by providing a non empty format string and is already being used for the abort safety file since 1e41229d96 ("sequencer: make sequencer abort safer", 2016-12-07) Signed-off-by: Carlo Marcelo Aren

[PATCH] sequencer: cleanup for gcc 8.2.1 warning

2018-10-24 Thread Carlo Marcelo Arenas Belón
sequencer.c: In function ‘write_basic_state’: sequencer.c:2392:37: warning: zero-length gnu_printf format string [-Wformat-zero-length] write_file(rebase_path_verbose(), ""); Signed-off-by: Carlo Marcelo Arenas Belón --- sequencer.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v2 2/2] khash: silence -Wunused-function for delta-islands

2018-10-23 Thread Carlo Marcelo Arenas Belón
: unused function 'kh_del_str' [-Wunused-function] Reported-by: René Scharfe Suggested-by: Nguyễn Thái Ngọc Duy Signed-off-by: Carlo Marcelo Arenas Belón --- khash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/khash.h b/khash.h index c0da40daa7..fb71c92547 100644 --- a/khash.h

[PATCH v2 0/2] delta-islands: avoid unused function messages

2018-10-23 Thread Carlo Marcelo Arenas Belón
the macro generated code from delta-islands (using khash) triggers some unused function warnings in macOS, OpenBSD and some linux with a newer version of clang Carlo Marcelo Arenas Belón (2): commit-slabs: move MAYBE_UNUSED out khash: silence -Wunused-function for delta-islands commit-slab

[PATCH v2 1/2] commit-slabs: move MAYBE_UNUSED out

2018-10-23 Thread Carlo Marcelo Arenas Belón
after 36da893114 ("config.mak.dev: enable -Wunused-function", 2018-10-18) it is expected to be used to prevent -Wunused-function warnings for code that was macro generated Signed-off-by: Carlo Marcelo Arenas Belón --- commit-slab-impl.h | 4 ++-- git-compat-util.h | 2 ++ 2 files

[PATCH v2] compat: make sure git_mmap is not expected to write

2018-10-23 Thread Carlo Marcelo Arenas Belón
in f48000fc ("Yank writing-back support from gitfakemmap.", 2005-10-08) support for writting back changes was removed but the specific prot flag that would be used was not checked for Acked-by: Johannes Schindelin Signed-off-by: Carlo Marcelo Arenas Belón --- Changes in v2: * re

[PATCH] khash: silence -Wunused-function

2018-10-23 Thread Carlo Marcelo Arenas Belón
after 36da893114 ("config.mak.dev: enable -Wunused-function", 2018-10-18) macro generated code should use a similar solution than commit-slab to silence the compiler. Signed-off-by: Carlo Marcelo Arenas Belón --- khash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] test: avoid failures when USE_NED_ALLOCATOR

2018-10-23 Thread Carlo Marcelo Arenas Belón
contrib/nedmalloc doesn't support MALLOC_CHECK_ or MALLOC_PERTURB_ so add it to the same exception that is being used with valgrind Signed-off-by: Carlo Marcelo Arenas Belón --- t/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index

[PATCH 1/3] sha256: avoid redefinition for MIN

2018-10-21 Thread Carlo Marcelo Arenas Belón
it is already defined whenever "sys/param.h" is available Signed-off-by: Carlo Marcelo Arenas Belón --- sha256/block/sha256.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sha256/block/sha256.c b/sha256/block/sha256.c index 18350c161a..0d4939cc2c 100644 --- a/sha256/block/sha2

[PATCH 3/3] xdiff: use compat's MIN instead

2018-10-21 Thread Carlo Marcelo Arenas Belón
Signed-off-by: Carlo Marcelo Arenas Belón --- xdiff/xdiffi.c | 2 +- xdiff/xemit.c | 6 +++--- xdiff/xhistogram.c | 6 +++--- xdiff/xmacros.h| 4 +--- xdiff/xprepare.c | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c index

[RFC/PATCH 0/3] refactor MIN macro

2018-10-21 Thread Carlo Marcelo Arenas Belón
otherwise will warn on platforms where it is already defined (macOS) convert the internal version from xdiff to a common one from the compatibilty header additionally

[PATCH 2/3] git-compat-util: define MIN through compat

2018-10-21 Thread Carlo Marcelo Arenas Belón
this macro is commonly defined in system headers (usually ) but if it is not define it here so it can be used elsewhere Signed-off-by: Carlo Marcelo Arenas Belón --- git-compat-util.h | 5 + sha256/block/sha256.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH] read-cache: use of memory after it is freed

2018-10-20 Thread Carlo Marcelo Arenas Belón
introduced with c46c406ae1e (trace.h: support nested performance tracing) on Aug 18, 2018 but not affecting maint Signed-off-by: Carlo Marcelo Arenas Belón --- read-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/read-cache.c b/read-cache.c index 1df5c16dbc

[PATCH] builtin/receive-pack: dead initializer for retval in check_nonce

2018-10-20 Thread Carlo Marcelo Arenas Belón
NONCE_BAD is explicitly set when needed with the fallback instead as NONCE_SLOP Signed-off-by: Carlo Marcelo Arenas Belón --- builtin/receive-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 95740f4f0e..ecce3d4043

[PATCH] multi-pack-index: avoid dead store for struct progress

2018-10-18 Thread Carlo Marcelo Arenas Belón
it is initialized unconditionally by a call to start_progress below. Signed-off-by: Carlo Marcelo Arenas Belón --- midx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/midx.c b/midx.c index ea2f3ffe2e..4fac0cd08a 100644 --- a/midx.c +++ b/midx.c @@ -941,7 +941,7 @@ static

[PATCH] unpack-trees: avoid dead store for struct progress

2018-10-18 Thread Carlo Marcelo Arenas Belón
it is unconditionally initialized a few lines below Signed-off-by: Carlo Marcelo Arenas Belón --- unpack-trees.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unpack-trees.c b/unpack-trees.c index f25089b878..88dc9a615e 100644 --- a/unpack-trees.c +++ b/unpack-trees.c