# git-svn: Deleting directories

2 messages from 2007-09-24 to 2007-09-24. Participants: Russ Brown, Adam Roben.
Thread: https://gitlist.dev/t/9997

## Russ Brown, 2007-09-24 14:04

Subject: git-svn: Deleting directories
Message-ID: <46F7C3EA.2080806@gmail.com>
URL: https://gitlist.dev/e/46F7C3EA.2080806%40gmail.com

```
I've just noticed that when deleting entire directory trees in git, when
the dcommit happens only the files in that trees get deleted, which
leaves a 'ghost town' of a directory tree with folders but no files,
which will no doubt have somewhat confused my svn-using colleagues.

This is obviously an interoperability problem, but I understand that git
does not track folders and is so tricky to fix.

The question though is how to handle it. Ideally, dcommit will detect
that an entire directory has gone and send through a changeset which
deletes just that one directory, instead of the current behaviour of
explicitly deleting every file in the directory but leaving the
directories themselves intact.

-- 

Russ

```

## Adam Roben, 2007-09-24 16:37

Subject: Re: git-svn: Deleting directories
Message-ID: <46F7E7B6.7000601@apple.com>
URL: https://gitlist.dev/e/46F7E7B6.7000601%40apple.com
In-Reply-To: <46F7C3EA.2080806@gmail.com>

```
Russ Brown wrote:
> I've just noticed that when deleting entire directory trees in git, when
> the dcommit happens only the files in that trees get deleted, which
> leaves a 'ghost town' of a directory tree with folders but no files,
> which will no doubt have somewhat confused my svn-using colleagues.
>
> This is obviously an interoperability problem, but I understand that git
> does not track folders and is so tricky to fix.
>
> The question though is how to handle it. Ideally, dcommit will detect
> that an entire directory has gone and send through a changeset which
> deletes just that one directory, instead of the current behaviour of
> explicitly deleting every file in the directory but leaving the
> directories themselves intact.
>   
There's a similar problem when renaming a directory. dcommit will 
essentially commit a series of moves of individual files rather than 
moving the whole directory. Again this is due to git not tracking 
directories. I should hope that whatever logic is used for detecting a 
directory removal may also be used for detecting a directory rename.

-Adam

```
