RFR: 1355: Mirror bot needs branch selection based on patterns
Kevin Rushforth
kcr at openjdk.org
Tue Aug 16 20:17:45 UTC 2022
On Tue, 16 Aug 2022 18:52:38 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> vcs/src/main/java/org/openjdk/skara/vcs/git/GitRepository.java line 598:
>>
>>> 596: cmd.add("--tags");
>>> 597: if (force) {
>>> 598: cmd.add("--force");
>>
>> Is there a reason not to ignore the `force` flag when not pushing tags? It would seem more consistent to always look at the `force` flag and add `--force` is set. That way a repo configured not to push tags would still be able to handle a source branch that was force-pushed.
>
> I was torn about this. I went this way to change as little current behavior as possible, mainly because I don't fully understand the nuances of git behavior here. Note that further down, `force==true` is already handled for branches by prepending `+` to the refs. On the other hand, the current proposal may be inconsistent, which is also bad long term.
>
> Perhaps the best solution would be to get rid of the `+` below and just add `--force` when `force==true`?
Using `--force` consistently sounds cleanest, but if you want to limit the scope of this PR and do that in a follow-up PR, that would be good.
-------------
PR: https://git.openjdk.org/skara/pull/1358
More information about the skara-dev
mailing list