TouK / touk-bash

Bash snippets for your development
Apache License 2.0
5 stars 3 forks source link

Cleanup doesn't match branches by exact name #8

Open kprzygudzki opened 6 years ago

kprzygudzki commented 6 years ago

When attempting to clean branches connected to a branch cleanup ABC_74_webdav_wiremock the script matches all the branches which names contain the branch name provded as an argument and mistakenly (in my opinion) matches branches connected to a different topic branch:


  >> From local:
  >>   ABC_74_webdav_wiremock
  >>   ABC_74_webdav_wiremock_rev_1
  >>   ABC_74_webdav_wiremock_rev_2
  >>   ABC_74_webdav_wiremock_server
  >>   ABC_74_webdav_wiremock_server_rev_1
  >>   ABC_74_webdav_wiremock_server_rev_2

  >> From origin:
  >>   refs/heads/ABC_74_webdav_wiremock_server_rev_2
  >>   refs/heads/ABC_74_webdav_wiremock_server_rev_1
  >>   refs/heads/ABC_74_webdav_wiremock_server
  >>   refs/heads/ABC_74_webdav_wiremock_rev_2
  >>   refs/heads/ABC_74_webdav_wiremock_rev_1
  >>   refs/heads/ABC_74_webdav_wiremock

I think it should be more picky about which branches it chooses to clean up and use exact matching instead of contains matching.

SpOOnman commented 6 years ago

I know that, but I don't know how to resolve it :(

kprzygudzki commented 6 years ago

I might have a solution to that – expect an incoming pull request 😎