summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-05-22 14:17:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-23 05:29:52 (GMT)
commit04aea8d4df199836da3802f08cb5738eae66fa6c (patch)
tree1f6968635dcf404286411f716a660d816959c836 /refs
parente186057138666058a2c67c3389509c9430d95b24 (diff)
downloadgit-04aea8d4df199836da3802f08cb5738eae66fa6c.zip
git-04aea8d4df199836da3802f08cb5738eae66fa6c.tar.gz
git-04aea8d4df199836da3802f08cb5738eae66fa6c.tar.bz2
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>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index cb1f528..fa5d2b6 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -105,7 +105,7 @@ static void clear_packed_ref_cache(struct files_ref_store *refs)
struct packed_ref_cache *packed_refs = refs->packed;
if (packed_refs->lock)
- die("internal error: packed-ref cache cleared while locked");
+ die("BUG: packed-ref cache cleared while locked");
refs->packed = NULL;
release_packed_ref_cache(packed_refs);
}
@@ -397,7 +397,7 @@ static void add_packed_ref(struct files_ref_store *refs,
struct packed_ref_cache *packed_ref_cache = get_packed_ref_cache(refs);
if (!packed_ref_cache->lock)
- die("internal error: packed refs not locked");
+ die("BUG: packed refs not locked");
add_ref_entry(get_packed_ref_dir(packed_ref_cache),
create_ref_entry(refname, oid, REF_ISPACKED, 1));
}
@@ -1324,7 +1324,7 @@ static int commit_packed_refs(struct files_ref_store *refs)
files_assert_main_repository(refs, "commit_packed_refs");
if (!packed_ref_cache->lock)
- die("internal error: packed-refs not locked");
+ die("BUG: packed-refs not locked");
out = fdopen_lock_file(packed_ref_cache->lock, "w");
if (!out)
@@ -1367,7 +1367,7 @@ static void rollback_packed_refs(struct files_ref_store *refs)
files_assert_main_repository(refs, "rollback_packed_refs");
if (!packed_ref_cache->lock)
- die("internal error: packed-refs not locked");
+ die("BUG: packed-refs not locked");
rollback_lock_file(packed_ref_cache->lock);
packed_ref_cache->lock = NULL;
release_packed_ref_cache(packed_ref_cache);