git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 3/4] http-push: use const for strings in signatures

From
Tay Ray Chuan <rctay89@gmail.com>
Date
May 3, 2011, 15:47 UTC
Message-ID
<1304437649-7052-4-git-send-email-rctay89@gmail.com>
In-Reply-To
<1304437649-7052-3-git-send-email-rctay89@gmail.com>
From: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
Split off from patch #4.
 http-push.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/http-push.c b/http-push.c
index d18346c..0fce38d 100644
--- a/http-push.c
+++ b/http-push.c
@@ -169,7 +169,7 @@ enum dav_header_flag {
 	DAV_HEADER_TIMEOUT = (1u << 2)
 };
 
-static char *xml_entities(char *s)
+static char *xml_entities(const char *s)
 {
 	struct strbuf buf = STRBUF_INIT;
 	while (*s) {
@@ -797,7 +797,7 @@ static void handle_new_lock_ctx(struct xml_ctx *ctx, int tag_closed)
 	}
 }
 
-static void one_remote_ref(char *refname);
+static void one_remote_ref(const char *refname);
 
 static void
 xml_start_tag(void *userData, const char *name, const char **atts)
@@ -1471,7 +1471,7 @@ static int update_remote(unsigned char *sha1, struct remote_lock *lock)
 
 static struct ref *remote_refs;
 
-static void one_remote_ref(char *refname)
+static void one_remote_ref(const char *refname)
 {
 	struct ref *ref;
 	struct object *obj;
@@ -1660,7 +1660,7 @@ static int verify_merge_base(unsigned char *head_sha1, unsigned char *branch_sha
 	return (merge_bases && !merge_bases->next && merge_bases->item == branch);
 }
 
-static int delete_remote_branch(char *pattern, int force)
+static int delete_remote_branch(const char *pattern, int force)
 {
 	struct ref *refs = remote_refs;
 	struct ref *remote_ref = NULL;
-- 
1.7.3.3.585.g74f6e
Previous: Tay Ray ChuanNext: Tay Ray Chuan
Message 4 of 20 in “http cleanups”
  1. 0/4 http cleanupsTay Ray Chuan, May 3, 2011
  2. 1/4 t5541-http-push: add test for chunkedTay Ray Chuan, May 3, 2011
  3. 2/4 http: make curl callbacks match contracts from curl headerTay Ray Chuan, May 3, 2011
  4. 3/4 http-push: use const for strings in signaturesTay Ray Chuan, May 3, 2011
  5. 4/4 http-push: refactor curl_easy_setup madnessTay Ray Chuan, May 3, 2011
  6. Shawn PearceMay 3, 2011
  7. Tay Ray ChuanMay 3, 2011
  8. Junio C HamanoMay 4, 2011
  9. Junio C HamanoMay 4, 2011
  10. Tay Ray ChuanMay 4, 2011
  11. 0/4 http cleanupsTay Ray Chuan, May 4, 2011
  12. 1/4 t5541-http-push: add test for chunkedTay Ray Chuan, May 4, 2011
  13. 2/4 http: make curl callbacks match contracts from curl headerTay Ray Chuan, May 4, 2011
  14. 3/4 http-push: use const for strings in signaturesTay Ray Chuan, May 4, 2011
  15. 4/4 http-push: refactor curl_easy_setup madnessTay Ray Chuan, May 4, 2011
  16. Jakub NarebskiMay 4, 2011
  17. Junio C HamanoMay 4, 2011
  18. Junio C HamanoMay 4, 2011
  19. Junio C HamanoMay 4, 2011
  20. Junio C HamanoMay 4, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.