summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a64dd34)
raw | patch | inline | side by side (parent: a64dd34)
author | Mark Wooding <mdw@distorted.org.uk> | |
Mon, 27 Feb 2006 12:52:50 +0000 (12:52 +0000) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 1 Mar 2006 12:09:40 +0000 (04:09 -0800) |
For some reason, combined diffs don't honour the --full-index flag when
emitting patches. Fix this.
Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from e70c6b35749c316f6e97099bd6bdac895c9d6f68 commit)
emitting patches. Fix this.
Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from e70c6b35749c316f6e97099bd6bdac895c9d6f68 commit)
combine-diff.c | patch | blob | history |
diff --git a/combine-diff.c b/combine-diff.c
index d812600d1185aa82b3a0dae69f61daca789b9322..984103edce04d6313009ad4e7755c9eea3bf52e6 100644 (file)
--- a/combine-diff.c
+++ b/combine-diff.c
}
static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
- int dense, const char *header)
+ int dense, const char *header,
+ struct diff_options *opt)
{
unsigned long size, cnt, lno;
char *result, *cp, *ep;
char ourtmp_buf[TMPPATHLEN];
char *ourtmp = ourtmp_buf;
int working_tree_file = !memcmp(elem->sha1, null_sha1, 20);
+ int abbrev = opt->full_index ? 40 : DEFAULT_ABBREV;
/* Read the result of merge first */
if (!working_tree_file) {
printf("index ");
for (i = 0; i < num_parent; i++) {
abb = find_unique_abbrev(elem->parent[i].sha1,
- DEFAULT_ABBREV);
+ abbrev);
printf("%s%s", i ? "," : "", abb);
}
- abb = find_unique_abbrev(elem->sha1, DEFAULT_ABBREV);
+ abb = find_unique_abbrev(elem->sha1, abbrev);
printf("..%s\n", abb);
if (mode_differs) {
default:
case DIFF_FORMAT_PATCH:
- return show_patch_diff(p, num_parent, dense, header);
+ return show_patch_diff(p, num_parent, dense, header, opt);
}
}