summaryrefslogtreecommitdiff
path: root/unpack-trees.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-30 12:51:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-30 12:51:29 (GMT)
commite47dbece39712567a36a096010c5c1223119f7e3 (patch)
treeaced74e797a0c37931e367574bdd60cbfb63e0f4 /unpack-trees.h
parent9472b13201aea57d7f9212ca2678aba4d6dbdfdb (diff)
parent1c41d2805e42d77d943fd3d79ebf5136f74c9ba3 (diff)
downloadgit-e47dbece39712567a36a096010c5c1223119f7e3.zip
git-e47dbece39712567a36a096010c5c1223119f7e3.tar.gz
git-e47dbece39712567a36a096010c5c1223119f7e3.tar.bz2
Merge branch 'ma/unpack-trees-free-msgs'
Leak plugging. * ma/unpack-trees-free-msgs: unpack_trees_options: free messages when done argv-array: return the pushed string from argv_push*() merge-recursive: provide pair of `unpack_trees_{start,finish}()` merge: setup `opts` later in `checkout_fast_forward()`
Diffstat (limited to 'unpack-trees.h')
-rw-r--r--unpack-trees.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/unpack-trees.h b/unpack-trees.h
index 41178ad..c2b434c 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -2,7 +2,7 @@
#define UNPACK_TREES_H
#include "tree-walk.h"
-#include "string-list.h"
+#include "argv-array.h"
#define MAX_UNPACK_TREES 8
@@ -33,6 +33,11 @@ enum unpack_trees_error_types {
void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
const char *cmd);
+/*
+ * Frees resources allocated by setup_unpack_trees_porcelain().
+ */
+void clear_unpack_trees_porcelain(struct unpack_trees_options *opts);
+
struct unpack_trees_options {
unsigned int reset,
merge,
@@ -57,6 +62,7 @@ struct unpack_trees_options {
struct pathspec *pathspec;
merge_fn_t fn;
const char *msgs[NB_UNPACK_TREES_ERROR_TYPES];
+ struct argv_array msgs_to_free;
/*
* Store error messages in an array, each case
* corresponding to a error message type