diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-30 07:04:07 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-30 07:04:07 +0200 |
commit | 50f08db5941755b69012378bfc86f6b8ee98edf4 (patch) | |
tree | d403a1dbf522fdaab4cf6b9b508a08b3965828e2 /shallow.c | |
parent | Merge branch 'rs/no-null-ptr-arith-in-fast-export' (diff) | |
parent | BUG_exit_code: fix sparse "symbol not declared" warning (diff) | |
download | git-50f08db5941755b69012378bfc86f6b8ee98edf4.tar.xz git-50f08db5941755b69012378bfc86f6b8ee98edf4.zip |
Merge branch 'js/use-bug-macro'
Developer support update, by using BUG() macro instead of die() to
mark codepaths that should not happen more clearly.
* js/use-bug-macro:
BUG_exit_code: fix sparse "symbol not declared" warning
Convert remaining die*(BUG) messages
Replace all die("BUG: ...") calls by BUG() ones
run-command: use BUG() to report bugs, not die()
test-tool: help verifying BUG() code paths
Diffstat (limited to 'shallow.c')
-rw-r--r-- | shallow.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -20,7 +20,7 @@ static char *alternate_shallow_file; void set_alternate_shallow_file(const char *path, int override) { if (is_shallow != -1) - die("BUG: is_repository_shallow must not be called before set_alternate_shallow_file"); + BUG("is_repository_shallow must not be called before set_alternate_shallow_file"); if (alternate_shallow_file && !override) return; free(alternate_shallow_file); @@ -218,7 +218,7 @@ struct commit_list *get_shallow_commits_by_rev_list(int ac, const char **av, static void check_shallow_file_for_update(void) { if (is_shallow == -1) - die("BUG: shallow must be initialized by now"); + BUG("shallow must be initialized by now"); if (!stat_validity_check(&shallow_stat, git_path_shallow())) die("shallow file has changed since we read it"); @@ -446,7 +446,7 @@ static uint32_t *paint_alloc(struct paint_info *info) void *p; if (!info->pool_count || size > info->end - info->free) { if (size > POOL_SIZE) - die("BUG: pool size too small for %d in paint_alloc()", + BUG("pool size too small for %d in paint_alloc()", size); info->pool_count++; REALLOC_ARRAY(info->pools, info->pool_count); |