dolthub / doltpy

A Python API for Dolt
Apache License 2.0
55 stars 13 forks source link

Dolt.branch() options `delete`, `copy` and `move` broken #98

Closed louisrigot closed 3 years ago

louisrigot commented 3 years ago

If I want to rename a branch, for example renaming master into main:

repo.branch('master', new_branch='main', force=True, move=True)

results in this being executed: dolt branch --force master instead of dolt branch --force --move master main.

I'm pretty sure the issue is in core/dolt.py, line 612

if branch_name and not(delete and copy and move):

should be

if branch_name and not(delete or copy or move):