author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 4 Jul 2007 08:21:57 +0000 (04:21 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 9 Jul 2007 01:12:51 +0000 (21:12 -0400) | ||
commit | 774173aa5f24023a82ce79f2a71fe3f664b747ad | |
tree | 40cafcaf403be30300445f99fde13efa4f9d7525 | tree | snapshot |
parent | dd87efc8cc71ceb6aa9a27e900976c317c927846 | commit | diff |
git-gui: Fast-forward existing branch in branch create dialog
If the user elects to create a local branch that has the same name
as an existing branch and we can fast-forward the local branch to
the selected revision we might as well do the fast-forward for the
user, rather than making them first switch to the branch then merge
the selected revision into it. After all, its really just a fast
forward. No history is lost. The resulting branch checkout may
also be faster if the branch we are switching from is closer to
the new revision.
Likewise we also now allow the user to reset the local branch if
it already exists but would not fast-forward. However before we
do the actual reset we tell the user what commits they are going to
lose by showing the oneline subject and abbreviated sha1, and we also
let them inspect the range of commits in gitk.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
If the user elects to create a local branch that has the same name
as an existing branch and we can fast-forward the local branch to
the selected revision we might as well do the fast-forward for the
user, rather than making them first switch to the branch then merge
the selected revision into it. After all, its really just a fast
forward. No history is lost. The resulting branch checkout may
also be faster if the branch we are switching from is closer to
the new revision.
Likewise we also now allow the user to reset the local branch if
it already exists but would not fast-forward. However before we
do the actual reset we tell the user what commits they are going to
lose by showing the oneline subject and abbreviated sha1, and we also
let them inspect the range of commits in gitk.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/branch_create.tcl | diff | blob | history |