git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: demerphq <demerphq@gmail.com>
To: "Asheesh Laroia" <asheesh@asheesh.org>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: why still no empty directory support in git
Date: Tue, 30 Dec 2008 09:43:07 +0100	[thread overview]
Message-ID: <9b18b3110812300043l55a42f6sd995f36bf857543e@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0812300113050.22107@vellum.laroia.net>

2008/12/30 Asheesh Laroia <asheesh@asheesh.org>:
> On Tue, 30 Dec 2008, Asheesh Laroia wrote:
>
>> On Tue, 30 Dec 2008, Ping Yin wrote:
>>
>>> 2. unclear logic, for example, whether to remove the directory after the
>>> last file in it is deleted
>>
>> This is the thing I dislike most about git: that it sometimes calls
>> rmdir() for me.  At least, one should be able to turn it off in a
>> per-repository basis.  I'm going to see how hard a patch that would be to
>> write.
>
> Well, changing this behavior seems to be "as easy as" changing unlink_entry
> in unpack_trees.c to not always rmdir(). The most naive thing I can think of
> is to have unlink_entry in unpack_trees check against the git config. It's
> probably more sensible for unpack_trees to be passed an argument that
> determines if it rmdir()s; that argument could be set via argv at "git
> unpack-tree" time, which could be set out of a configuration value read at
> "git" time.
>
> Would a change of the "more sensible" kind possibly be accepted by the git
> maintainer?
>
> I ask about this because I'm using git to track email in Maildir
> repositories, and in that vein I'm getting bitten by git's removal of empty
> directories.

Add a .exists to each directory.  There is precedent for such an
approach in other systems.

cheers,
Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

  reply	other threads:[~2008-12-30  8:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-30  3:42 why still no empty directory support in git Ping Yin
2008-12-30  5:10 ` Asheesh Laroia
2008-12-30  5:28   ` Jeff Whiteside
2008-12-30  6:58     ` Robin Rosenberg
2008-12-30  7:45       ` Junio C Hamano
2008-12-30 15:36       ` Ping Yin
2008-12-30  6:25   ` Asheesh Laroia
2008-12-30  8:43     ` demerphq [this message]
2008-12-30  8:58       ` Asheesh Laroia
2008-12-31  1:06         ` David Brown
2009-01-01 20:06         ` Jeff King
2009-01-02 18:55           ` Johannes Schindelin
2009-01-02 21:31             ` Asheesh Laroia
2009-01-08  7:12           ` Asheesh Laroia
2008-12-30  6:09 ` Liu Yubao
2009-01-01  2:50   ` Anatol Pomozov
2008-12-30 12:09 ` Johannes Schindelin
2008-12-30 14:21   ` Michael Gaber

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=9b18b3110812300043l55a42f6sd995f36bf857543e@mail.gmail.com \
    --to=demerphq@gmail.com \
    --cc=asheesh@asheesh.org \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).