* delete (unapply branch when the head matches the merge result)
* add debug stuff, create new branch if none applied
* if there are modified files on a vbranch, dont unapply it
* fix args in the wrong order
It's a good supporting featured, but it was not made with virtual
branches in mind. In it's current state it only introduces confusions,
and it's probably not functioning correctly.
This PR implements a way to update an out of date target branch.
This adds logic to see if the target branch is out of date (if say, origin/master has commits that are not on target.sha) and will show in the UI that the frozen target branch is behind. If this happens, it adds a button to update, which will call an update_branch_target function in Rust.
This function will:
* Check that there is in fact a new commit on the target branch
* Try to merge that new head commit into your current working directory, bailing if it cannot
* If that succeeds (the new upstream can merge cleanly with all your vbranch content), it will then update all your virtual branches
* If the vbranch has no commits, it simply updates the head so the diffs work properly again
* If the vbranch has commits, it will merge the new head into the virtual branch head and write the new merge commit to the vbranch commit list. omg.
The patch also:
* Adds some tests for updating the target
* Calculates merge base on setup
* Only assigns stuff to active branches
* Adds a reset command to make all branches inactive for testing
Uses localStorage to store whether or not a file is toggled open. This
implementation behaves well wrt to "expand all", but the is never
flushed so this isn't a shippable solution.