File |
Line |
org/eclipse/jgit/pgm/Log.java |
112 |
org/eclipse/jgit/pgm/Show.java |
95 |
@Option(name = "-p", usage = "usage_showPatch")
boolean showPatch;
@Option(name = "-M", usage = "usage_detectRenames")
private Boolean detectRenames;
@Option(name = "--no-renames", usage = "usage_noRenames")
void noRenames(@SuppressWarnings("unused") boolean on) {
detectRenames = Boolean.FALSE;
}
@Option(name = "-l", usage = "usage_renameLimit")
private Integer renameLimit;
@Option(name = "--name-status", usage = "usage_nameStatus")
private boolean showNameAndStatusOnly;
@Option(name = "--ignore-space-at-eol")
void ignoreSpaceAtEol(@SuppressWarnings("unused") boolean on) {
diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_TRAILING);
}
@Option(name = "--ignore-leading-space")
void ignoreLeadingSpace(@SuppressWarnings("unused") boolean on) {
diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_LEADING);
}
@Option(name = "-b", aliases = { "--ignore-space-change" })
void ignoreSpaceChange(@SuppressWarnings("unused") boolean on) {
diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_CHANGE);
}
@Option(name = "-w", aliases = { "--ignore-all-space" })
void ignoreAllSpace(@SuppressWarnings("unused") boolean on) {
diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_ALL);
}
@Option(name = "-U", aliases = { "--unified" }, metaVar = "metaVar_linesOfContext")
void unified(int lines) {
diffFmt.setContext(lines);
}
@Option(name = "--abbrev", metaVar = "metaVar_n")
void abbrev(int lines) {
diffFmt.setAbbreviationLength(lines);
}
@Option(name = "--full-index")
void abbrev(@SuppressWarnings("unused") boolean on) {
diffFmt.setAbbreviationLength(Constants.OBJECT_ID_STRING_LENGTH);
}
@Option(name = "--src-prefix", usage = "usage_srcPrefix")
void sourcePrefix(String path) {
diffFmt.setOldPrefix(path);
}
@Option(name = "--dst-prefix", usage = "usage_dstPrefix")
void dstPrefix(String path) {
diffFmt.setNewPrefix(path);
}
@Option(name = "--no-prefix", usage = "usage_noPrefix")
void noPrefix(@SuppressWarnings("unused") boolean on) {
diffFmt.setOldPrefix(""); //$NON-NLS-1$
diffFmt.setNewPrefix(""); //$NON-NLS-1$
} |
File |
Line |
org/eclipse/jgit/pgm/Diff.java |
111 |
org/eclipse/jgit/pgm/Log.java |
121 |
org/eclipse/jgit/pgm/Show.java |
104 |
}
@Option(name = "-l", usage = "usage_renameLimit")
private Integer renameLimit;
@Option(name = "--name-status", usage = "usage_nameStatus")
private boolean showNameAndStatusOnly;
@Option(name = "--ignore-space-at-eol")
void ignoreSpaceAtEol(@SuppressWarnings("unused") boolean on) {
diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_TRAILING);
}
@Option(name = "--ignore-leading-space")
void ignoreLeadingSpace(@SuppressWarnings("unused") boolean on) {
diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_LEADING);
}
@Option(name = "-b", aliases = { "--ignore-space-change" })
void ignoreSpaceChange(@SuppressWarnings("unused") boolean on) {
diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_CHANGE);
}
@Option(name = "-w", aliases = { "--ignore-all-space" })
void ignoreAllSpace(@SuppressWarnings("unused") boolean on) {
diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_ALL);
}
@Option(name = "-U", aliases = { "--unified" }, metaVar = "metaVar_linesOfContext")
void unified(int lines) {
diffFmt.setContext(lines);
}
@Option(name = "--abbrev", metaVar = "metaVar_n")
void abbrev(int lines) {
diffFmt.setAbbreviationLength(lines);
}
@Option(name = "--full-index")
void abbrev(@SuppressWarnings("unused") boolean on) {
diffFmt.setAbbreviationLength(OBJECT_ID_STRING_LENGTH); |
File |
Line |
org/eclipse/jgit/pgm/debug/DiffAlgorithms.java |
146 |
org/eclipse/jgit/pgm/debug/TextHashFunctions.java |
274 |
if (gitDirs.isEmpty()) {
RepositoryBuilder rb = new RepositoryBuilder() //
.setGitDir(new File(gitdir)) //
.readEnvironment() //
.findGitDir();
if (rb.getGitDir() == null)
throw die(CLIText.get().cantFindGitDirectory);
gitDirs.add(rb.getGitDir());
}
for (File dir : gitDirs) {
RepositoryBuilder rb = new RepositoryBuilder();
if (RepositoryCache.FileKey.isGitRepository(dir, FS.DETECTED))
rb.setGitDir(dir);
else
rb.findGitDir(dir);
try (Repository repo = rb.build()) {
run(repo);
}
}
}
private void run(Repository repo) throws Exception {
List<Test> all = init(); |