@@ -164,79 +164,6 @@ private static boolean isGitWorking() {
164
164
return false ;
165
165
}
166
166
167
- /**
168
- * Get an executor to be used for retrieving the history log for the named
169
- * file.
170
- *
171
- * @param file The file to retrieve history for
172
- * @param sinceRevision the oldest changeset to return from the executor, or
173
- * {@code null} if all changesets should be returned
174
- * @return An Executor ready to be started
175
- */
176
- Executor getHistoryLogExecutor (final File file , String sinceRevision )
177
- throws IOException {
178
-
179
- String filename = getRepoRelativePath (file );
180
-
181
- List <String > cmd = new ArrayList <>();
182
- ensureCommand (CMD_PROPERTY_KEY , CMD_FALLBACK );
183
- cmd .add (RepoCommand );
184
- cmd .add ("log" );
185
- cmd .add ("--abbrev-commit" );
186
- cmd .add (ABBREV_LOG );
187
- cmd .add ("--name-only" );
188
- cmd .add ("--pretty=fuller" );
189
- cmd .add (GIT_DATE_OPT );
190
- if (isMergeCommitsEnabled ()) {
191
- cmd .add ("-m" );
192
- }
193
-
194
- if (file .isFile () && isHandleRenamedFiles ()) {
195
- cmd .add ("--follow" );
196
- }
197
-
198
- if (sinceRevision != null ) {
199
- cmd .add (sinceRevision + ".." );
200
- }
201
-
202
- if (filename .length () > 0 ) {
203
- cmd .add ("--" );
204
- cmd .add (filename );
205
- }
206
-
207
- return new Executor (cmd , new File (getDirectoryName ()), sinceRevision != null );
208
- }
209
-
210
- Executor getRenamedFilesExecutor (final File file , String sinceRevision ) throws IOException {
211
- ensureCommand (CMD_PROPERTY_KEY , CMD_FALLBACK );
212
- List <String > cmd = new ArrayList <>();
213
- cmd .add (RepoCommand );
214
- cmd .add ("log" );
215
- cmd .add ("--find-renames=8" ); // similarity 80%
216
- cmd .add ("--diff-filter=R" );
217
- cmd .add ("--summary" );
218
- cmd .add (ABBREV_LOG );
219
- cmd .add ("--name-status" );
220
- cmd .add ("--oneline" );
221
-
222
- if (file .isFile ()) {
223
- cmd .add ("--follow" );
224
- }
225
-
226
- if (sinceRevision != null ) {
227
- cmd .add (sinceRevision + ".." );
228
- }
229
-
230
- String canonicalPath = file .getCanonicalPath ();
231
- if (canonicalPath .length () > getCanonicalDirectoryName ().length () + 1 ) {
232
- // this is a file in the repository
233
- cmd .add ("--" );
234
- cmd .add (getPathRelativeToCanonicalRepositoryRoot (canonicalPath ));
235
- }
236
-
237
- return new Executor (cmd , new File (getDirectoryName ()), sinceRevision != null );
238
- }
239
-
240
167
/**
241
168
* Be careful, git uses only forward slashes in its command and output (not in file path).
242
169
* Using backslashes together with git show will get empty output and 0 status code.
0 commit comments