about summary refs log tree commit diff
path: root/third_party/git/builtin/fmt-merge-msg.c
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
committerVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
commit93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch)
tree85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/builtin/fmt-merge-msg.c
parent6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff)
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable.

This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing
changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/builtin/fmt-merge-msg.c')
-rw-r--r--third_party/git/builtin/fmt-merge-msg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/third_party/git/builtin/fmt-merge-msg.c b/third_party/git/builtin/fmt-merge-msg.c
index 736f666f644c..a4615587fd79 100644
--- a/third_party/git/builtin/fmt-merge-msg.c
+++ b/third_party/git/builtin/fmt-merge-msg.c
@@ -106,7 +106,7 @@ static int handle_line(char *line, struct merge_parents *merge_parents)
 	int i, len = strlen(line);
 	struct origin_data *origin_data;
 	char *src;
-	const char *origin, *tag_name;
+	const char *origin;
 	struct src_data *src_data;
 	struct string_list_item *item;
 	int pulling_head = 0;
@@ -162,13 +162,14 @@ static int handle_line(char *line, struct merge_parents *merge_parents)
 	if (pulling_head) {
 		origin = src;
 		src_data->head_status |= 1;
-	} else if (skip_prefix(line, "branch ", &origin)) {
+	} else if (starts_with(line, "branch ")) {
 		origin_data->is_local_branch = 1;
+		origin = line + 7;
 		string_list_append(&src_data->branch, origin);
 		src_data->head_status |= 2;
-	} else if (skip_prefix(line, "tag ", &tag_name)) {
+	} else if (starts_with(line, "tag ")) {
 		origin = line;
-		string_list_append(&src_data->tag, tag_name);
+		string_list_append(&src_data->tag, origin + 4);
 		src_data->head_status |= 2;
 	} else if (skip_prefix(line, "remote-tracking branch ", &origin)) {
 		string_list_append(&src_data->r_branch, origin);