Created
May 12, 2011 08:56
-
-
Save romanz/968200 to your computer and use it in GitHub Desktop.
MATLAB Git wrapper (for Linux)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [status, result] = git(varargin) | |
cmd = 'unset LD_LIBRARY_PATH; git --no-pager'; | |
for i = 1:numel(varargin) | |
cmd = [cmd ' ' varargin{i}]; | |
end | |
switch nargout | |
case 0, system(cmd); | |
case 1, [status] = system(cmd); | |
case 2, [status, result] = system(cmd); | |
end | |
'unset LD_LIBRARY_PATH' is used since MATLAB sets it to its own libraries - preventing other extensions to work (e.g. git-cola with PyQt).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use git "--no-pager" option, in case "WARNING: terminal is not fully functional" while running from MATLAB command line.