USING: accessors calendar git-tool git-tool io.directories io.monitors io.pathnames kernel locals math namespaces sequences splitting system threads ui ui.gadgets ui.gadgets.buttons ui.gadgets.labels ui.gadgets.packs ; USING: git-tool ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IN: git-tool.remote ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! TUPLE: < pack repository branch remote remote-branch fetch-period push closed last-refresh ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! : current-branch ( REPO -- branch ) { "git" "branch" } git-process stdout>> [ "* " head? ] find nip 2 tail ; : list-branches ( REPO -- branches ) { "git" "branch" } git-process stdout>> [ empty? not ] filter [ 2 tail ] map ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! : list-remotes ( REPO -- remotes ) { "git" "remote" } git-process stdout>> [ empty? not ] filter ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :: list-remote-branches ( REPO REMOTE -- branches ) [let | OUT [ REPO { "git" "remote" "show" REMOTE } git-process stdout>> ] | " Tracked remote branches" OUT member? [ OUT " Tracked remote branches" OUT index 1 + tail first " " split [ empty? not ] filter ] [ OUT OUT [ " New remote branches" head? ] find drop 1 + tail first " " split [ empty? not ] filter ] if ] ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :: refresh-git-remote-gadget ( GADGET -- ) [let | REPO [ GADGET repository>> ] | GADGET clear-gadget GADGET ! Repository label "Repository: " REPO [ current-directory get ] with-directory append