Artifactspublic-v0

curl

master
ply4 git calls66 ms289 KiB3 cachedprotocol v2
214 lines6.2 KiBRaw
1/***************************************************************************
2 * _ _ ____ _
3 * Project ___| | | | _ \| |
4 * / __| | | | |_) | |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
7 *
8 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9 *
10 * This software is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at https://curl.se/docs/copyright.html.
13 *
14 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 * copies of the Software, and permit persons to whom the Software is
16 * furnished to do so, under the terms of the COPYING file.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 * SPDX-License-Identifier: curl
22 *
23 ***************************************************************************/
24#include "tool_setup.h"
26#ifdef __VMS
28#if defined(__DECC) && !defined(__VAX) && \
29 defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
30#include <unixlib.h>
31#endif
33#include "curlmsg_vms.h"
34#include "tool_vms.h"
36void decc$__posix_exit(int __status);
37void decc$exit(int __status);
39static int vms_shell = -1;
41/* VMS has a DCL shell and also has Unix shells ported to it.
42 * When curl is running under a Unix shell, we want it to be as much
43 * like Unix as possible.
44 */
45int is_vms_shell(void)
47 char *shell;
49 /* Have we checked the shell yet? */
50 if(vms_shell >= 0)
51 return vms_shell;
53 shell = getenv("SHELL");
55 /* No shell, means DCL */
56 if(!shell) {
57 vms_shell = 1;
58 return 1;
59 }
61 /* Have to make sure some one did not set shell to DCL */
62 if(!strcmp(shell, "DCL")) {
63 vms_shell = 1;
64 return 1;
65 }
67 vms_shell = 0;
68 return 0;
71/*
72 * VMS has two exit() routines. When running under a Unix style shell, then
73 * Unix style and the __posix_exit() routine is used.
74 *
75 * When running under the DCL shell, then the VMS encoded codes and decc$exit()
76 * is used.
77 *
78 * We can not use exit() or return a code from main() because the actual
79 * routine called depends on both the compiler version, compile options, and
80 * feature macro settings, and one of the exit routines is hidden at compile
81 * time.
82 *
83 * Since we want curl to work properly under the VMS DCL shell and Unix
84 * shells under VMS, this routine should compile correctly regardless of
85 * the settings.
86 */
88void vms_special_exit(int code, int vms_show)
90 int vms_code;
92 /* The POSIX exit mode is only available after VMS 7.0 */
93#if __CRTL_VER >= 70000000
94 if(is_vms_shell() == 0) {
95 decc$__posix_exit(code);
96 }
97#endif
99 if(code > CURL_LAST) { /* If CURL_LAST exceeded then */
100 vms_code = CURL_LAST; /* curlmsg.h is out of sync. */
101 }
102 else {
103 vms_code = vms_cond[code] | vms_show;
104 }
105 decc$exit(vms_code);
108#if defined(__DECC) && !defined(__VAX) && \
109 defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
111/*
112 * 2004-09-19 SMS.
113 *
114 * decc_init()
115 *
116 * On non-VAX systems, use LIB$INITIALIZE to set a collection of C
117 * RTL features without using the DECC$* logical name method, nor
118 * requiring the user to define the corresponding logical names.
119 */
121/* Structure to hold a DECC$* feature name and its desired value. */
122struct decc_feat_t {
123 char *name;
124 int value;
125};
127/* Array of DECC$* feature names and their desired values. */
128static const struct decc_feat_t decc_feat_array[] = {
129 /* Preserve command-line case with SET PROCESS/PARSE_STYLE=EXTENDED */
130 { "DECC$ARGV_PARSE_STYLE", 1 },
131 /* Preserve case for filenames on ODS5 disks. */
132 { "DECC$EFS_CASE_PRESERVE", 1 },
133 /* Enable multiple dots (and most characters) in ODS5 filenames,
134 while preserving VMS-ness of ";version". */
135 { "DECC$EFS_CHARSET", 1 },
136 /* List terminator. */
137 { (char *)NULL, 0 }
138};
140/* Flag to sense if decc_init() was called. */
141static int decc_init_done = -1;
143/* LIB$INITIALIZE initialization function. */
144static void decc_init(void)
146 int feat_index;
147 int feat_value;
148 int feat_value_max;
149 int feat_value_min;
150 int i;
151 int sts;
153 /* Set the global flag to indicate that LIB$INITIALIZE worked. */
154 decc_init_done = 1;
156 /* Loop through all items in the decc_feat_array[]. */
157 for(i = 0; decc_feat_array[i].name; i++) {
159 /* Get the feature index. */
160 feat_index = decc$feature_get_index(decc_feat_array[i].name);
162 if(feat_index >= 0) {
163 /* Valid item. Collect its properties. */
164 feat_value = decc$feature_get_value(feat_index, 1);
165 feat_value_min = decc$feature_get_value(feat_index, 2);
166 feat_value_max = decc$feature_get_value(feat_index, 3);
168 if((decc_feat_array[i].value >= feat_value_min) &&
169 (decc_feat_array[i].value <= feat_value_max)) {
170 /* Valid value. Set it if necessary. */
171 if(feat_value != decc_feat_array[i].value) {
172 sts = decc$feature_set_value(feat_index, 1,
173 decc_feat_array[i].value);
174 }
175 }
176 else {
177 /* Invalid DECC feature value. */
178 curl_mprintf(" INVALID DECC FEATURE VALUE, %d: %d <= %s <= %d.\n",
179 feat_value,
180 feat_value_min, decc_feat_array[i].name, feat_value_max);
181 }
182 }
183 else {
184 /* Invalid DECC feature name. */
185 curl_mprintf(" UNKNOWN DECC FEATURE: %s.\n", decc_feat_array[i].name);
186 }
187 }
190/* Get "decc_init()" into a valid, loaded LIB$INITIALIZE PSECT. */
192#pragma nostandard
194/* Establish the LIB$INITIALIZE PSECTs, with proper alignment and
195 other attributes. Note that "nopic" is significant only on VAX. */
196#pragma extern_model save
197#pragma extern_model strict_refdef "LIB$INITIALIZ" 2, nopic, nowrt
198const int spare[8] = { 0 };
199#pragma extern_model strict_refdef "LIB$INITIALIZE" 2, nopic, nowrt
200void (* const x_decc_init)() = decc_init;
201#pragma extern_model restore
203/* Fake reference to ensure loading the LIB$INITIALIZE PSECT. */
204#pragma extern_model save
205int LIB$INITIALIZE(void);
206#pragma extern_model strict_refdef
207int dmy_lib$initialize = (int)LIB$INITIALIZE;
208#pragma extern_model restore
210#pragma standard
212#endif /* __DECC && !__VAX && __CRTL_VER && __CRTL_VER >= 70301000 */
214#endif /* __VMS */
Diagnostics4 git calls · 66 ms
CallStatusSizeTime066 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit15 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=15
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2002.6 KiB · hit48 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=48
git.response.bytes=2628
git.response.cache=HIT
git.response.duration_ms=48
git.fetch.wants=ced0efe2ed15a56691976886a5f2f9b98491737e
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=2628
git.pkt.payload.max=2607
git.sideband.band1.bytes=2606
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e19d4cacc93cd0
Request
7fe946c6…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format