From: Jakub Narebski <jnareb@gmail.com>
To: Kevin Ballard <kevin@sb.org>
Cc: Git Mailing List <git@vger.kernel.org>,
Anton <tmp009@allproducts.info>, Andreas Ericsson <ae@op5.se>
Subject: Re: empty directories and git
Date: Thu, 16 Sep 2010 13:02:19 -0700 (PDT) [thread overview]
Message-ID: <m3aanhlapl.fsf_-_@localhost.localdomain> (raw)
In-Reply-To: <CDEB2042-A498-4950-A3CD-27F111455234@sb.org>
Kevin Ballard <kevin@sb.org> writes:
> On Sep 16, 2010, at 1:32 AM, Andreas Ericsson wrote:
>
> > You can't have empty directories in git.
> Apologies to those who were CC'd on the original message, I'm
> resending to this list as I forgot to set plain text.
>
> I've always wondered about that. Why do we still have this
> restriction? There is a sha1 hash that is equivalent to the empty
> tree (4b825dc642cb6eb9a060e54bf8d69288fbee4904). Why can't git just
> use that to represent an empty directory? I imagine things that
> touch the working copy may need to be updated to be aware of this,
> but the problem doesn't seem insurmountable.
If I understand it correctly the problem is that git index is flat
structure that contains only file (blob) info; there is currently no
place in it to store information that some empty directory was added.
Adding an extension to have directories in index was considered in the
past; it could even speed up git a bit, I think.
--
Jakub Narebski
Poland
ShadeHawk on #git
prev parent reply other threads:[~2010-09-16 20:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 7:59 empty directories and git Question Anton
2010-09-16 8:32 ` Andreas Ericsson
2010-09-16 19:30 ` Kevin Ballard
2010-09-16 20:02 ` Jakub Narebski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3aanhlapl.fsf_-_@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=kevin@sb.org \
--cc=tmp009@allproducts.info \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.