File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
- function cmdout = git(varargin )
1
+ function [ cmdout , statout ] = git(varargin )
2
2
% A thin MATLAB wrapper for Git.
3
3
%
4
4
% Short instructions:
60
60
% v0.7 09 April 2015 -- VF: If user requests it, return Git results
61
61
% as a variable instead of displaying them.
62
62
%
63
+ % v0.8 24 Juli 2015 -- MvdL: Return status output
64
+ %
65
+ %
63
66
% Contributors: (MR) Manu Raghavan
64
67
% (TH) Timothy Hansell
65
68
% (TN) Tassos Natsakis
66
69
% (TP) Tyler Parsons
67
70
% (HG) Han Geerligs
68
71
% (VF) Vadim Frolov
72
+ % (MvdL) Marcel van der Linden
69
73
%
70
74
orgpath= getenv(' PATH' );
71
75
quit_function= 0 ;
122
126
answer = inputdlg(' Comments:' ,' Commit'' s comments' );
123
127
arguments = [arguments ' -m"' char(answer ) ' "' ];
124
128
end
125
- [~ ,result ] = system([' git ' ,arguments ,prog ]);
129
+ [status ,result ] = system([' git ' ,arguments ,prog ]);
126
130
end
127
131
if nargout >= 1
128
132
cmdout = strtrim(result );
133
+ statout = status ;
129
134
else
130
135
% Display result instead of returning it
131
136
% to suppress output of ans
You can’t perform that action at this time.
0 commit comments