summaryrefslogtreecommitdiff
path: root/builtin-archive.c
diff options
context:
space:
mode:
authorLibravatar Ray Chuan <rctay89@gmail.com>2009-01-24 10:00:22 +0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-23 21:50:37 -0800
commitb1c7d4aafeda8e6b2bbeac29a3181cbe970b7874 (patch)
tree7c0a50da32ecee1de544b5cbf426a0032c401136 /builtin-archive.c
parentgit-am: implement --reject option passed to git-apply (diff)
downloadtgif-b1c7d4aafeda8e6b2bbeac29a3181cbe970b7874.tar.xz
http-push: refactor lock-related headers creation for curl requests
DAV-related headers (more specifically, headers related to the lock token, namely, If, Lock-Token, and Timeout) for curl requests are created and allocated individually, eg a "if_header" variable for the "If: " header, a "timeout_header" variable for the "Timeout: " header. This patch provides a new function ("get_dav_token_headers") that creates these header, saving methods from allocating memory, and from issuing a "curl_slist_append()" call. The temporary string storage given to curl_slist_append() is freed much earlier than the previous code with this patch, but this change is safe, because curl_slist_append() keeps a copy of the given string. In part, this patch also addresses the fact that commit 753bc91 (Remove the requirement opaquelocktoken uri scheme) did not update memory allocations for DAV-related headers. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-archive.c')
0 files changed, 0 insertions, 0 deletions