mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
scalar-diagnose: move functionality to common location
Move the core functionality of 'scalar diagnose' into a new 'diagnose.[c,h]' library to prepare for new callers in the main Git tree generating diagnostic archives. These callers will be introduced in subsequent patches. While this patch appears large, it is mostly made up of moving code out of 'scalar.c' and into 'diagnose.c'. Specifically, the functions - dir_file_stats_objects() - dir_file_stats() - count_files() - loose_objs_stats() - add_directory_to_archiver() are all copied verbatim from 'scalar.c'. The 'create_diagnostics_archive()' function is a mostly identical (partial) copy of 'cmd_diagnose()', with the primary changes being that 'zip_path' is an input and "Enlistment root" is corrected to "Repository root" in the archiver log. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
435a2535b7
commit
bb2c34956a
8
diagnose.h
Normal file
8
diagnose.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef DIAGNOSE_H
|
||||
#define DIAGNOSE_H
|
||||
|
||||
#include "strbuf.h"
|
||||
|
||||
int create_diagnostics_archive(struct strbuf *zip_path);
|
||||
|
||||
#endif /* DIAGNOSE_H */
|
||||
Reference in New Issue
Block a user