summaryrefslogtreecommitdiff
path: root/git-gui
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2006-11-07 21:30:46 -0500
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2006-11-07 23:48:21 -0500
commit988b8a7d63ff52f252bb4c517d9f05c3952aa728 (patch)
treec54f5b74355f9ea0d7d349fb9c7929982299d4be /git-gui
parentgit-gui: Allow the user to disable update-index --refresh during rescan. (diff)
downloadtgif-988b8a7d63ff52f252bb4c517d9f05c3952aa728.tar.xz
git-gui: Grab the index lock while running pull.
The user must not modify the index while a git pull operation is running, doing so might cause problems for the merge driver and specific strategy being used. Normally on the command line people are just really good and don't try to run index altering operations while they are also running a pull. But in a slick GUI like git-gui we can't trust the user quite as much. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui')
-rwxr-xr-xgit-gui2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-gui b/git-gui
index 8562983d36..2d82152b36 100755
--- a/git-gui
+++ b/git-gui
@@ -642,6 +642,7 @@ proc fetch_from {remote} {
}
proc pull_remote {remote branch} {
+ if {![lock_index update]} return
set w [new_console "pull $remote $branch" \
"Pulling new changes from branch $branch in $remote"]
set cmd [list git pull]
@@ -651,6 +652,7 @@ proc pull_remote {remote branch} {
}
proc post_pull_remote {remote branch success} {
+ unlock_index
if {$success} {
update_status "Successfully pulled $branch from $remote."
} else {