mirror of
https://github.com/git/git.git
synced 2024-11-02 15:28:21 +01:00
7bd197c7ba
If we are trying to checkout a local branch which is matched to a remote tracking branch, but the local branch is newer than the remote tracking branch we actually just want to switch to the local branch. The local branch is "Already up to date". Unfortunately we tossed away the local branch's commit SHA-1 and kept the remote tracking branch's SHA-1, which meant that the user lost the local changes when we updated the working directory. At least we did not update the local branch ref, so the user's data was still intact. We now toss the tracking branch's SHA-1 and replace with the local branch's SHA-1 before the checkout, ensuring that we pass of the right tree to git-read-tree when we update the working directory. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> |
||
---|---|---|
.. | ||
blame.tcl | ||
branch.tcl | ||
branch_checkout.tcl | ||
branch_create.tcl | ||
branch_delete.tcl | ||
branch_rename.tcl | ||
browser.tcl | ||
checkout_op.tcl | ||
choose_rev.tcl | ||
class.tcl | ||
commit.tcl | ||
console.tcl | ||
database.tcl | ||
diff.tcl | ||
encoding.tcl | ||
error.tcl | ||
index.tcl | ||
merge.tcl | ||
option.tcl | ||
remote.tcl | ||
remote_branch_delete.tcl | ||
shortcut.tcl | ||
status_bar.tcl | ||
transport.tcl |