Warmcat homepage andy@warmcat.com
libwebsockets
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1743401821, "reponame":"gitohashi", "desc":"Git web frontend with clientside rendering", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/gitohashi", "f":3, "items": [ { "schema":"libjg2-1", "oid":{ "oid": "9961e6fef5f0f2458efc1c2a40d63f7cc50ebfce", "alias": [ "refs/heads/main","refs/heads/master"]},"tree": [ { "name": "doc-assets","mode": "16384", "size":0}, { "name": "README-JSON.md","mode": "33188", "size":7855}, { "name": "README-build.md","mode": "33188", "size":2630}, { "name": "README-cache.md","mode": "33188", "size":5179}, { "name": "README-gitolite.md","mode": "33188", "size":4593}, { "name": "README-libjsongit2.md","mode": "33188", "size":11026}],"s":{"c":1743401821,"u": 1078}} ,{"schema":"libjg2-1", "cid":"c054f7680fd7aca6d5fdb860481bb48b", "oid":{ "oid": "9961e6fef5f0f2458efc1c2a40d63f7cc50ebfce", "alias": [ "refs/heads/main","refs/heads/master"]},"blobname": "doc/README-JSON.md", "blob": "## JSON output\n\nThe library produces well-formed JSON ready for `JSON.parse()` that\nalways has an outer container like this\n\n```\n{\n \u0022schema\u0022:\u0022jg2-1\u0022,\n ... dynamic entries ...\n \u0022items\u0022: [\n\n... one or more \u0022job\u0022 JSON `{ structures }`, may be from cache ...\n\n ],\n ... dynamic stats entries ...\n}\n```\n\n### Dynamic JSON header entries\n\nJSON name|Meaning\n---|---\nschema|always \u0022jg2-1\u0022 currently\nvpath|The virtual URL path the server is at, eg, \u0022/git/\u0022. URL paths back to the server must start with this\navatar|URL path to link to the avatar cache, eg, \u0022/avatar/\u0022\nalang|Whatever the browser gave to us for `ACCEPT_LANGUAGE`\nf|server flags... b0 \u003d 1: server can handle blame, b1 \u003d 1 \u003d server can do snapshot archives, b2 \u003d 1 \u003d blog mode\ngen_ut|Unix time this page was created\nreponame|Name of the repository this refers to\ndesc|Description of the project in the repository from gitweb\nowner|`{identity}` structure (see later) using data from gitweb\nurl|git clone url from gitweb\n\nNote on `\u0022f\u0022`... libjsongit2 builds adaptively to the featureset in the version\nof libgit2 that it's linked to and whether libarchive was present. b0 and b1\nlet us know if the server can handle blame (libgit \u003e 0.21) and creating\nsnapshot archives (libarchive required), so the UI can adapt accordingly.\n\nb2, \u0022blog mode\u0022 parses markdown in the git repo as a semi-static blog; if set\nit implies a simplified UI should be shown, eg, without the mode tabs or tree\ndirectory view. \n\n### Dynamic JSON trailer entries\n\nJSON name|Meaning\n---|---\ng|us (microseconds) taken to produce the overall JSON\nchitpc|Percentage of JSON cache hits for this vhost\nehitpc|Percentage of ETAG cache hits for this vhost\n\n### Identity structure\n\nJSON name|Meaning\n---|---\nname|Name like \u0022Fred Bloggs\u0022\nemail|Email like fred@bloggs.com\nmd5|md5sum of the email (used with gravatar)\n\n### OID structure\n\nJSON name|Meaning\n---|---\noid|OID the information applies to\nalias|List of refs that share this OID\n\n### git_time structure\n\nJSON name|Meaning\n---|---\ntime|Unix time\noffset|Timezone offset from unix time in minutes\n\n### Signature structure\n\nJSON name|Meaning\n---|---\ngit_time|`{git_time structure}`\nname|Name\nemail|email\nmd5|md5sum of the email\n\n### Job JSON structure\n\nA single URLpath \u0022connection context\u0022 may need to spawn multiple \u0022jobs\u0022 in a\nsingle response. For example, if there is a README.md in the directory, the\n`\u0022items\u0022: []` array will contain two JSON items, one from a \u0022/tree/\u0022 job to show\nthe directory contents, and another showing the contents of the README.md blob\nfor the revision being shown.\n\nThe contents of the Job JSON depends on the job type... and the kind of jobs\nthat can appear are set by the URLpath the JSON is returned for. Eg the JSON\nfor a tree directory listing is (for a `/tree/` URL) is like this:\n\n```\n{ \u0022schema\u0022:\u0022libjg2-1\u0022,\n \u0022oid\u0022:{ \u0022oid\u0022: \u002279397b21a38d263263a65abb69b8e1fffd326796\u0022,\n \u0022alias\u0022: [ \u0022refs/heads/master\u0022]},\u0022tree\u0022: [ \n{ \u0022name\u0022: \u0022READMEs\u0022,\u0022mode\u0022: \u002216384\u0022, \u0022size\u0022:0},\n{ \u0022name\u0022: \u0022cmake\u0022,\u0022mode\u0022: \u002216384\u0022, \u0022size\u0022:0},\n{ \u0022name\u0022: \u0022contrib\u0022,\u0022mode\u0022: \u002216384\u0022, \u0022size\u0022:0},\n...\n{ \u0022name\u0022: \u0022component.mk\u0022,\u0022mode\u0022: \u002233188\u0022, \u0022size\u0022:1659},\n{ \u0022name\u0022: \u0022libwebsockets.dox\u0022,\u0022mode\u0022: \u002233188\u0022, \u0022size\u0022:11618}],\n\u0022s\u0022:{\u0022c\u0022:1534293661,\u0022u\u0022:2442}}\n```\n\n### Job JSON header\n\nEver job JSON starts with the same header, which also goes into the cached\nversion.\n\nJSON name|Meaning\n---|---\nschema|\u0022libjg2-1\u0022\ncid|If cache enabled, and relevant to the job, the cache hash of this JSON\noid|`{OID structure}` described above; present if content is related to an oid\n\n### Job JSON trailer\n\nEvery \u0022job\u0022 JSON has this information appended and the information is also\npart of the cached copy.\n\nJSON name|Meaning\n---|---\nc|Creation Unix Time\nu|us (microseconds) taken to create originally\n\n## Job-specific JSON reference\n\n### tree directory\n\nOuter JSON name: **tree**\n\nComprises an array of structures of the form\n\nJSON name|Meaning\n---|---\nname|The file name in the directory\nmode|low 9 bits are xrw bits for owner, group, other, b14 means directory\nsize|size of the blob in bytes\n\n### tree file\n\nJSON name|Meaning\n---|---\nblobname|The file name of the blob\nblob|the JSON-escaped content of the blob\n\n### repo list\n\nOuter JSON name: **repolist**\n\nComprises an array of structures of the form\n\nJSON name|Meaning\n---|---\nreponame|The name of the repo (xyz.git/ would have the reponame \u0022xyz\u0022)\ndesc|The gitweb description\nname|Gitweb owner name\nemail|Gitweb owner email\nmd5|md5 of the gitweb owner email\nurl|clone URL\n\n### reflist\n\nA list of refs from the repo\n\nOuter JSON name: **reflist**\n\nComprises an array of structures of the form\n\nJSON name|Meaning\n---|---\nname|The name of the ref, eg \u0022refs/heads/master\u0022\nsummary|A `{summary}` JSON struct, see below\n\nThe `{summary}` struct for a branch looks like\n\nJSON name|Meaning\n---|---\ntype|\u0022commit\u0022\ntime|The unix time of the commit\ntime_ofs|The timezone offset in minutes\noid_tree|The `{OID structure}` for the tree at this rev\noid|The `{OID structure}` for the commit at this rev\nmsg|The short commit log message\nsig_commit|The `{signature structure}` for the committer\nsig_author|The `{signature structure}` for the author\n\nThe `{summary}` struct for a tag looks like\n\nJSON name|Meaning\n---|---\ntype|\u0022tag\u0022\noid_tag|The `{OID structure}` for the tagged commit\ntype_tag|\u0022commit\u0022\nmsg_tag|The short commit log message\nsig_tagger|The `{signature structure}` for the tagger\n\n### log\n\nThis is a series of commits\n\nOuter JSON name: **log**\n\nComprises an array of structures of the form\n\nJSON name|Meaning\n---|---\nname|The `{OID structure}` for the commit at this rev\nsummary|A `{summary}` JSON struct, see below\n\nThe `{summary}` struct contains \n\nJSON name|Meaning\n---|---\ntype|\u0022commit\u0022\ntime|The unix time of the commit\ntime_ofs|The timezone offset in minutes\noid_tree|The `{OID structure}` for the tree at this rev\noid|The `{OID structure}` for the commit at this rev\nmsg|The short commit log message\nsig_commit|The `{signature structure}` for the committer\nsig_author|The `{signature structure}` for the author\n\n### blame\n\nThis information is provided after a \u0022job\u0022 delivering the unannotated blob\nfor the file being blamed.\n\nOuter JSON name: **blame** and **contrib**\n\nThe first `\u0022blame\u0022: []` section comprises an array of structures of the form\n\nJSON name|Meaning\n---|---\nordinal|sort-order ordinal\norig_oid|The `{OID structure}` for the pre-patched content\nfinal_oid|The `{OID structure}` for the post-patched content\nsig_orig|The `{signature structure}` for the original content patch\nsig_final|The `{signature structure}` for the final content patch\nlog_final|The short commit log message for the final content patch\nop|Original patch filepath for the content (in the case of file rename or move)\nranges|An array of `{blame_range}` structures (see below)\n\nThe `{blame_range}` struct consists of\n\nJSON name|Meaning\n---|---\nl|the number of lines\no|The start line number from the original file / revision\nf|The start line number in the revision of the file being blamed\n\nafter the `\u0022blame\u0022: []` array there is a second array `\u0022contrib\u0022: []`, which\ncomprises an array of structures of the form:\n\nJSON name|Meaning\n---|---\nl|The number of lines still remaining in the file from this contributor\no|The ordinal of the `blame: []` section entry whose `sig_final` member was by this contributor\n\nNOTES: The first section is pre-sorted into order of first appearence in the\nfile being blamed. It represents a patch which can have multiple discontiguous\nline ranges in the version of the file currently being blamed, described in\nits `\u0022ranges\u0022: []` member.\n\nAfter that information, the `\u0022contrib\u0022: []` array is a list of all individual\ncontributors to the current file state, sorted by the number of lines of text\nthey have contributed. If your libgit2 is recent enough (master or 0.28+) then\nthis list takes into account any .mailmap in the top level git in HEAD.\n","s":{"c":1743401821,"u": 824}} ],"g": 5819,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 1, "si": 0, "db":0, "di":1, "sat":0, "lfc": "0000"}