Added a test to see if the branch exists before trying to delete it #243

Closed
wants to merge 2 commits into
from

2 participants

@johncongdon

I have been using git flow release finish -p, and kept getting an error that I was ignoring. Decided I probably should not ignore.

@baby-gnu

Hello,

This may be a little more complicated, I think you should not delete a remote branch if it's not fully merged into the local one.

You can see the discussion in petervanderdoes/gitflow-avh#12, implemented by petervanderdoes/gitflow-avh@e16b463.

Regards.

@johncongdon

Here's the thing, if you look at the diff, it was just deleting the branch already. It was causing errors to be displayed because the remote branch wasn't there to be deleted. So I just added a test to see if it existed before trying to run a command that would fail.

@baby-gnu

Yes, that was an issue, trying to delete something that may not exist and possibly losing some commits by deleting something not merged.

@johncongdon

I screwed up on this pull request. There are actually two features because I didn't use a branch. I am going to close and reopen with the single fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment