Skip to content

Commit a259811

Browse files
authored
[NET-216] Make commitString.m shell agnostic (#62)
make sprintf one line
1 parent 82381a5 commit a259811

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

+nla/+helpers/+git/commitString.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
if ~exist('full', 'var'), full = false; end
55

6-
cmd_str = sprintf('cd %s\ngit rev-parse %%s HEAD', nla.findRootPath());
7-
[cmd_status, branch_name] = system(sprintf(cmd_str, '--abbrev-ref'));
6+
cmd_str = sprintf('cd %s\ngit rev-parse --abbrev-ref HEAD', nla.findRootPath());
7+
[cmd_status, branch_name] = system(sprintf(cmd_str));
88
if cmd_status ~= 0
99
str = 'Failed to locate git repository';
1010
return

0 commit comments

Comments
 (0)