Skip to content

Commit 718eb4b

Browse files
committed
Reword packed-refs error messages so they're easier to track down
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
1 parent 0c49ec2 commit 718eb4b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/refs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ static int packed_write(git_repository *repo)
757757
total_refs = repo->references.packfile->key_count;
758758
if ((error =
759759
git_vector_init(&packing_list, total_refs, packed_sort)) < GIT_SUCCESS)
760-
return git__rethrow(error, "Failed to write packed reference");
760+
return git__rethrow(error, "Failed to init packed refernces list");
761761

762762
/* Load all the packfile into a vector */
763763
{
@@ -776,14 +776,14 @@ static int packed_write(git_repository *repo)
776776
/* Now we can open the file! */
777777
git_path_join(pack_file_path, repo->path_repository, GIT_PACKEDREFS_FILE);
778778
if ((error = git_filebuf_open(&pack_file, pack_file_path, 0)) < GIT_SUCCESS)
779-
return git__rethrow(error, "Failed to write packed reference");
779+
return git__rethrow(error, "Failed to write open packed references file");
780780

781781
/* Packfiles have a header... apparently
782782
* This is in fact not required, but we might as well print it
783783
* just for kicks */
784784
if ((error =
785785
git_filebuf_printf(&pack_file, "%s\n", GIT_PACKEDREFS_HEADER)) < GIT_SUCCESS)
786-
return git__rethrow(error, "Failed to write packed reference");
786+
return git__rethrow(error, "Failed to write packed references file header");
787787

788788
for (i = 0; i < packing_list.length; ++i) {
789789
struct packref *ref = (struct packref *)git_vector_get(&packing_list, i);
@@ -821,7 +821,7 @@ static int packed_write(git_repository *repo)
821821

822822
return error == GIT_SUCCESS ?
823823
GIT_SUCCESS :
824-
git__rethrow(error, "Failed to write packed reference");
824+
git__rethrow(error, "Failed to write packed references file");
825825
}
826826

827827
static int _reference_available_cb(const char *ref, void *data)

0 commit comments

Comments
 (0)