Re: [PATCH] Repack should try to prevent itself from running twice, concurrently.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 25, 2006, 10:17 UTC
- Message-ID
- <Pine.LNX.4.63.0606251216250.29667@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <11512302144123-git-send-email-ryan@michonline.com>
Hi,
On Sun, 25 Jun 2006, Ryan Anderson wrote:
Show 8 quoted lines
> +if [ -f $GIT_DIR/repack.lock ] > +then > + echo "Existing repack job appears to be running." > + echo "Remove $GIT_DIR/repack.lock if this is not the case." > + exit 1 > +else > + echo $$ > $GIT_DIR/repack.lock > +fi
It is not like it is being an atomic operation, but then, we are not going to call repack multiple times a second. I'd say it is sufficient.
Ciao, Dscho