* Does the destination list contain entries with a date
* before the source list? Definitely _not_ done.
*/
- if (date < src->item->date)
+ if (date <= src->item->date)
return SLOP;
/*
}
die("options not supported in --stdin mode");
}
- if (handle_revision_arg(sb.buf, revs, 0, REVARG_CANNOT_BE_FILENAME))
+ if (handle_revision_arg(xstrdup(sb.buf), revs, 0,
+ REVARG_CANNOT_BE_FILENAME))
die("bad revision '%s'", sb.buf);
}
if (seen_dashdash)
return st;
}
-static void remove_treesame_parents(struct commit *commit)
-{
- struct commit_list **pp, *p;
-
- pp = &commit->parents;
- while ((p = *pp) != NULL) {
- struct commit *parent = p->item;
- if (parent->object.flags & TREESAME) {
- *pp = p->next;
- free(p);
- continue;
- }
- pp = &p->next;
- }
-}
-
static struct commit_list **simplify_one(struct rev_info *revs, struct commit *commit, struct commit_list **tail)
{
struct commit_list *p;
break;
}
- if (revs->first_parent_only) {
+ if (revs->first_parent_only)
cnt = 1;
- } else {
- /*
- * A merge with a tree-same parent is useless
- */
- if (commit->parents && commit->parents->next)
- remove_treesame_parents(commit);
-
+ else
cnt = remove_duplicate_parents(commit);
- }
/*
* It is possible that we are a merge and one side branch
* in it.
*/
encoding = get_log_output_encoding();
- message = logmsg_reencode(commit, encoding);
+ message = logmsg_reencode(commit, NULL, encoding);
/* Copy the commit to temporary if we are using "fake" headers */
if (buf.len)