X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Mon, 23 Nov 2009 17:20:44 +1300
Message-ID: <db95995b0911222020l291b023dw1bea3db6f179333f@mail.gmail.com>
Subject: [1.7] git checkout or clean fails to unlink submodule
From: David Antliff <david.antliff@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

I've noticed that git-1.6.4.2 in Cygwin-1.7 exhibits some unusual
behaviour and although I don't know if it's a Cygwin issue. I really
don't have a way to check, so I'll simply report it here.

I've compared this behaviour with git-1.6.1.2 from Cygwin-1.5, and it
does not occur, so it's new behaviour in git-1.6.4.2.

The problem concerns sub-modules. With git-1.6.1.2, when using 'git
checkout' to move away from a branch that has a submodule ("build")
associated to a branch that does not have that submodule associated, I
get the following warning message:

 $ git checkout -f master
warning: unable to unlink build: Operation not permitted

The concerned directory remains undeleted. I note with the older git
that it also doesn't remove the directory, but no warning is
displayed.

But what is concerning is that a subsequent 'git clean -fdx' does not
remove the submodule directory either. With git-1.6.1.2 the directory
would be deleted by:

$ git clean -fdx

But with 1.6.4.2 it instead says:

$ git clean -fdx
Removing build
$ ls -l
...
drwxr-x---+ 1 dantliff Domain Users   0 2009-11-23 17:01 build


The 'build' directory is untracked so 'git clean -d' should remove it,
but it doesn't.

Any suggestions how to investigate this further? Is there some way
that Windows or Cygwin is somehow preventing the deletion of this
directory? Note that I do not have any other processes accessing this
directory or any files within the directory, and I have a file locking
application (Unlocker Assistant) that seems to confirm this.


-- David.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

