Skip to content

Commit

Permalink
Remove the old remote when renaming a remote
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Oct 18, 2023
1 parent 9712cae commit cfa9671
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
actions
actionEditRemote
self selectedRemoteName ifNil: [^ self].
self withUnitOfWork: [| remote |
self withUnitOfWork: [| remote newRemote |
remote := self selectedRemote.
self addRemote:
(SquotRemoteDialog
getRemoteWithTitle: 'Edit Remote'
name: remote name
url: remote url)].
newRemote := SquotRemoteDialog
getRemoteWithTitle: 'Edit Remote'
name: remote name
url: remote url.
newRemote ifNotNil: [
newRemote name = remote name ifFalse: [
"only remove the remote if the name changes, otherwise the refs can be kept"
self unitOfWork removeRemoteNamed: remote name].
self addRemote: newRemote]].
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"openOnWorkingCopy:" : "mad 9/21/2023 17:08" },
"instance" : {
"actionAddRemote" : "mad 9/21/2023 17:58",
"actionEditRemote" : "mad 9/21/2023 18:06",
"actionEditRemote" : "mad 10/18/2023 15:54",
"actionRemoveRemote" : "mad 9/21/2023 18:06",
"addRemote:" : "mad 9/21/2023 18:24",
"buildAddRemoteButton:" : "mad 9/21/2023 17:02",
Expand Down

0 comments on commit cfa9671

Please sign in to comment.