drewdeponte / git-ps

Patch Stack workflow CLI extension for Git
MIT License
50 stars 4 forks source link

Record branch assoc in rr after success #58

Closed drewdeponte closed 3 years ago

drewdeponte commented 3 years ago

I changed this behavior so that if when the user attempts to request review (rr) of a patch or a series of patches and has it fail to create the rr branch, cherry pick the path(es) into that branch, or push that branch up to the remote it will no longer record the association of the the branch.

Technically this has the risk of leaving unused ps/rr/ branches behind in the scenario where a user request review for a patch without specify an explicit branch name in which it fails & then the user requests review for that same patch with an explicit branch name. It is worth noting that nothing currently will go back and clean that branch up because nothing knows about the association of that branch to any other concept.

This edge case is acceptable in my eyes at least for the time being as I suspect this edge case is pretty rare that it will happen. Also it isn't a major problem people leave branches around all the time and don't bother to clean them up for ages. Also it is safe for people to clean them up as they normally would with git.

So I still feel like this is an improvement for the user experience as a whole and think we should make this changes.

This relates to issue uptech/git-ps-rs#22.

[changelog] fixed: bug where rr status would appear even when rr failed

ps-id: F2AC601A-5A66-4F4E-A424-A41A3AB934ED