@@ -98,13 +98,13 @@ function initDevTools(repoName,currentDir)
98
98
99
99
% retrieve the directory of the fork from the local git configuration
100
100
[~ , result_gitConfForkDirGet ] = system([' git config --get user.' , gitConf .leadForkDirName , gitConf .nickName , ' .path' ]);
101
- if isempty(result_gitConfForkDirGet )
102
- fprintf(' %s%s%s\n ' ,' Attempting to progress by assuming the current directory (' , currentDir , ' ) is a fork directory.' )
103
- gitConf.fullForkDir= currentDir ;
104
- gitConf.localDir = gitConf .fullForkDir ;
105
- else
101
+ if ~isempty(result_gitConfForkDirGet )
106
102
gitConf.fullForkDir = strtrim(result_gitConfForkDirGet );
107
103
gitConf.localDir = gitConf .fullForkDir ;
104
+ else
105
+ fprintf(' %s\n ' ,' No existing information about the location of the fork directory.' )
106
+ gitConf.fullForkDir = ' ' ;
107
+ gitConf.localDir = ' ' ;
108
108
end
109
109
110
110
% check if the fork exists remotely
@@ -195,7 +195,14 @@ function initDevTools(repoName,currentDir)
195
195
196
196
% only update if there are no local changes
197
197
if status_gitStatus == 0 && isempty(result_gitStatus )
198
- updateFork(true );
198
+ reply = input([gitCmd .lead , originCall , ' Do you want to update your fork? Y/N [Y]:' ], ' s' );
199
+
200
+ % update fork if requested
201
+ if (isempty(reply ) || strcmpi(reply , ' y' ) || strcmpi(reply , ' yes' ))
202
+ updateFork(true );
203
+ end
204
+
205
+
199
206
else
200
207
printMsg(mfilename , ' The local fork cannot be updated as you have uncommitted changes.' , [gitCmd .fail , gitCmd .trail ]);
201
208
end
0 commit comments