We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
commitString.m
1 parent 82381a5 commit a259811Copy full SHA for a259811
1 file changed
+nla/+helpers/+git/commitString.m
@@ -3,8 +3,8 @@
3
4
if ~exist('full', 'var'), full = false; end
5
6
- cmd_str = sprintf('cd %s\ngit rev-parse %%s HEAD', nla.findRootPath());
7
- [cmd_status, branch_name] = system(sprintf(cmd_str, '--abbrev-ref'));
+ cmd_str = sprintf('cd %s\ngit rev-parse --abbrev-ref HEAD', nla.findRootPath());
+ [cmd_status, branch_name] = system(sprintf(cmd_str));
8
if cmd_status ~= 0
9
str = 'Failed to locate git repository';
10
return
0 commit comments