diff --git a/config.c b/config.c index b894741970..ed96213c44 100644 --- a/config.c +++ b/config.c @@ -465,8 +465,8 @@ const char *git_etc_gitconfig(void) static const char *system_wide; if (!system_wide) { system_wide = ETC_GITCONFIG; - /* interpret path relative to exec-dir */ if (!is_absolute_path(system_wide)) { + /* interpret path relative to exec-dir */ const char *exec_path = git_exec_path(); system_wide = prefix_path(exec_path, strlen(exec_path), system_wide); diff --git a/git-compat-util.h b/git-compat-util.h index bfab97d057..a259da5eeb 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -53,6 +53,7 @@ #include #include #include +#include #include #else int mkstemp (char *__template); diff --git a/help.c b/help.c index 110b66858f..d340b6a1b6 100644 --- a/help.c +++ b/help.c @@ -7,7 +7,6 @@ #include "builtin.h" #include "exec_cmd.h" #include "common-cmds.h" -//#include /* most GUI terminals set COLUMNS (although some don't export it) */ static int term_columns(void) diff --git a/sha1_file.c b/sha1_file.c index 1df56aa417..eadd7e30d2 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -261,7 +261,7 @@ static int link_alt_odb_entry(const char * entry, int len, const char * relative int entlen = pfxlen + 43; int base_len = -1; - if (!is_path_absolute(entry) && relative_base) { + if (!is_absolute_path(entry) && relative_base) { /* Relative alt-odb */ if (base_len < 0) base_len = strlen(relative_base) + 1; @@ -270,7 +270,7 @@ static int link_alt_odb_entry(const char * entry, int len, const char * relative } ent = xmalloc(sizeof(*ent) + entlen); - if (!is_path_absolute(entry) && relative_base) { + if (!is_absolute_path(entry) && relative_base) { memcpy(ent->base, relative_base, base_len - 1); ent->base[base_len - 1] = '/'; memcpy(ent->base + base_len, entry, len); @@ -341,7 +341,7 @@ static void link_alt_odb_entries(const char *alt, const char *ep, int sep, while (cp < ep && *cp != sep) cp++; if (last != cp) { - if (!is_path_absolute(last) && depth) { + if (!is_absolute_path(last) && depth) { error("%s: ignoring relative alternate object store %s", relative_base, last); } else { diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index d93abc4c75..2a2878b572 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -129,17 +129,15 @@ test_expect_failure \ '[index v1] 6) newly created pack is BAD !' \ 'git verify-pack -v "test-4-${pack1}.pack"' -test "$have_64bits" && test_expect_success \ '[index v2] 1) stream pack to repository' \ 'rm -f .git/objects/pack/* && - git-index-pack --index-version=2,0x40000 --stdin < "test-1-${pack1}.pack" && + git-index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" && git prune-packed && git count-objects | ( read nr rest && test "$nr" -eq 1 ) && cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" && - cmp "test-3-${pack1}.idx" ".git/objects/pack/pack-${pack1}.idx"' + cmp "test-2-${pack1}.idx" ".git/objects/pack/pack-${pack1}.idx"' -test "$have_64bits" && test_expect_success \ '[index v2] 2) create a stealth corruption in a delta base reference' \ '# this test assumes a delta smaller than 16 bytes at the end of the pack @@ -152,17 +150,14 @@ test_expect_success \ bs=1 count=20 conv=notrunc && git cat-file blob "$delta_sha1" > blob_4 )' -test "$have_64bits" && test_expect_failure \ '[index v2] 3) corrupted delta happily returned wrong data' \ 'cmp blob_3 blob_4' -test "$have_64bits" && test_expect_failure \ '[index v2] 4) confirm that the pack is actually corrupted' \ 'git fsck --full $commit' -test "$have_64bits" && test_expect_failure \ '[index v2] 5) pack-objects refuses to reuse corrupted data' \ 'git pack-objects test-5