diff options
Diffstat (limited to 'builtin/bugreport.c')
-rw-r--r-- | builtin/bugreport.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/builtin/bugreport.c b/builtin/bugreport.c index 530895be55..daf6c23657 100644 --- a/builtin/bugreport.c +++ b/builtin/bugreport.c @@ -1,4 +1,7 @@ #include "builtin.h" +#include "abspath.h" +#include "editor.h" +#include "gettext.h" #include "parse-options.h" #include "strbuf.h" #include "help.h" @@ -6,7 +9,9 @@ #include "hook.h" #include "hook-list.h" #include "diagnose.h" - +#include "object-file.h" +#include "setup.h" +#include "wrapper.h" static void get_system_info(struct strbuf *sys_info) { @@ -60,7 +65,8 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit) } static const char * const bugreport_usage[] = { - N_("git bugreport [-o|--output-directory <file>] [-s|--suffix <format>] [--diagnose[=<mode>]"), + N_("git bugreport [(-o | --output-directory) <path>] [(-s | --suffix) <format>]\n" + " [--diagnose[=<mode>]]"), NULL }; @@ -105,6 +111,7 @@ int cmd_bugreport(int argc, const char **argv, const char *prefix) const char *user_relative_path = NULL; char *prefixed_filename; size_t output_path_len; + int ret; const struct option bugreport_options[] = { OPT_CALLBACK_F(0, "diagnose", &diagnose, N_("mode"), @@ -181,7 +188,9 @@ int cmd_bugreport(int argc, const char **argv, const char *prefix) user_relative_path); free(prefixed_filename); - UNLEAK(buffer); - UNLEAK(report_path); - return !!launch_editor(report_path.buf, NULL, NULL); + strbuf_release(&buffer); + + ret = !!launch_editor(report_path.buf, NULL, NULL); + strbuf_release(&report_path); + return ret; } |