#include "refs.h"
#include "userdiff.h"
#include "sha1-array.h"
+ #include "revision.h"
static struct combine_diff_path *intersect_paths(struct combine_diff_path *curr, int n, int num_parent)
{
/*
* Coalesce new lines into base by finding the LCS
- * - Create the table to run dynamic programing
+ * - Create the table to run dynamic programming
* - Compute the LCS
* - Then reverse read the direction structure:
* - If we have MATCH, assign parent to base flag, and consume
void diff_tree_combined_merge(const struct commit *commit, int dense,
struct rev_info *rev)
{
- struct commit_list *parent = commit->parents;
+ struct commit_list *parent = get_saved_parents(rev, commit);
struct sha1_array parents = SHA1_ARRAY_INIT;
while (parent) {
return c;
}
+ struct commit_list *copy_commit_list(struct commit_list *list)
+ {
+ struct commit_list *head = NULL;
+ struct commit_list **pp = &head;
+ while (list) {
+ struct commit_list *new;
+ new = xmalloc(sizeof(struct commit_list));
+ new->item = list->item;
+ new->next = NULL;
+ *pp = new;
+ pp = &new->next;
+ list = list->next;
+ }
+ return head;
+ }
+
void free_commit_list(struct commit_list *list)
{
while (list) {
if ((codepoint & 0x1ff800) == 0xd800)
return bad_offset;
/* U+xxFFFE and U+xxFFFF are guaranteed non-characters. */
- if ((codepoint & 0xffffe) == 0xfffe)
+ if ((codepoint & 0xfffe) == 0xfffe)
return bad_offset;
/* So are anything in the range U+FDD0..U+FDEF. */
if (codepoint >= 0xfdd0 && codepoint <= 0xfdef)
struct commit_list **list);
void commit_list_sort_by_date(struct commit_list **list);
+ /* Shallow copy of the input list */
+ struct commit_list *copy_commit_list(struct commit_list *list);
+
void free_commit_list(struct commit_list *list);
/* Commit formats */
* Fields below here are manipulated internally by pp_* functions and
* should not be counted on by callers.
*/
-
- /* Manipulated by the pp_* functions internally. */
struct string_list in_body_headers;
};