RFR: 1878: Improve argument check in SKARA CLI [v2]

Erik Joelsson erikj at openjdk.org
Fri Apr 14 17:12:40 UTC 2023


On Fri, 14 Apr 2023 16:08:07 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> cli/src/main/java/org/openjdk/skara/cli/GitSync.java line 345:
>> 
>>> 343:                     branches.add(branch.trim());
>>> 344:                 }
>>> 345:             }
>> 
>> What happened to this part?
>
> Because we have a method GitSync#getOption in this class. The logic is as same as this.
> 
>     private String getOption(String name) throws IOException {
>         var arg = ForgeUtils.getOption(name, arguments);
>         if (arg != null) {
>             return arg;
>         }
>         var lines = repo.config("sync." + name);
>         return lines.size() == 1 ? lines.get(0) : null;
>     }

Oh, right, I see now.

-------------

PR Review Comment: https://git.openjdk.org/skara/pull/1502#discussion_r1167097344


More information about the skara-dev mailing list