Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
48dedd42
Commit
48dedd42
authored
Sep 20, 2017
by
Jan-Gerrit Richter
Browse files
added persistent variables to git commit hash to reduce time
parent
0ab2229f
Changes
1
Hide whitespace changes
Inline
Side-by-side
kernel/StandardRoutines/ita_git_getMasterCommitHash.m
View file @
48dedd42
...
...
@@ -13,6 +13,7 @@ function commitID = ita_git_getMasterCommitHash(varargin)
% Options (default):
% 'branch' (master) : the branch of the returned commit id
% 'path' (ita_toolbox_path) : the path of the repository
% 'force' (false) : force a new update on the commit id
%
%
% See also:
...
...
@@ -30,12 +31,25 @@ function commitID = ita_git_getMasterCommitHash(varargin)
% Author: Jan-Gerrit Richter -- Email: jri@akustik.rwth-aachen.de
% Created: 13-Sep-2017
persistent
oldArgs
;
persistent
oldID
;
sArgs
.
branch
=
'master'
;
sArgs
.
path
=
''
;
sArgs
.
force
=
0
;
sArgs
=
ita_parse_arguments
(
sArgs
,
varargin
);
if
~
isempty
(
oldID
)
if
isequaln
(
oldArgs
,
sArgs
)
if
~
sArgs
.
force
commitID
=
oldID
;
return
;
end
end
end
if
isempty
(
sArgs
.
path
)
repPath
=
ita_toolbox_path
;
else
...
...
@@ -54,6 +68,9 @@ try
commitID
=
''
;
end
cd
(
workingDir
);
oldID
=
commitID
;
oldArgs
=
sArgs
;
catch
e
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment