git-tool: Preliminary support for auto-refresh via file system monitors
parent
c466a79f28
commit
fb9eb88623
|
@ -425,6 +425,21 @@ TUPLE: <git-status>
|
|||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
! :: git-tool ( REPO -- )
|
||||
|
||||
! <pile> 1 >>fill
|
||||
|
||||
! "Repository: " REPO [ current-directory get ] with-directory append
|
||||
! <label>
|
||||
! add-gadget
|
||||
|
||||
! REPO git-status <pile> 1 >>fill tuck refresh-status-pile add-gadget
|
||||
! REPO <pile> 1 >>fill tuck refresh-remotes-pile add-gadget
|
||||
|
||||
! "Git" open-window ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
:: git-tool ( REPO -- )
|
||||
|
||||
<pile> 1 >>fill
|
||||
|
@ -433,11 +448,31 @@ TUPLE: <git-status>
|
|||
<label>
|
||||
add-gadget
|
||||
|
||||
REPO git-status <pile> 1 >>fill tuck refresh-status-pile add-gadget
|
||||
[let | STATUS [ REPO git-status ]
|
||||
PILE [ <pile> 1 >>fill ] |
|
||||
|
||||
[
|
||||
[let | MONITOR [ REPO t <monitor> ] |
|
||||
[
|
||||
|
||||
[ MONITOR next-change 2drop STATUS PILE refresh-status-pile t ]
|
||||
loop
|
||||
]
|
||||
in-thread
|
||||
]
|
||||
]
|
||||
with-monitors
|
||||
|
||||
STATUS PILE refresh-status-pile
|
||||
|
||||
PILE add-gadget ]
|
||||
|
||||
! REPO git-status <pile> 1 >>fill tuck refresh-status-pile add-gadget
|
||||
REPO <pile> 1 >>fill tuck refresh-remotes-pile add-gadget
|
||||
|
||||
"Git" open-window ;
|
||||
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
: factor-git-tool ( -- ) "resource:" git-tool ;
|
||||
|
|
Loading…
Reference in New Issue