From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id E529E208E3 for ; Tue, 5 Sep 2017 17:58:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753232AbdIER6O (ORCPT ); Tue, 5 Sep 2017 13:58:14 -0400 Received: from mout.web.de ([212.227.15.14]:60964 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752269AbdIER6N (ORCPT ); Tue, 5 Sep 2017 13:58:13 -0400 Received: from macce.local ([195.198.252.176]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M7n5k-1dbu1v2NdI-00vKr4; Tue, 05 Sep 2017 19:58:07 +0200 Subject: Re: Empty directories in Git: Current guidance for historical commits? To: wafflecode@openmail.cc, git@vger.kernel.org References: <20170905124743.Horde.bgYg8gUhE6ubSHtPAr3lCGl@vfemail.net> From: =?UTF-8?Q?Torsten_B=c3=b6gershausen?= Message-ID: Date: Tue, 5 Sep 2017 19:58:07 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170905124743.Horde.bgYg8gUhE6ubSHtPAr3lCGl@vfemail.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:8yCbt78b+QLn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ps2Meh7F 3lSk1E7IccVs1HjrORnrpfOM//p7O9Og4mxqpVfOvJPABdK/MY= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 2017-09-05 14:47, wafflecode@openmail.cc wrote: > > Hello, > > Per the FAQ it's clear that Git (by current design) does not track empty > directories:  > https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F > > That's fine and I can fix that for my code going forward via the build system, > as needed. > > However I'm looking to import a fairly deep (10k+ commits) svn history in to Git > and I'm wondering what the current best practices are for dealing with empty > folders?   Meaning to say, I'd like to be able to check out an older revision of > the code and have it build correctly using the older build system which expects > certain folders to exist. > > There are a few different answers floating around the net, so I figured I'd > confirm via the mailing list. > > Is just dropping a ".gitignore" or "README" file in the empty directories during > conversion still the most reasonable approach? A .gitignore will, but may cost 0.001% CPU time when running "git status". I have seen systems that create a file called ".empty" in every directory. > If so, is there a way to do this > automatically during the conversion using "git svn" or the like? Not what I am aware of. And even if, the .empty files need to be removed, once the directory is removed. And we don't have logic for that, as far as I know. That would be by suggestion: convert the repo "as is", with the tools we have. If you need to continue to work on an old branch (or the master branch), add the .empty file, where needed, and continue to work in Git, on a branch as usual. > > > Thank you > David >