summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e130dda)
raw | patch | inline | side by side (parent: e130dda)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 13 Jul 2006 05:21:05 +0000 (22:21 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 13 Jul 2006 05:21:47 +0000 (22:21 -0700) |
The new C version mistranslated the original Perl version in the
case to pull from the HEAD. This made it to say nonsense like
this:
Merge commit ...url... of HEAD
* HEAD:
...
Signed-off-by: Junio C Hamano <junkio@cox.net>
case to pull from the HEAD. This made it to say nonsense like
this:
Merge commit ...url... of HEAD
* HEAD:
...
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-fmt-merge-msg.c | patch | blob | history |
index 65274824d3b29aeb0ff78fc360c93820214c1ef8..fe0ef44b4051e74b10e14d6a694aaad98a005397 100644 (file)
--- a/builtin-fmt-merge-msg.c
+++ b/builtin-fmt-merge-msg.c
unsigned char *sha1;
char *src, *origin;
struct src_data *src_data;
+ int pulling_head = 0;
if (len < 43 || line[40] != '\t')
return 1;
if (src) {
*src = 0;
src += 4;
- } else
- src = "HEAD";
+ pulling_head = 0;
+ } else {
+ src = line;
+ pulling_head = 1;
+ }
i = find_in_list(&srcs, src);
if (i < 0) {
}
src_data = srcs.payload[i];
- if (!strncmp(line, "branch ", 7)) {
+ if (pulling_head) {
+ origin = strdup(src);
+ src_data->head_status |= 1;
+ } else if (!strncmp(line, "branch ", 7)) {
origin = strdup(line + 7);
append_to_list(&src_data->branch, origin, NULL);
src_data->head_status |= 2;
origin = strdup(line + 14);
append_to_list(&src_data->r_branch, origin, NULL);
src_data->head_status |= 2;
- } else if (!strcmp(line, "HEAD")) {
- origin = strdup(src);
- src_data->head_status |= 1;
} else {
origin = strdup(src);
append_to_list(&src_data->generic, strdup(line), NULL);