Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

174: git-webrev should support taking file list via STDIN #276

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -181,7 +181,7 @@ public Arguments parse(String[] args) {
}
seen.add(flag);
}
} else if (arg.startsWith("-")) {
} else if (arg.startsWith("-") && !arg.equals("-")) {
var name = arg.substring(1);
var flag = lookupShortcut(name);
if (flag.isSwitch()) {
@@ -256,8 +256,14 @@ private static void generate(String[] args) throws IOException {
List<Path> files = List.of();
if (arguments.at(0).isPresent()) {
var path = arguments.at(0).via(Path::of);
files = Files.readAllLines(path).stream().map(Path::of).collect(Collectors.toList());
if (path.equals(Path.of("-"))) {
var reader = new BufferedReader(new InputStreamReader(System.in));
files = reader.lines().map(Path::of).collect(Collectors.toList());
} else {
files = Files.readAllLines(path).stream().map(Path::of).collect(Collectors.toList());
}
}

Webrev.repository(repo)
.output(output)
.title(title)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.