diagnose: stop using the_repository
Stop using `the_repository` in the "diagnose" subsystem by passing in a repository when generating a diagnostics archive. Adjust callers accordingly by using `the_repository`. While there may be some callers that have a repository available in their context, this trivial conversion allows for easier verification and bubbles up the use of `the_repository` by one level. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
c365dbb44e
commit
b4c476c43a
@@ -1,3 +1,5 @@
|
||||
#define USE_THE_REPOSITORY_VARIABLE
|
||||
|
||||
#include "builtin.h"
|
||||
#include "abspath.h"
|
||||
#include "gettext.h"
|
||||
@@ -58,7 +60,7 @@ int cmd_diagnose(int argc,
|
||||
}
|
||||
|
||||
/* Prepare diagnostics */
|
||||
if (create_diagnostics_archive(&zip_path, mode))
|
||||
if (create_diagnostics_archive(the_repository, &zip_path, mode))
|
||||
die_errno(_("unable to create diagnostics archive %s"),
|
||||
zip_path.buf);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user