Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictoria Dye <vdye@github.com>2022-08-12 23:10:16 +0300
committerJunio C Hamano <gitster@pobox.com>2022-08-12 23:20:02 +0300
commit7ecf193f7d621f618b322498d884ee103a44522f (patch)
tree0f32a7af200f886cadbceab0fc86be37f2789f70 /diagnose.h
parent6783fd3cef0d6625e8a6d9d42d76042447078401 (diff)
builtin/diagnose.c: add '--mode' option
Create '--mode=<mode>' option in 'git diagnose' to allow users to optionally select non-default diagnostic information to include in the output archive. Additionally, document the currently-available modes, emphasizing the importance of not sharing a '--mode=all' archive publicly due to the presence of sensitive information. Note that the option parsing callback - 'option_parse_diagnose()' - is added to 'diagnose.c' rather than 'builtin/diagnose.c' so that it may be reused in future callers configuring a diagnostics archive. Helped-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diagnose.h')
-rw-r--r--diagnose.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/diagnose.h b/diagnose.h
index 998775857a..7a4951a786 100644
--- a/diagnose.h
+++ b/diagnose.h
@@ -2,6 +2,7 @@
#define DIAGNOSE_H
#include "strbuf.h"
+#include "parse-options.h"
enum diagnose_mode {
DIAGNOSE_NONE,
@@ -9,6 +10,8 @@ enum diagnose_mode {
DIAGNOSE_ALL
};
+int option_parse_diagnose(const struct option *opt, const char *arg, int unset);
+
int create_diagnostics_archive(struct strbuf *zip_path, enum diagnose_mode mode);
#endif /* DIAGNOSE_H */