Merge branch 'rs/use-strbuf-addstr' into maint
* rs/use-strbuf-addstr: use strbuf_addstr() instead of strbuf_addf() with "%s" use strbuf_addstr() for adding constant strings to a strbufmaint
						commit
						574a31b5b7
					
				|  | @ -272,7 +272,7 @@ static int cmp_string_list_util_as_integral(const void *a_, const void *b_) | ||||||
| static void add_people_count(struct strbuf *out, struct string_list *people) | static void add_people_count(struct strbuf *out, struct string_list *people) | ||||||
| { | { | ||||||
| 	if (people->nr == 1) | 	if (people->nr == 1) | ||||||
| 		strbuf_addf(out, "%s", people->items[0].string); | 		strbuf_addstr(out, people->items[0].string); | ||||||
| 	else if (people->nr == 2) | 	else if (people->nr == 2) | ||||||
| 		strbuf_addf(out, "%s (%d) and %s (%d)", | 		strbuf_addf(out, "%s (%d) and %s (%d)", | ||||||
| 			    people->items[0].string, | 			    people->items[0].string, | ||||||
|  |  | ||||||
|  | @ -469,7 +469,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix) | ||||||
| 			(stop_at_non_option ? PARSE_OPT_STOP_AT_NON_OPTION : 0) | | 			(stop_at_non_option ? PARSE_OPT_STOP_AT_NON_OPTION : 0) | | ||||||
| 			PARSE_OPT_SHELL_EVAL); | 			PARSE_OPT_SHELL_EVAL); | ||||||
|  |  | ||||||
| 	strbuf_addf(&parsed, " --"); | 	strbuf_addstr(&parsed, " --"); | ||||||
| 	sq_quote_argv(&parsed, argv, 0); | 	sq_quote_argv(&parsed, argv, 0); | ||||||
| 	puts(parsed.buf); | 	puts(parsed.buf); | ||||||
| 	return 0; | 	return 0; | ||||||
|  |  | ||||||
|  | @ -1137,7 +1137,7 @@ static void remote_ls(const char *path, int flags, | ||||||
| 	ls.userData = userData; | 	ls.userData = userData; | ||||||
| 	ls.userFunc = userFunc; | 	ls.userFunc = userFunc; | ||||||
|  |  | ||||||
| 	strbuf_addf(&out_buffer.buf, PROPFIND_ALL_REQUEST); | 	strbuf_addstr(&out_buffer.buf, PROPFIND_ALL_REQUEST); | ||||||
|  |  | ||||||
| 	dav_headers = curl_slist_append(dav_headers, "Depth: 1"); | 	dav_headers = curl_slist_append(dav_headers, "Depth: 1"); | ||||||
| 	dav_headers = curl_slist_append(dav_headers, "Content-Type: text/xml"); | 	dav_headers = curl_slist_append(dav_headers, "Content-Type: text/xml"); | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								http.c
								
								
								
								
							
							
						
						
									
										2
									
								
								http.c
								
								
								
								
							|  | @ -1105,7 +1105,7 @@ void append_remote_object_url(struct strbuf *buf, const char *url, | ||||||
|  |  | ||||||
| 	strbuf_addf(buf, "objects/%.*s/", 2, hex); | 	strbuf_addf(buf, "objects/%.*s/", 2, hex); | ||||||
| 	if (!only_two_digit_prefix) | 	if (!only_two_digit_prefix) | ||||||
| 		strbuf_addf(buf, "%s", hex+2); | 		strbuf_addstr(buf, hex + 2); | ||||||
| } | } | ||||||
|  |  | ||||||
| char *get_remote_object_url(const char *url, const char *hex, | char *get_remote_object_url(const char *url, const char *hex, | ||||||
|  |  | ||||||
|  | @ -265,7 +265,7 @@ static int generate_push_cert(struct strbuf *req_buf, | ||||||
| 	struct strbuf cert = STRBUF_INIT; | 	struct strbuf cert = STRBUF_INIT; | ||||||
| 	int update_seen = 0; | 	int update_seen = 0; | ||||||
|  |  | ||||||
| 	strbuf_addf(&cert, "certificate version 0.1\n"); | 	strbuf_addstr(&cert, "certificate version 0.1\n"); | ||||||
| 	strbuf_addf(&cert, "pusher %s ", signing_key); | 	strbuf_addf(&cert, "pusher %s ", signing_key); | ||||||
| 	datestamp(&cert); | 	datestamp(&cert); | ||||||
| 	strbuf_addch(&cert, '\n'); | 	strbuf_addch(&cert, '\n'); | ||||||
|  |  | ||||||
|  | @ -112,7 +112,7 @@ static void remove_sequencer_state(void) | ||||||
| { | { | ||||||
| 	struct strbuf seq_dir = STRBUF_INIT; | 	struct strbuf seq_dir = STRBUF_INIT; | ||||||
|  |  | ||||||
| 	strbuf_addf(&seq_dir, "%s", git_path(SEQ_DIR)); | 	strbuf_addstr(&seq_dir, git_path(SEQ_DIR)); | ||||||
| 	remove_dir_recursively(&seq_dir, 0); | 	remove_dir_recursively(&seq_dir, 0); | ||||||
| 	strbuf_release(&seq_dir); | 	strbuf_release(&seq_dir); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ static int parallel_next(struct child_process *cp, | ||||||
| 		return 0; | 		return 0; | ||||||
|  |  | ||||||
| 	argv_array_pushv(&cp->args, d->argv); | 	argv_array_pushv(&cp->args, d->argv); | ||||||
| 	strbuf_addf(err, "preloaded output of a child\n"); | 	strbuf_addstr(err, "preloaded output of a child\n"); | ||||||
| 	number_callbacks++; | 	number_callbacks++; | ||||||
| 	return 1; | 	return 1; | ||||||
| } | } | ||||||
|  | @ -36,7 +36,7 @@ static int no_job(struct child_process *cp, | ||||||
| 		  void *cb, | 		  void *cb, | ||||||
| 		  void **task_cb) | 		  void **task_cb) | ||||||
| { | { | ||||||
| 	strbuf_addf(err, "no further jobs available\n"); | 	strbuf_addstr(err, "no further jobs available\n"); | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -45,7 +45,7 @@ static int task_finished(int result, | ||||||
| 			 void *pp_cb, | 			 void *pp_cb, | ||||||
| 			 void *pp_task_cb) | 			 void *pp_task_cb) | ||||||
| { | { | ||||||
| 	strbuf_addf(err, "asking for a quick stop\n"); | 	strbuf_addstr(err, "asking for a quick stop\n"); | ||||||
| 	return 1; | 	return 1; | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Junio C Hamano
						Junio C Hamano