Something went wrong. Try again.
A Zig library that reads git repositories without running git, with log, show and diff output byte-identical to git's.
Something went wrong. Try again.
4.8 kB · 265 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330function y = f(x)classdef Foo < handlefunction X % commentfunctionfunction functionxxfunction Xx function XFunction XFUNCTION Xfunction Xfunction(x)functionXfunctionXfunctionXfunction�X function Xfunction X
function Xfunction X function X function Xclassdef(Sealed) Fooclassdefclassdef classdefxClassdef XclassdefXclassdef Xend functionmethodsproperties%% Section%%Section%% %%%% x%%x%%x%%x%% function%%% x%%% %%%x%%%x%%%%%%%% x%%%%%% x %% x%% xx %% y% comment%{#### Section## ## x##x##x### x######x# x#% x%# x ## xfunction é
#% comment## %# %# ##<..."## function% %ifclassdefxfunction#% fun%#end; . ### ...if classdef#% for func tion methods##%%%##for xfunction END HANDLE% % classdef% Function[ function xfunctionx###%% %# Funion| classdef(Sealed) % ...## Fooclassdef# % % ClAssD ef##y % % %%%SEc%if### % %%%%% ; % comment ###Fooif % commentfunctionsxfunction methods% comment Section functionnctionpropertiesf(x)end methodsfor %%%%forclassdef % end endend if if properties %# ##% com&mentproperties %%%% #%##%%%% classdef% comment% %< classdef y ifendx %%%## x %# Fooclassdef y methods function%# Function classdef clsdefproperties [a, b]methods classdef %= f end ###classdef(Sealed) classdef(Sealed) functions%#%%%%%%%%%#% functions %%%...%%### # #% y Foo ... class"def(Sealed)%%% %%# classdef =functions ## [a, b]# xfuonFunction functionclassdefclassdef(S)methods for %% classdef(Sealed)Section #>##%%% Function %%%### ...%%%Section% endmethodsend#% classdeffor xfunction clASsdef(Sealed)for% c;OMMeNt[a, b] #; %;methodsFunction<( % commentfunctions f(x) #% tions %# functions;functiofunctionnclassdef%%%% Function Foo functionf(x;) #... f(x)= #%ec tionfor propertiesfunction ###... % % <= methods%%%%< Foofu?nction %# % Functionclassdef #% ssdef%%%%%function handleend xfunction####classdef <% ## xfunction##x functions % % FUNCTIONS %<SECTIONENDCLASSDEF(SEALED)# classdef%%% end propertiesmethodsFunction ### foox=#%for %#%%%%%@ % %% properties y % funclassd&ef@<propertiesmethods function### %< #% clASSdef(sEaLeD)propeRTieS### propertiesxfunction xfunction Function ;% %#### ; ## {###%%%functions %%function % comment function %%%%if classdion for%% ## % %<%%% f(x) % %##if%%%% %%%% %% %##function%%%@%% foo for # methods %##%%% %y %#classdef x%%%?functions % %...functions prope>rties functionmethods #%%# end methods ## properties...end% %@prope rtiesmethods f(x)^ % %endFunCtIon Y%% functionfor functionsclassdef for if %%%%%for [a, b] f(x)###y # %%#for %%% %%%% %%%% %- com ment%# ##%ü%% functio(n &Function%%functionscl functionshandleclassdef %%%% ; % function end methodsclassdef(Sealed)functionsfor #% classdef function#%handleclassdefFunction %% y ; xfunction #if%%%% coMMent functions handleclassdef(seled)%functions ##Foofor % %%%%%###% %##%classx%% % % F[a, b]oo ...xfunction### if % % classdef f(x) ...:for ## end Section%#\#% C LASSDEF FUNCTION function%%% handle ## xfunction Fooifproper:tiesmethodsfunctions methods###x ##classdef(sealed)function % %clAsSdeF(seAled) ##### handlef(x)## classdaled)%% CLasSDeF(SEaLEd)properties... for properties end Function Foo pro[a, b]perties #% y classdef ifu@nctionfunctionsfunction clasme thods%%%% commentprope rties iffor methods handle%%%% %%#% Foo%% function xfunction classdeffunction if%%%% % % endx handle functions#%classdef(Seclassdef = ifend#.%classdef(Sealed) classdeffunctions Function## ..-.functionf(x) endproperties% % = x^ &% % ###[ %%%%function < end methods< handlehandley ...functions y xfunction##]end properties classdef% classdef(Sealed)#classdef(Sealed) ## # % comment if Functionmethods%# < function% comment if PROPERTIES ENDX... ###xfunctionclassdef ;%%%+ methodsfunctionsFunction %%%% iffunctions %##% x ## #% #% %# IF %### #% FunctIOn%%%%%# %, % Function) for%%%% % %%#<##funct^ Function%% methods ## methodsclassdef(Sealed)classdef if ;%classdef #% %# classdef Function ; function #x propertie% Foo%properties end% %%% Function... %% comment### ; %%xfu`nction methods#oofunctions properties#%ifmüet;=*% %%%%% functions classdef %Section =function<pr%% opertesproperties → Function% if% %##Foo fu % % %methods %%Function; classde%