git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Out-of-repository file remove error
@ 2008-07-19  8:23 Nick Andrew
  2008-07-19 16:21 ` [PATCH] builtin-rm: fix index lock file path Olivier Marin
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Andrew @ 2008-07-19  8:23 UTC (permalink / raw)
  To: git

git rm seems to have a problem with removing a file from a repository
when the repository .git and working tree are not in the current
directory. It leaves an index.lock file.

Here's a script to show the bug:

mkdir Bugtest
cd Bugtest
git init
date > newfile
git add newfile
git commit -m 'Added' newfile
cd ..
git --git-dir=Bugtest/.git --work-tree=Bugtest rm newfile
ls -l Bugtest/.git/index.lock

Output:

Initialized empty Git repository in .../Bugtest/.git/
Created initial commit 43dec15: Added
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 newfile
rm 'newfile'
fatal: Unable to write new index file
-rw-r--r-- 1 nick nick 32 Jul 19 18:20 Bugtest/.git/index.lock

I tested on:

git version 1.5.6.2
git version 1.5.6.3.440.g9d8f

Nick.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-19 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-19  8:23 Out-of-repository file remove error Nick Andrew
2008-07-19 16:21 ` [PATCH] builtin-rm: fix index lock file path Olivier Marin
2008-07-19 16:24   ` [PATCH V2] " Olivier Marin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).