aboutsummaryrefslogtreecommitdiff
path: root/path-list.h
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-07-25 21:32:18 -0700
committerJunio C Hamano <junkio@cox.net>2006-07-26 13:36:36 -0700
commit8fd2cb4069178539d8cf7711586d4e6378722bf3 (patch)
tree33db684a3460e85ec2bbfd0370db0012c90320b9 /path-list.h
parent24cf6e5847073d50390e0b7950e8e6b5a09103bc (diff)
downloadgit-8fd2cb4069178539d8cf7711586d4e6378722bf3.tar.gz
git-8fd2cb4069178539d8cf7711586d4e6378722bf3.tar.xz
Extract helper bits from c-merge-recursive work
This backports the pieces that are not uncooked from the merge-recursive WIP we have seen earlier, to be used in git-mv rewritten in C. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'path-list.h')
-rw-r--r--path-list.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/path-list.h b/path-list.h
new file mode 100644
index 000000000..d6401eaa3
--- /dev/null
+++ b/path-list.h
@@ -0,0 +1,22 @@
+#ifndef _PATH_LIST_H_
+#define _PATH_LIST_H_
+
+struct path_list_item {
+ char *path;
+ void *util;
+};
+struct path_list
+{
+ struct path_list_item *items;
+ unsigned int nr, alloc;
+ unsigned int strdup_paths:1;
+};
+
+void print_path_list(const char *text, const struct path_list *p);
+
+int path_list_has_path(const struct path_list *list, const char *path);
+void path_list_clear(struct path_list *list, int free_items);
+struct path_list_item *path_list_insert(const char *path, struct path_list *list);
+struct path_list_item *path_list_lookup(const char *path, struct path_list *list);
+
+#endif /* _PATH_LIST_H_ */