gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Branch-delete: Ask to delete tracking branch

Open extrawurst opened this issue 4 years ago • 5 comments

If I delete a local branch and it has an upstream I want to be asked to delete that aswell when I delete the local branch. Same vice versa

extrawurst avatar Aug 23 '21 21:08 extrawurst

Hello 👋🏾 I would like to help with this

for sure!

extrawurst avatar Aug 25 '21 15:08 extrawurst

Hello! Is this task assigned to someone? If not, I would like to work on it :)

alessandroasm avatar Oct 06 '21 23:10 alessandroasm

Sorry, sorry. @alessandroasm , I was supposed to work on this but kept putting it off for silly reasons. You should have it. Again very, very sorry @extrawurst

jim4067 avatar Oct 07 '21 03:10 jim4067

Thank you @jim4067! I'll start working on this asap.

alessandroasm avatar Oct 07 '21 11:10 alessandroasm

I've just opened a draft PR for this (#935). I would like to hear your suggestions about the way I implemented this feature as it required a bigger than expected change. I would like to highlight a few things here:

  • I had to split process_confirmed_action in two functions, as clippy was not happy with a more than 100-line function.
  • I've created a function to find all local branches that track a provided remote one; I'm not sure, but I think it is possible to have multiple local branches tracking a single remote one.
  • I would like some suggestions on how to implement the unit tests :)

If you need anything, just let me know. Thanks in advance!

alessandroasm avatar Oct 10 '21 13:10 alessandroasm