From: Petr Baudis Date: Sat, 13 Aug 2005 18:00:08 GMT Subject: Re: Add an empty directory? Message-ID: <20050813180008.GJ5608@pasky.ji.cz> In-Reply-To: <20050813173043.GA25013@hpsvcnb.fc.hp.com> Dear diary, on Sat, Aug 13, 2005 at 07:30:43PM CEST, I got a letter where Carl Baldwin told me that... > Greetings, Hi, > My appologies if this has already been discussed. I've been through the > archives but could easily have missed something. > > I have found it useful in the past to have the ability to add an empty > directory to the repository. With what little I know about git it seems > that this is entirely possible. It would create an empty tree object > for the new directory and insert a reference to that in the parent tree > object. > > If someone could get me started I think I could find the time to create > and submit a patch to allow this. Here is what I've tried (with > 0.99.4). > > % mkdir test > % cd test > % git-init-db > % mkdir dir > % git-add-script dir > error: open("dir"): No such file or directory > fatal: Unable to add dir to database the object databases supports it, but the index file does not. But yes, it should be supported, I think. Some argue that this is useless, so some practical example of its usefulness might be a good motivation to get us going. :-) -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ If you want the holes in your knowledge showing up try teaching someone. -- Alan Cox