git-gui: Remove no longer used pull from remote code.
Because we aren't going to support single click pulling of changes from an existing remote anytime in the near future, I'm moving the code which used to perform that action. Hopefully we'll be able to do something like it in the near-future, but also support local branches just as easily. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Jan 26, 2007 at 00:47 UTC
86a2af608700896a004be50c939a76a539bdba4d
1 file changed
+5
-68
git-gui.sh
+5
-68
@@ -1269,83 +1269,20 @@ proc commit_committree {fd_wt curHEAD msg} {
1269
1270
######################################################################
1271
##
1272
-## fetch pull push
1272
+## fetch push
1273
1274
proc fetch_from {remote} {
1275
- set w [new_console "fetch $remote" \
1275
+ set w [new_console \
1276
+ "fetch $remote" \
1277
"Fetching new changes from $remote"]
1278
set cmd [list git fetch]
1279
lappend cmd $remote
1280
console_exec $w $cmd
1281
}
1282
1282
-proc pull_remote {remote branch} {
1283
- global HEAD commit_type file_states repo_config
1284
-
1285
- if {![lock_index update]} return
1286
-
1287
- # -- Our in memory state should match the repository.
1288
- #
1289
- repository_state curType curHEAD curMERGE_HEAD
1290
- if {$commit_type ne $curType || $HEAD ne $curHEAD} {
1291
- info_popup {Last scanned state does not match repository state.
1292
-
1293
-Another Git program has modified this repository
1294
-since the last scan. A rescan must be performed
1295
-before a pull operation can be started.
1296
-
1297
-The rescan will be automatically started now.
1298
-}
1299
- unlock_index
1300
- rescan {set ui_status_value {Ready.}}
1301
- return
1302
- }
1303
-
1304
- # -- No differences should exist before a pull.
1305
- #
1306
- if {[array size file_states] != 0} {
1307
- error_popup {Uncommitted but modified files are present.
1308
-
1309
-You should not perform a pull with unmodified
1310
-files in your working directory as Git will be
1311
-unable to recover from an incorrect merge.
1312
-
1313
-You should commit or revert all changes before
1314
-starting a pull operation.
1315
-}
1316
- unlock_index
1317
- return
1318
- }
1319
-
1320
- set w [new_console "pull $remote $branch" \
1321
- "Pulling new changes from branch $branch in $remote"]
1322
- set cmd [list git pull]
1323
- if {$repo_config(gui.pullsummary) eq {false}} {
1324
- lappend cmd --no-summary
1325
- }
1326
- lappend cmd $remote
1327
- lappend cmd $branch
1328
- console_exec $w $cmd [list post_pull_remote $remote $branch]
1329
-}
1330
-
1331
-proc post_pull_remote {remote branch success} {
1332
- global HEAD PARENT MERGE_HEAD commit_type selected_commit_type
1333
- global ui_status_value
1334
-
1335
- unlock_index
1336
- if {$success} {
1337
- repository_state commit_type HEAD MERGE_HEAD
1338
- set PARENT $HEAD
1339
- set selected_commit_type new
1340
- set ui_status_value "Pulling $branch from $remote complete."
1341
- } else {
1342
- rescan [list set ui_status_value \
1343
- "Conflicts detected while pulling $branch from $remote."]
1344
- }
1345
-}
1346
-
1283
proc push_to {remote} {
1348
- set w [new_console "push $remote" \
1284
+ set w [new_console \
1285
+ "push $remote" \
1286
"Pushing changes to $remote"]
1287
set cmd [list git push]
1288
lappend cmd $remote