git: Print details of ignored error when mirroring

Rather than dropping the error on the floor entirely.

Coverity CID: #208384

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #74
Approved by: alexlarsson
tingping/wmclass
Philip Withnall 2017-12-05 12:12:05 +00:00 committed by Atomic Bot
parent 287be6a7d1
commit 4e4a7c9af5
1 changed files with 5 additions and 1 deletions

View File

@ -586,12 +586,16 @@ builder_git_mirror_repo (const char *repo_location,
if (alternates)
{
g_autoptr(GError) local_error = NULL;
/* Ensure we copy the files from the cache, to be safe if the extra source changes */
if (!git (mirror_dir, NULL, 0, error,
"repack", "-a", "-d", NULL))
return FALSE;
g_file_delete (alternates, NULL, NULL);
if (!g_file_delete (alternates, NULL, &local_error) &&
!g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
g_debug ("Error deleting alternates file: %s", local_error->message);
}
}