RFR: 2143: Support selective tags mirroring [v2]

Erik Joelsson erikj at openjdk.org
Wed Jan 17 19:27:47 UTC 2024


On Wed, 17 Jan 2024 13:29:06 GMT, Erik Duveblad <ehelin at openjdk.org> wrote:

>> vcs/src/main/java/org/openjdk/skara/vcs/git/GitRepository.java line 654:
>> 
>>> 652:     @Override
>>> 653:     public void push(String refspec, URI uri, boolean force) throws IOException {
>>> 654:         if (force && !refspec.equals("+")) {
>> 
>> Are you sure you did not mean 
>> Suggestion:
>> 
>>         if (force && !refspec.beginsWith("+")) {
>> 
>> ?
>
> I would have opted to just skip the `boolean force` parameter. If we are already entrusting the user to supply a correct refspec then they will probably know that they should prefix the refspec with a `+` if they want to force push.

You are right, I meant beginsWith. But having thought about it, I think Erik has a point. We shouldn't modify the refspec given by the user.

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

PR Review Comment: https://git.openjdk.org/skara/pull/1600#discussion_r1456362486


More information about the skara-dev mailing list