summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:07 (GMT)
commit50f08db5941755b69012378bfc86f6b8ee98edf4 (patch)
treed403a1dbf522fdaab4cf6b9b508a08b3965828e2 /shallow.c
parentbef896e4ab414312cdca493e0306d66ec7246b01 (diff)
parent746ea4adc6cd88ad5f5af6beebace581fe489b2f (diff)
downloadgit-50f08db5941755b69012378bfc86f6b8ee98edf4.zip
git-50f08db5941755b69012378bfc86f6b8ee98edf4.tar.gz
git-50f08db5941755b69012378bfc86f6b8ee98edf4.tar.bz2
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shallow.c b/shallow.c
index 8531361..9ff83ca 100644
--- a/shallow.c
+++ b/shallow.c
@@ -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);