files-backend: use `die("BUG: ...")`, not `die("internal error: ...")`

The former is by far more common in our codebase. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed May 22, 2017 at 16:17 UTC 04aea8d4df199836da3802f08cb5738eae66fa6c
1 file changed +4 -4
refs/files-backend.c
+4 -4
@@ -105,7 +105,7 @@ static void clear_packed_ref_cache(struct files_ref_store *refs)
105 struct packed_ref_cache *packed_refs = refs->packed;
106
107 if (packed_refs->lock)
108 - die("internal error: packed-ref cache cleared while locked");
108 + die("BUG: packed-ref cache cleared while locked");
109 refs->packed = NULL;
110 release_packed_ref_cache(packed_refs);
111 }
@@ -397,7 +397,7 @@ static void add_packed_ref(struct files_ref_store *refs,
397 struct packed_ref_cache *packed_ref_cache = get_packed_ref_cache(refs);
398
399 if (!packed_ref_cache->lock)
400 - die("internal error: packed refs not locked");
400 + die("BUG: packed refs not locked");
401 add_ref_entry(get_packed_ref_dir(packed_ref_cache),
402 create_ref_entry(refname, oid, REF_ISPACKED, 1));
403 }
@@ -1324,7 +1324,7 @@ static int commit_packed_refs(struct files_ref_store *refs)
1324 files_assert_main_repository(refs, "commit_packed_refs");
1325
1326 if (!packed_ref_cache->lock)
1327 - die("internal error: packed-refs not locked");
1327 + die("BUG: packed-refs not locked");
1328
1329 out = fdopen_lock_file(packed_ref_cache->lock, "w");
1330 if (!out)
@@ -1367,7 +1367,7 @@ static void rollback_packed_refs(struct files_ref_store *refs)
1367 files_assert_main_repository(refs, "rollback_packed_refs");
1368
1369 if (!packed_ref_cache->lock)
1370 - die("internal error: packed-refs not locked");
1370 + die("BUG: packed-refs not locked");
1371 rollback_lock_file(packed_ref_cache->lock);
1372 packed_ref_cache->lock = NULL;
1373 release_packed_ref_cache(packed_ref_cache);