Merge branch 'tb/char-may-be-unsigned' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 21 Nov 2018 13:58:09 +0000 (22:58 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Nov 2018 13:58:09 +0000 (22:58 +0900)
Build portability fix.

* tb/char-may-be-unsigned:
path.c: char is not (always) signed

1  2 
path.c
diff --combined path.c
index 34f0f98349a6eccd462614cdf143bb031ca348c8,cd3173470034cd9d29946a8eaf090220b7e94c3c..ba06ec5b2d6cd307c7d30384b056cf8a6c61baa8
--- 1/path.c
--- 2/path.c
+++ b/path.c
@@@ -10,7 -10,6 +10,7 @@@
  #include "submodule-config.h"
  #include "path.h"
  #include "packfile.h"
 +#include "object-store.h"
  
  static int get_st_mode_bits(const char *path, int *mode)
  {
@@@ -383,7 -382,7 +383,7 @@@ static void adjust_git_path(const struc
                strbuf_splice(buf, 0, buf->len,
                              repo->index_file, strlen(repo->index_file));
        else if (dir_prefix(base, "objects"))
 -              replace_dir(buf, git_dir_len + 7, repo->objectdir);
 +              replace_dir(buf, git_dir_len + 7, repo->objects->objectdir);
        else if (git_hooks_path && dir_prefix(base, "hooks"))
                replace_dir(buf, git_dir_len + 5, git_hooks_path);
        else if (repo->different_commondir)
@@@ -1369,7 -1368,7 +1369,7 @@@ only_spaces_and_periods
                        saw_tilde = 1;
                } else if (i >= 6)
                        return 0;
-               else if (name[i] 0) {
+               else if (name[i] & 0x80) {
                        /*
                         * We know our needles contain only ASCII, so we clamp
                         * here to make the results of tolower() sane.
@@@ -1442,12 -1441,12 +1442,12 @@@ char *xdg_cache_home(const char *filena
        return NULL;
  }
  
 -GIT_PATH_FUNC(git_path_cherry_pick_head, "CHERRY_PICK_HEAD")
 -GIT_PATH_FUNC(git_path_revert_head, "REVERT_HEAD")
 -GIT_PATH_FUNC(git_path_squash_msg, "SQUASH_MSG")
 -GIT_PATH_FUNC(git_path_merge_msg, "MERGE_MSG")
 -GIT_PATH_FUNC(git_path_merge_rr, "MERGE_RR")
 -GIT_PATH_FUNC(git_path_merge_mode, "MERGE_MODE")
 -GIT_PATH_FUNC(git_path_merge_head, "MERGE_HEAD")
 -GIT_PATH_FUNC(git_path_fetch_head, "FETCH_HEAD")
 -GIT_PATH_FUNC(git_path_shallow, "shallow")
 +REPO_GIT_PATH_FUNC(cherry_pick_head, "CHERRY_PICK_HEAD")
 +REPO_GIT_PATH_FUNC(revert_head, "REVERT_HEAD")
 +REPO_GIT_PATH_FUNC(squash_msg, "SQUASH_MSG")
 +REPO_GIT_PATH_FUNC(merge_msg, "MERGE_MSG")
 +REPO_GIT_PATH_FUNC(merge_rr, "MERGE_RR")
 +REPO_GIT_PATH_FUNC(merge_mode, "MERGE_MODE")
 +REPO_GIT_PATH_FUNC(merge_head, "MERGE_HEAD")
 +REPO_GIT_PATH_FUNC(fetch_head, "FETCH_HEAD")
 +REPO_GIT_PATH_FUNC(shallow, "shallow")