Delete the .git/index in case it's corrupted. Do a "git reset --hard HEAD" before a git pull. Make sure a build directory cannot collide with another build directory.
parent
9840e5e147
commit
cf09a138d2
|
@ -57,6 +57,7 @@ M: unix really-delete-tree delete-tree ;
|
||||||
[ day>> , ]
|
[ day>> , ]
|
||||||
[ hour>> , ]
|
[ hour>> , ]
|
||||||
[ minute>> , ]
|
[ minute>> , ]
|
||||||
|
[ drop nano-count , ]
|
||||||
} cleave
|
} cleave
|
||||||
] { } make [ pad-00 ] map "-" join ;
|
] { } make [ pad-00 ] map "-" join ;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
! Copyright (C) 2008, 2010 Eduardo Cavazos, Slava Pestov.
|
! Copyright (C) 2008, 2010 Eduardo Cavazos, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel io.launcher bootstrap.image.download
|
USING: bootstrap.image.download combinators.short-circuit
|
||||||
mason.common mason.platform ;
|
io.directories io.launcher kernel mason.common mason.platform ;
|
||||||
IN: mason.updates
|
IN: mason.updates
|
||||||
|
|
||||||
|
: git-reset-cmd ( -- cmd )
|
||||||
|
{
|
||||||
|
"git"
|
||||||
|
"reset"
|
||||||
|
"--hard"
|
||||||
|
"HEAD"
|
||||||
|
} ;
|
||||||
|
|
||||||
: git-pull-cmd ( -- cmd )
|
: git-pull-cmd ( -- cmd )
|
||||||
{
|
{
|
||||||
"git"
|
"git"
|
||||||
|
@ -14,6 +22,8 @@ IN: mason.updates
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
: updates-available? ( -- ? )
|
: updates-available? ( -- ? )
|
||||||
|
".git/index" delete-file
|
||||||
|
git-reset-cmd short-running-process
|
||||||
git-id
|
git-id
|
||||||
git-pull-cmd short-running-process
|
git-pull-cmd short-running-process
|
||||||
git-id
|
git-id
|
||||||
|
@ -23,6 +33,4 @@ IN: mason.updates
|
||||||
boot-image-name maybe-download-image ;
|
boot-image-name maybe-download-image ;
|
||||||
|
|
||||||
: new-code-available? ( -- ? )
|
: new-code-available? ( -- ? )
|
||||||
updates-available?
|
{ [ updates-available? ] [ new-image-available? ] } 0|| ;
|
||||||
new-image-available?
|
|
||||||
or ;
|
|
||||||
|
|
Loading…
Reference in New Issue