git-commit-vandalism/lib
Shawn O. Pearce aa252f194b git-gui: Allow users to delete remote branches
Git has supported remote branch deletion for quite some time, but
I've just never gotten around to supporting it in git-gui.  Some
workflows have users push short-term branches to some remote Git
repository, then delete them a few days/weeks later when that topic
has been fully merged into the main trunk.  Typically in that style
of workflow the user will want to remove the branches they created.

We now offer a "Delete..." option in the Push menu, right below the
generic "Push..." option.  When the user opens our generic delete
dialog they can select a preconfigured remote, or enter a random
URL.  We run `git ls-remote $url` to obtain the list of branches and
tags known there, and offer this list in a listbox for the user to
select one or more from.

Like our local branch delete dialog we offer the user a way to filter
their selected branch list down to only those branches that have been
merged into another branch.  This is a very common operation as the
user will likely want to select a range of topic branches, but only
delete them if they have been merged into some sort of common trunk.

Unfortunately our remote merge base detection is not nearly as strict
as the local branch version.  We only offer remote heads as the test
commit (not any local ones) and we require that all necessary commits
to successfully run git-merge-base are available locally.  If one or
more is missing we suggest that the user run a fetch first.

Since the Git remote protocol doesn't let us specify what the tested
commit was when we evaluated our decision to execute the remote delete
there is a race condition here.  The user could do a merge test against
the trunk, determine a topic branch was fully merged, but before they
can start pushing the delete request another user could fast-forward
the remote topic branch to a new commit that is not merged into the
trunk.  The delete will arrive after, and remove the topic, even though
it was not fully merged.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:50:42 -04:00
..
blame.tcl git-gui: Format author/committer times in ISO format 2007-05-09 00:48:27 -04:00
branch_rename.tcl git-gui: Allow users to rename branches through 'branch -m' 2007-05-28 17:50:42 -04:00
branch.tcl git-gui: Refactor into multiple files to save my sanity 2007-05-07 23:35:48 -04:00
browser.tcl git-gui: Convert blame to the "class" way of doing things 2007-05-08 21:38:55 -04:00
class.tcl git-gui: Don't attempt to inline array reads in methods 2007-05-08 21:38:54 -04:00
commit.tcl git-gui: Refactor into multiple files to save my sanity 2007-05-07 23:35:48 -04:00
console.tcl git-gui: Convert browser, console to "class" format 2007-05-08 21:38:54 -04:00
database.tcl git-gui: Convert browser, console to "class" format 2007-05-08 21:38:54 -04:00
diff.tcl git-gui: Refactor into multiple files to save my sanity 2007-05-07 23:35:48 -04:00
error.tcl git-gui: Refactor into multiple files to save my sanity 2007-05-07 23:35:48 -04:00
index.tcl git-gui: Refactor into multiple files to save my sanity 2007-05-07 23:35:48 -04:00
merge.tcl git-gui: Convert browser, console to "class" format 2007-05-08 21:38:54 -04:00
option.tcl git-gui: Show the git-gui library path in 'About git-gui' 2007-05-28 17:50:41 -04:00
remote_branch_delete.tcl git-gui: Allow users to delete remote branches 2007-05-28 17:50:42 -04:00
remote.tcl git-gui: GUI support for running 'git remote prune <name>' 2007-05-28 17:50:40 -04:00
shortcut.tcl git-gui: Refactor into multiple files to save my sanity 2007-05-07 23:35:48 -04:00
transport.tcl git-gui: GUI support for running 'git remote prune <name>' 2007-05-28 17:50:40 -04:00