5 GIT_HASH_CMD=
'log -1 HEAD --pretty=format:%H';
13 pathStr=fileparts(mfilename(
'fullpath'));
19 hashStr=strtrim(hashStr);
20 nHashSymb=numel(hashStr);
21 if nHashSymb>GIT_HASH_LENGTH
22 %on unix
hash string can contain a garbage tail like in
23 %dc6698d793bde0c84d3137dd0641d7a7bce1cdd1[m
24 hashStr=hashStr(1:GIT_HASH_LENGTH);
25 elseif nHashSymb>GIT_HASH_LENGTH
27 'hash string returned by %s command is too short',GIT_HASH_CMD);
30 if iscell(hashStr)&&isempty(hashStr)
32 elseif strcmp(StMsg.identifier,
'GIT:versioningProblem')&&...
33 strncmp(hashStr,
'fatal: Not a git repository',...
34 numel(
'fatal: Not a git repository'))
35 hashStr='unversioned';
function throwerror(in msgTag, in varargin)
THROWERROR works similarly to built-in ERROR function in case when there is no output arguments but s...
function hash(in inpArr, in methodName)
OBJECTHASH counts the hash of input object/array.
function gitgethash(in pathStr)