Skip to content

Commit 04aea8d

Browse files
mhaggergitster
authored andcommitted
files-backend: use die("BUG: ..."), not die("internal error: ...")
The former is by far more common in our codebase. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e186057 commit 04aea8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

refs/files-backend.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static void clear_packed_ref_cache(struct files_ref_store *refs)
105105
struct packed_ref_cache *packed_refs = refs->packed;
106106

107107
if (packed_refs->lock)
108-
die("internal error: packed-ref cache cleared while locked");
108+
die("BUG: packed-ref cache cleared while locked");
109109
refs->packed = NULL;
110110
release_packed_ref_cache(packed_refs);
111111
}
@@ -397,7 +397,7 @@ static void add_packed_ref(struct files_ref_store *refs,
397397
struct packed_ref_cache *packed_ref_cache = get_packed_ref_cache(refs);
398398

399399
if (!packed_ref_cache->lock)
400-
die("internal error: packed refs not locked");
400+
die("BUG: packed refs not locked");
401401
add_ref_entry(get_packed_ref_dir(packed_ref_cache),
402402
create_ref_entry(refname, oid, REF_ISPACKED, 1));
403403
}
@@ -1324,7 +1324,7 @@ static int commit_packed_refs(struct files_ref_store *refs)
13241324
files_assert_main_repository(refs, "commit_packed_refs");
13251325

13261326
if (!packed_ref_cache->lock)
1327-
die("internal error: packed-refs not locked");
1327+
die("BUG: packed-refs not locked");
13281328

13291329
out = fdopen_lock_file(packed_ref_cache->lock, "w");
13301330
if (!out)
@@ -1367,7 +1367,7 @@ static void rollback_packed_refs(struct files_ref_store *refs)
13671367
files_assert_main_repository(refs, "rollback_packed_refs");
13681368

13691369
if (!packed_ref_cache->lock)
1370-
die("internal error: packed-refs not locked");
1370+
die("BUG: packed-refs not locked");
13711371
rollback_lock_file(packed_ref_cache->lock);
13721372
packed_ref_cache->lock = NULL;
13731373
release_packed_ref_cache(packed_ref_cache);

0 commit comments

Comments
 (0)