summaryrefslogtreecommitdiff
path: root/xdiff/xprepare.c
diff options
context:
space:
mode:
authorRay Chuan <rctay89@gmail.com>2009-01-24 02:00:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-24 05:50:37 (GMT)
commitb1c7d4aafeda8e6b2bbeac29a3181cbe970b7874 (patch)
tree7c0a50da32ecee1de544b5cbf426a0032c401136 /xdiff/xprepare.c
parentb80da424a13107c239ed40573fae3d692d19b6cd (diff)
downloadgit-b1c7d4aafeda8e6b2bbeac29a3181cbe970b7874.zip
git-b1c7d4aafeda8e6b2bbeac29a3181cbe970b7874.tar.gz
git-b1c7d4aafeda8e6b2bbeac29a3181cbe970b7874.tar.bz2
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 'xdiff/xprepare.c')
0 files changed, 0 insertions, 0 deletions