All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org,
	Ilari Liusvaara <ilari.liusvaara@elisanet.fi>,
	Jakub Narebski <jnareb@gmail.com>,
	"Dmitry S. Kravtsov" <idkravitz@gmail.com>,
	Shawn Pearce <spearce@spearce.org>,
	Yann Dirson <dirson@bertin.fr>
Subject: Re: [PATCH] cache-tree: do not cache empty trees
Date: Mon, 7 Feb 2011 22:30:00 -0600	[thread overview]
Message-ID: <20110208043000.GA6375@elie> (raw)
In-Reply-To: <AANLkTim_G9cPs=+1GQ2qBEgriOyKYgXk17iHE4oq9h2C@mail.gmail.com>

Nguyen Thai Ngoc Duy wrote:

> But empty trees are allowed in repo since 79b1138 (fsck.c: fix bogus
> "empty tree" check). Index can't handle empty trees, so it's a bug to
> me that index still accepts them as input and silently discard them.

FWIW my instinct points in the opposite direction.  I wouldn't mind
seeing fsck warn about trees containing empty subtrees[1].  As for
cache-tree, while it is not obvious what the right thing to do is,
discarding empty subtrees sounds accepatable.

For storage of empty subtrees in repos imported from svn, Yann's idea
of using .gitattributes somehow (maybe in the parent directory or
maybe in the subdir itself) seems oddly appealing.

Just my unproductive two cents,
Jonathan

[1] I suspect 79b1138 was only meant to deal with the "git commit
--allow-empty from newly initialized repo" case.

  reply	other threads:[~2011-02-08  4:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-05  8:30 [PATCH] cache-tree: do not cache empty trees Nguyễn Thái Ngọc Duy
2011-02-05  9:50 ` Nguyễn Thái Ngọc Duy
2011-02-05 10:14   ` Jonathan Nieder
2011-02-05 10:32     ` Nguyen Thai Ngoc Duy
2011-02-05 14:07   ` Nguyễn Thái Ngọc Duy
2011-02-07  2:09     ` Junio C Hamano
2011-02-07  2:36       ` Nguyen Thai Ngoc Duy
2011-02-07  8:17       ` [PATCH] correct type of EMPTY_TREE_SHA1_BIN Jonathan Nieder
2011-02-09 23:33         ` Junio C Hamano
2011-02-07  9:17     ` [PATCH] cache-tree: do not cache empty trees Jonathan Nieder
2011-02-07  9:57       ` Nguyen Thai Ngoc Duy
2011-02-07 12:18         ` Ilari Liusvaara
2011-02-07 12:29           ` Nguyen Thai Ngoc Duy
2011-02-07 12:32           ` Jonathan Nieder
2011-02-07 20:48         ` Junio C Hamano
2011-02-08  4:11           ` Nguyen Thai Ngoc Duy
2011-02-08  4:30             ` Jonathan Nieder [this message]
2011-02-15 10:19               ` Yann Dirson
2011-02-16 14:29                 ` Jakub Narebski
2011-02-08 10:40             ` Ilari Liusvaara

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=20110208043000.GA6375@elie \
    --to=jrnieder@gmail.com \
    --cc=dirson@bertin.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=idkravitz@gmail.com \
    --cc=ilari.liusvaara@elisanet.fi \
    --cc=jnareb@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=spearce@spearce.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 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.