From: Miklos Vajna Date: Fri, 19 Dec 2008 00:25:24 GMT Subject: Re: git-rm -n leaves .git/index.lock if not allowed to finish Message-ID: <20081219002524.GB21154@genesis.frugalware.org> In-Reply-To: <87prjptfo7.fsf@jidanni.org> On Fri, Dec 19, 2008 at 04:02:48AM +0800, jidanni@jidanni.org wrote: > Bug: if git-rm -n is not allowed to write all it wants to write, it > will leave a .git/index.lock file: > # git-rm -n -r . 2>&1|sed q > error: '.etckeeper' has changes staged in the index > # git-rm -n -r . 2>&1|sed q > fatal: unable to create '.git/index.lock': File exists Can't reproduce: diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh index b7d46e5..1581691 100755 --- a/t/t3600-rm.sh +++ b/t/t3600-rm.sh @@ -251,4 +251,12 @@ test_expect_success 'refresh index before checking if it is up-to-date' ' ' +test_expect_success 'test from jidanni' ' + + git reset --hard && + git rm -n -r . 2>&1|sed q && + git rm -n -r . 2>&1|sed q + +' + test_done passes here just fine. Yes, there are multiple files in the repo.