diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2006-07-08 18:42:41 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-13 23:10:19 -0700 |
commit | 6d297f81373e19d86b8f02cb68120201d1b0ab1d (patch) | |
tree | f036ee3b98ce1a260895d8d3bec4889189dabafe /path-list.h | |
parent | 4b7ce6e2d6ba088da50de1df38b040ea2c0b8f18 (diff) | |
download | git-6d297f81373e19d86b8f02cb68120201d1b0ab1d.tar.gz |
Status update on merge-recursive in C
This is just an update for people being interested. Alex and me were
busy with that project for a few days now. While it has progressed nicely,
there are quite a couple TODOs in merge-recursive.c, just search for "TODO".
For impatient people: yes, it passes all the tests, and yes, according
to the evil test Alex did, it is faster than the Python script.
But no, it is not yet finished. Biggest points are:
- there are still three external calls
- in the end, it should not be necessary to write the index more than once
(just before exiting)
- a lot of things can be refactored to make the code easier and shorter
BTW we cannot just plug in git-merge-tree yet, because git-merge-tree
does not handle renames at all.
This patch is meant for testing, and as such,
- it compile the program to git-merge-recur
- it adjusts the scripts and tests to use git-merge-recur instead of
git-merge-recursive
- it provides "TEST", a script to execute the tests regarding -recursive
- it inlines the changes to read-cache.c (read_cache_from(), discard_cache()
and refresh_cache_entry())
Brought to you by Alex Riesen and Dscho
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'path-list.h')
-rw-r--r-- | path-list.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/path-list.h b/path-list.h new file mode 100644 index 0000000000..d6401eaa35 --- /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_ */ |