summaryrefslogtreecommitdiff
path: root/unpack-trees.h
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2010-11-15 20:52:19 +0100
committerJunio C Hamano <gitster@pobox.com>2010-11-15 15:05:34 -0800
commit7980872d4ef3ce24329cbdb6d61dc2ed48cbf1c5 (patch)
tree15224e4692f6adf3be1f1ef945583aa9de0adb42 /unpack-trees.h
parentf66caaf9c8e0feb840a439a58e165b963aec79cf (diff)
downloadgit-7980872d4ef3ce24329cbdb6d61dc2ed48cbf1c5.tar.gz
use persistent memory for rejected paths
An aborted merge prints the list of rejected paths as part of the error message. Since commit f66caaf9 (do not overwrite files in leading path), some of those paths do not have static buffers, so we have to keep a copy. Use string_list's to accomplish this. This changes the order of the list to the order in which the paths are processed. Previously, it was reversed. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.h')
-rw-r--r--unpack-trees.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/unpack-trees.h b/unpack-trees.h
index 7c0187d11a..cd11a08365 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -1,6 +1,8 @@
#ifndef UNPACK_TREES_H
#define UNPACK_TREES_H
+#include "string-list.h"
+
#define MAX_UNPACK_TREES 8
struct unpack_trees_options;
@@ -29,11 +31,6 @@ enum unpack_trees_error_types {
void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
const char *cmd);
-struct rejected_paths_list {
- char *path;
- struct rejected_paths_list *next;
-};
-
struct unpack_trees_options {
unsigned int reset,
merge,
@@ -59,7 +56,7 @@ struct unpack_trees_options {
* Store error messages in an array, each case
* corresponding to a error message type
*/
- struct rejected_paths_list *unpack_rejects[NB_UNPACK_TREES_ERROR_TYPES];
+ struct string_list unpack_rejects[NB_UNPACK_TREES_ERROR_TYPES];
int head_idx;
int merge_size;